• java部署webService


    部署webService的详细步骤(开发工具为myEclipse 7.0 M2)

    1.目前,在使用在使用codegen插件来从WSDL生成JAVA代码文件时,到了最后一步竟然出然了"An error occurred while completing process -java.lang.reflect.InvocationTargetException"的错误。解决方法如下:
    过程如下:
    1.1、从AXIS2的LIB库中复制"geronimo-stax-api_1.0_spec-1.0.1.jar"和"backport-util-concurrent-3.1.jar"文件到Axis2_Codegen_Wizard_1.3.0的lib目录中,
    1.2、修改Axis2_Codegen_Wizard_1.3.0下的plugin.xml文件,在<runtime>中添加
    <library name="lib/geronimo-stax-api_1.0_spec-1.0.1.jar">
             <export name="*"/>
    </library>
    <library name="lib/backport-util-concurrent-3.1.jar">
            <export name="*"/>
    </library>
    到plugin.xml文件中,保存后重新启动EC即可!
        (ps:目前这些修改已经修正,若需要使用直接解压Axis2_Codegen_Wizard_1.3.0.rar和Axis2_Service_Archiver_1.3.0.rar到
    myeclipse(\myeclipse\eclipse\plugins)中即可使用代码生成和服务打包功能)。

    2.webService中服务端代码、客户端代码及其测试代码的生成,详细请参见(http://www.blogjava.net/mlzry0612/articles/185209.html)
    3.服务打包完成后(生成filename.aar的文件)。部署的详细步骤:
       3.1. Apache Software Foundation\Tomcat 6.0\webapps   目录下放 axis2.war 。
       3.2.把压缩包解压到 Apache Software Foundation\Tomcat 6.0\webapps 下
       3.3.在浏览器输入: http://192.168.11.141:8090/axis2/services(具体的地址和端口由具体的 tomcat的conf文件夹下的server.xml决定)

    4.常见问题:
       4.1在Tomcat中,如果想使用Servlet调用器(org.apache.catalina.servlets.InvokerServlet),要在conf/web.xml中,把调用器这个servlet的注册和映射开启来。但对于Tomcat 6.X 而言,会出现下面错误:
    java.lang.SecurityException: Servlet of class org.apache.catalina.servlets.InvokerServlet is privileged and cannot be loaded by this web application
    解决方法:
    修改conf/context.xml文件,新加两个属性.
    <Context  reloadable="true" privileged="true">
        <!-- Default set of monitored resources -->
        <WatchedResource>WEB-INF/web.xml</WatchedResource>
    </Context>

  • 相关阅读:
    while 循环及 break,continue语句
    Binary Search Tree BST Template
    Largest Rectangle in Histogram 解答
    Increasing/ Decreasing Stack
    Stack
    Queue
    Find the largest multiple of 3 解答
    Check whether a given Binary Tree is Complete or not 解答
    Sliding Window Maximum 解答
    Wiggle Sort 解答
  • 原文地址:https://www.cnblogs.com/xianqingzh/p/1657223.html
Copyright © 2020-2023  润新知