You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by "Misho Gradinkata (JIRA)" <ji...@apache.org> on 2008/03/27 17:15:24 UTC

[jira] Updated: (AXIS2-3668) Wrong JAX-WS handler-chain execution

     [ https://issues.apache.org/jira/browse/AXIS2-3668?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Misho Gradinkata updated AXIS2-3668:
------------------------------------

    Attachment: request.xml
                my-jaxws-handler-chain.jar
                HelloServiceJAXWSAnnotated.aar

Attaching an example:
1. a service - HelloService annotated with @WebService and @HandlerChain(file=""..."), and using JAXWSMessageReceiver
2. a .jar file with the handler classes and the handler-chain descriptor file - I drop it into /lib directory of axis2
3. the request - request.xml

I. when sending the request as it is in request.xml the chain execution seems to be correct as one can see from the logging to system.out
II. when sending this request without the <Timestamp> header -> the second handler fails with ProtocolException and in the logging to system.out one can see some unconformities :

------------------------------------
In Handler TimestampVerificationSOAPHandler:init()
Exiting Handler TimestampVerificationSOAPHandler:init()
------------------------------------
------------------------------------
In Handler EnvelopeLoggingSOAPHandler:init()
Exiting Handler EnvelopeLoggingSOAPHandler:init()
------------------------------------
------------------------------------
In Handler ServicePerformanceMonitorLogicalHandler:init()
Exiting Handler ServicePerformanceMonitorLogicalHandler:init()
------------------------------------
------------------------------------
In Handler PayloadLoggingLogicalHandler:init()
Exiting Handler PayloadLoggingLogicalHandler:init()
------------------------------------
------------------------------------
In SOAPHandler EnvelopeLoggingSOAPHandler:handleMessage()

direction = inbound 

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:sam="http://sample.company.o
rg"><soapenv:Header>
   </soapenv:Header><soapenv:Body>
      <sam:hello>
         <sam:str>misho</sam:str>
      </sam:hello>
   </soapenv:Body></soapenv:Envelope>
Exiting SOAPHandler EnvelopeLoggingSOAPHandler:handleMessage()
------------------------------------
------------------------------------
In SOAPHandler TimestampVerificationSOAPHandler:handleMessage()

direction = inbound

ERROR in SOAPHandler TimestampVerificationSOAPHandler:handleMessage()
 Required header is missing.
------------------------------------
------------------------------------
In Handler EnvelopeLoggingSOAPHandler:handleFault()
Exiting Handler EnvelopeLoggingSOAPHandler:handleFault()
------------------------------------
------------------------------------
In Handler TimestampVerificationSOAPHandler:close()
Exiting Handler TimestampVerificationSOAPHandler:close()
------------------------------------
------------------------------------
In Handler EnvelopeLoggingSOAPHandler:close()
Exiting Handler EnvelopeLoggingSOAPHandler:close()
------------------------------------
      ------------------------------------
      In Handler ServicePerformanceMonitorLogicalHandler:handleFault()
      Exiting Handler ServicePerformanceMonitorLogicalHandler:handleFault()
      ------------------------------------
      ------------------------------------
      In Handler PayloadLoggingLogicalHandler:handleFault()
      Exiting Handler PayloadLoggingLogicalHandler:handleFault()
      ------------------------------------
      ------------------------------------
      In Handler TimestampVerificationSOAPHandler:handleFault()
      Exiting Handler TimestampVerificationSOAPHandler:handleFault()
      ------------------------------------
      ------------------------------------
      In Handler EnvelopeLoggingSOAPHandler:handleFault()
      Exiting Handler EnvelopeLoggingSOAPHandler:handleFault()
      ------------------------------------
      ------------------------------------
      In Handler ServicePerformanceMonitorLogicalHandler:close()
      Exiting Handler ServicePerformanceMonitorLogicalHandler:close()
      ------------------------------------
      ------------------------------------
      In Handler PayloadLoggingLogicalHandler:close()
      Exiting Handler PayloadLoggingLogicalHandler:close()
      ------------------------------------
      ------------------------------------
      In Handler TimestampVerificationSOAPHandler:close()
      Exiting Handler TimestampVerificationSOAPHandler:close()
      ------------------------------------
      ------------------------------------
      In Handler EnvelopeLoggingSOAPHandler:close()
      Exiting Handler EnvelopeLoggingSOAPHandler:close()
      ------------------------------------
------------------------------------
In Handler ServicePerformanceMonitorLogicalHandler:destroy()
Exiting Handler ServicePerformanceMonitorLogicalHandler:destroy()
------------------------------------
------------------------------------
In Handler PayloadLoggingLogicalHandler:destroy()
Exiting Handler PayloadLoggingLogicalHandler:destroy()
------------------------------------
------------------------------------
In Handler TimestampVerificationSOAPHandler:destroy()
Exiting Handler TimestampVerificationSOAPHandler:destroy()
------------------------------------
------------------------------------
In Handler EnvelopeLoggingSOAPHandler:destroy()
Exiting Handler EnvelopeLoggingSOAPHandler:destroy()
------------------------------------
[ERROR] An error was detected during JAXWS processing
org.apache.axis2.AxisFault: An error was detected during JAXWS processing
	at org.apache.axis2.jaxws.server.JAXWSMessageReceiver.receive(JAXWSMessageReceiver.java:186)
	at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:176)
	at org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.java:275)
	at org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:131)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151)
	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:874)
	at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.j
ava:665)
	at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
	at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
	at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)
	at java.lang.Thread.run(Thread.java:595)

> Wrong JAX-WS handler-chain execution
> ------------------------------------
>
>                 Key: AXIS2-3668
>                 URL: https://issues.apache.org/jira/browse/AXIS2-3668
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: jaxws
>         Environment: Apache Tomcat 5.5.25
> Axis2-1.4/RC2
> soapUI for client
>            Reporter: Misho Gradinkata
>         Attachments: HelloServiceJAXWSAnnotated.aar, my-jaxws-handler-chain.jar, request.xml
>
>
> Hi all,
> I'm testing Axis2-1.4/RC2 and its JAX-WS handler framework implementation. I noticed some unconformities with the JAX-WS specification:
> I have a handler chain with Handler1, Handler2, Handler3 and Handler4. The four of them have handleMessage(), handleFault() and close() methods as well as init() and destroy() methods annotated with @PostConstruct and @PreDestroy respectively. When a message arrives init() is executed on all handlers, then on the inbound direction Handler3's handleMessage() method throws a ProtocolException -> then the chain is reverted and handleFault() is invoked on Handler2 and Handler1, then close() on Handler 1, 2 and 3. As far as I understand from the JAX-WS 2.0 specification this is the expected behavior. So here I expect all @PreDestroy methods to be executed and that's all for the handler-chain. BUT instead I can see that an outbound execution starts (with OUTBOUND_PROPERTY = true) and handleFault() is called (again) on all four handlers from 4 to 1, then close() on all handlers (again) and at the end destroy() on all handlers.
> I guess that somewhere you miss to check for errors on the inbound chain execution and a complete outbound chain is executed no matter what happened on the inbound direction. I think it is important to fix this.
> Thanks.
> Regards,
> Misho

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org