Details
-
Bug
-
Status: Resolved
-
Critical
-
Resolution: Not A Problem
-
1.6.0, 1.6.1, 1.6.2
-
Any. Testing on Windows 7 with java 1.5.
Description
Something has changed from 1.5.6 to 1.6.0 in the axis2-transport-http.jar that causes a null pointer exception if you initialize your ServiceClient with an ConfigurationContext that was created by calling ConfigurationContextFactory.createDefaultConfigurationContext().
Here's the modified sample that shows the behavior:
public class EchoBlockingClient {
private static EndpointReference targetEPR = new EndpointReference("http://localhost:8080/checkSoap");
public static void main(String[] args) throws Exception {
try
catch (AxisFault axisFault)
{ axisFault.printStackTrace(); }}
I see the following exception when doing so:
Exception in thread "main" java.lang.NullPointerException
at org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(CommonsHTTPTransportSender.java:172)
at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:443)
This is because the TransportOutDescription is never set on the CommonHTTPTransportSender.
If I change the code and use the
ConfigurationContext defaultContext= ConfigurationContextFactory.createConfigurationContextFromFileSystem(null, null);
Then this code works fine.
I can also, just replace the axis2-transport-http-1.6.0.jar with the axis2-transport-http-1.5.6.jar and it will work either way.