On Wed, Sep 14, 2011 at 2:50 AM, Jack Sprat <rexclaim...@yahoo.com> wrote:
> 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? > You may need to debug the org.apache.axis2.dispatchers.SOAPActionBasedDispatcher which finds the operation for the action. Before doing that you may check the service name given in the services.xml and the soap action. thanks, Amila. > > > ------------------------------ > *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. > > > > > > -- Amila Suriarachchi WSO2 Inc. blog: http://amilachinthaka.blogspot.com/