I finally found the source of the problem. The name of the service in the WSDL and services.xml files were different than the name set in the last part of the endpoint (.../services/ServiceName). I did not know those had to match. A lot of debugging turned up the problem.
________________________________ From: Jack Sprat <rexclaim...@yahoo.com> To: "java-user@axis.apache.org" <java-user@axis.apache.org> Sent: Tuesday, September 13, 2011 5:20 PM Subject: Re: [Axis2] How to debug NPE I was able to get the error returned in the SOAP response after removing the custom handler. It is: The service cannot be found for the endpoint reference (EPR) http://localhost:9083/contextname/services/ServiceName The HTTP log looks correct. Tue Sep 13 17:09:00 EDT 2011:DEBUG:>> "POST /contextname/services/ServiceName HTTP/1.1[\r][\n]" Tue Sep 13 17:09:00 EDT 2011:DEBUG:>> "Content-Type: text/xml;charset=UTF-8[\r][\n]" Tue Sep 13 17:09:00 EDT 2011:DEBUG:>> "SOAPAction: "http://ws.servicename.com/bol/echo"[\r][\n]" Tue Sep 13 17:09:00 EDT 2011:DEBUG:>> "User-Agent: Jakarta Commons-HttpClient/3.0.1[\r][\n]" Tue Sep 13 17:09:00 EDT 2011:DEBUG:>> "Host: localhost:9083[\r][\n]" Tue Sep 13 17:09:00 EDT 2011:DEBUG:>> "Content-Length: 262[\r][\n]" Tue Sep 13 17:09:00 EDT 2011:DEBUG:>> "[\r][\n]" Tue Sep 13 17:09:00 EDT 2011:DEBUG:>> "<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:bol="http://ws.servicename.com/bol">[\n]" Tue Sep 13 17:09:00 EDT 2011:DEBUG:>> " <soapenv:Header/>[\n]" Tue Sep 13 17:09:00 EDT 2011:DEBUG:>> " <soapenv:Body>[\n]" Tue Sep 13 17:09:00 EDT 2011:DEBUG:>> " <bol:echoRequest>test 2011-09-13 at 1640</bol:echoRequest>[\n]" Tue Sep 13 17:09:00 EDT 2011:DEBUG:>> " </soapenv:Body>[\n]" Tue Sep 13 17:09:00 EDT 2011:DEBUG:>> "</soapenv:Envelope>" What can I check to find out why Axis2 cannot find the service and operation? ________________________________ From: Jack Sprat <rexclaim...@yahoo.com> To: "java-user@axis.apache.org" <java-user@axis.apache.org> Sent: Tuesday, September 13, 2011 12:49 PM Subject: Re: [Axis2] How to debug NPE I've gotten a bit farther and found the error occurred in a custom handler. The problem is that nearly all fields (axisOperation, axisService, etc.) in the MessageContext parameter object are null. This handler is called from the AxisEngine class, which is called from the HTTPTransportUtils class. What would be causing the MessageContext object in the HTTPTransportUtils class to have the null fields? Thanks for any tips. ________________________________ From: Jack Sprat <rexclaim...@yahoo.com> To: "axis-u...@ws.apache.org" <axis-u...@ws.apache.org> Sent: Monday, September 12, 2011 3:51 PM Subject: [Axis2] How to debug NPE I've got a new Axis2 1.5.2 web service using XML Beans binding. The code was generated with WSDL2Java. I can access the WSDL using the ?wsdl link. There is a simple echo operation to test connectivity. This yields a Null Pointer exception in the SOAP reply. My question is how do I debug this? I have a breakpoint in my service class but it is not getting that far. Thanks.