axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Eran Chinthaka <chinth...@opensource.lk>
Subject Re: [axis2] Setting realtesTo() leads to Exception while sending
Date Fri, 14 Jul 2006 08:34:06 GMT

hi,

I just ran your code and found a bug in our addressing code. I fixed it
and now I got the code working.

Can you test it now?

-- Chinthaka

donnerdrummel2000-mailing@yahoo.de wrote:
> Hi,
> 
> I already posted this problem a week ago, but cause it still exists I try it with some
more detail I figured out up till now.
> 
> The problem is, using fireAndForget to send some Data from one Service to an other and
setting WSA relatesTo at the ServiceClients options, no xml content is send. The Exception
wich is throws from out of the system is ... not very helpfull but here it is:
> 
> - Servlet.service() for servlet AxisServlet threw exception
> org.apache.axiom.om.OMException: SOAPEnvelope must contain a body element which is either
first or second child element of the SOAPEnvelope.
>         at org.apache.axiom.soap.impl.llom.SOAPEnvelopeImpl.getBody(SOAPEnvelope Impl.java:142)
>         at org.apache.axiom.soap.impl.llom.SOAPEnvelopeImpl.addChild(SOAPEnvelopeImpl.java:103)
>         at org.apache.axiom.soap.impl.llom.SOAPEnvelopeImpl.getHeader(SOAPEnvelopeImpl.java:82)
>         at org.apache.axis2.engine.AxisEngine.createFaultMessageContext(AxisEngine.java:183)
>         at org.apache.axis2.transport.http.AxisServlet.handleFault(AxisServlet.java:168)
>         at org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:153)
>         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)
>         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
>         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
>         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
>         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
>         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
>         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
>         at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
>         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
>         at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
>         at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
>         at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
>         at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
>         at java.lang.Thread.run(Thread.java:595)
> - Servlet.service() for servlet jsp threw exception
> java.lang.IllegalStateException: getOutputStream() has already been called for this response
>         at org.apache.catalina.connector.Response.getWriter(Response.java:599)
>         at org.apache.catalina.connector.ResponseFacade.getWriter(ResponseFacade.java:195)
>         at org.apache.jasper.runtime.JspWriterImpl.initOut(JspWriterImpl.java:124)
>         at org.apache.jasper.runtime.JspWriterImpl.flushBuffer(JspWriterImpl.java:117)
>         at org.apache.jasper.runtime.PageContextImpl.release(PageContextImpl.java:191)
>         at org.apache.jasper.runtime.JspFactoryImpl.internalReleasePageContext(JspFactoryImpl.java:115)
>         at org.apache.jasper.runtime.JspFactoryImpl.releasePageContext(JspFactoryImpl.java:75)
>         at org.apache.jsp.axis2_002dweb.Error.error500_jsp._jspService(error500_jsp.java:97)
>         at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
>         at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:332)
>         at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
>         at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
>         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
>         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
>         at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:672)
>         at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:465)
>         at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:398)
>         at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:301)
>         at org.apache.catalina.core.StandardHostValve.custom(StandardHostValve.java:363)
>         at org.apache.catalina.core.StandardHostValve.status(StandardHostValve.java:284)
>         at org.apache.catalina.core.StandardHostValve.throwable(StandardHostValve.java:228)
>         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:134)
>         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
>         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
>         at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
>         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
>         at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
>         at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
>         at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
>         at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
>         at java.lang.Thread.run(Thread.java:595)
> 
> 
> 
> So, are there any known problems? Maybe it will help to have a look at my code, wich
is like this:
> 
>         EndpointReference ep = new EndpointReference("http://localhost:8080/axis2/services/EchoReplyService");
>         Options op = new Options();
>         op.setTo(ep);
>         op.setAction("http://www.example.org/EchoReply");
> 
>         // NOT TO SET THIS RELATESTO LEADS TO SEND THE MESSAGE WITH NO PROBLEM (WICH
IS A LITTLE 
>         // MYSTICAL I THINK...)
>         //**************************************************************
>         op.addRelatesTo(new RelatesTo("123456789"));
>         //***************************************************************
> 
>         op.setExceptionToBeThrownOnSOAPFault(true);
>         
>         ServiceClient client = new ServiceClient();
>         client.setOptions(op);
>         client.engageModule(new QName(Constants.MODULE_ADDRESSING));
>         client.fireAndForget(elem);
>         
>         Thread.sleep(2000);
> 
> 
> 
> 
> Thanks a lot Ted.
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
> 
> 



Mime
View raw message