Hi Deepal,
Thanks for your response. I have debugged my code and it goes through
all the lines successfully,
Here is the code of the invoke mehod of my module. May be I am
missing to set something else too.
-------
try {
OMElement omElement = AXIOMUtil.stringToOM("<p:hello
xmlns:p=\"hellorui\">hello</p:hello>");
SOAPFactory factory =
OMAbstractFactory.getSOAP11Factory();
SOAPEnvelope soapEnvelope =
factory.createSOAPEnvelope();
SOAPBody soapBody =factory.createSOAPBody();
soapBody.addChild(omElement);
soapEnvelope.addChild(soapBody);
msgContext.setEnvelope(soapEnvelope);
msgContext.setResponseWritten(true);
}
catch(AxisFault fault){
throw fault;
}
catch (Throwable exp) {
exp.printStackTrace();
}
return InvocationResponse.CONTINUE;
Best Regards,
Shah Asrani
On Thu, Nov 27, 2008 at 11:04 AM, Deepal jayasinghe <[EMAIL PROTECTED]> wrote:
>
> Hi Shah ,
> I think NPE is coming from your code , can you please double check your
> code.
>
> Deepal
> > Hi,
> > I have created a module to handle a soap request. When the client
> > invokes the web service, the module class's invoke(MessageContext)
> > gets invoked.
> > In the module, I write up a response as an envelope and set it on
> > MessageContext. I also set the property isResponseWritten to true.
> > However, I get the following NPE.
> >
> > _
> >
> > java.lang.NullPointerException
> >
> > _
> >
> > at org.apache.axis2.engine.AxisEngine.receive(
> >
> > _AxisEngine.java:170_)
> >
> > at
> > org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(
> >
> > _HTTPTransportUtils.java:275_)
> >
> > at org.apache.axis2.transport.http.AxisServlet.doPost(
> >
> > _AxisServlet.java:133_)
> >
> > at javax.servlet.http.HttpServlet.service(
> >
> > _HttpServlet.java:709_)
> >
> > at javax.servlet.http.HttpServlet.service(
> >
> > _HttpServlet.java:802_)
> >
> > at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(
> >
> > _ApplicationFilterChain.java:252_)
> >
> > Any ideas what could be wrong.
> >
> > Best Regards,
> >
> >
> >
> > Shah Asrani
> >
>
>
> --
> Thank you!
>
>
> http://blogs.deepal.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]