Deploying WebService in Java

Source: Internet
Author: User
Detailed steps for deploying WebService (the development tool is myeclipse 7.0 m2)

1. currently, when you use the codegen plug-in to generate a Java Code file from WSDL, in the last step, it turned out "An error occurred while completing process-java. lang. reflect. invocationtargetexception "error. Solution:
the process is as follows:
1.1, copy the "geronimo-stax-api_1.0_spec-1.0.1.jar" and "backport-util-concurrent-3.1.jar" file from the axis2 lib Library to the axis2_codegen_wizard_1.3.0 lib directory,
1.2 modify the plug-in under axis2_codegen_wizard_1.3.0. XML file, add






go to the plugin. xml file, save the file, and restart EC!
(PS: plugin to
myeclipse (\ myeclipse \ eclipse \ plugins), you can use the code generation and service packaging functions ).

2. server code, client code and test code generation in WebService, see (http://www.blogjava.net/mlzry0612/articles/185209.html)
3. after the service is packaged (filename is generated. AAR files ). Detailed deployment steps:
3.1. axis2.war is put under the Apache Software Foundation \ Tomcat 6.0 \ webapps directory.
3. 2. decompress the package to Apache Software Foundation \ Tomcat 6.0 \ webapps
3. 3. enter http: // 192.168.11.141: 8090/axis2/services in the browser (the specific address and port are set by the server in the conf folder of the specific tomcat. determined by XML)

4. FAQ:
4.1 in Tomcat, if you want to use the servlet caller (Org. apache. catalina. servlets. invokerservlet), in CONF/web. in XML, register and map the servlet of the caller. However, for Tomcat 6.x, the following error occurs:
JAVA. lang. securityexception: servlet of class Org. apache. catalina. servlets. invokerservlet is privileged and cannot be loaded by this web application
solution:
modify CONF/context. XML file, adding two new attributes.


WEB-INF/Web. xml

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.