When axis2 uses https, the error java. Lang. nullpointerexception is returned.

Source: Internet
Author: User

Lab environment: JDK 1.6, Axis2-1.3, using SSL/TLS (one-way/two-way authentication), Tomcat 5.5/glassfish v2

When you use SSL/TLS to access the Web Service of axis2, the following error occurs:
Exception in thread "Main" org. Apache. axis2.axisfault: Java. Lang. nullpointerexception

This error is caused by the use of transportsession in the created web service-in service. xml:
<Service name = "test" Scope ="Transportsession">
For solutions, see https://issues.apache.org/jira/browse/AXIS2-3141? Page = com. Atlassian. Jira. plugin. system. issuetabpanels: All-tabpanel

This patch is for Axis2-1.2 and can be used in the Axis2-1.3, but in 1.3 you only need to be in the createmessagecontext function in org. Apache. axis2.transport. http. axisservlet. Java,
Change msgcontext. settransportin (transportin) to msgcontext. settransportin (transportin! = NULL? Transportin: axisconfiguration. gettransportin (constants. transport_http) and repackage it into a axis2-kernel-1.3.jar. Because this null problem occurs on the server side, you need to encapsulate the new kernel in the Lib of the axis2 server.

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.