• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Order of SOAP Handler call in JAX-WS

 
Nikita Dutt
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

I am trying to understand how a JAX-WS protocol handler gets executed on the server side. Have written a code where i thought the


output would be

------------------------------------
In SOAPHandler SOAPHandlerOne method:handleMessage - direction = inbound
------------------------------------
------------------------------------
In SOAPHandler SOAPHandlerTwo method:handleMessage - direction = inbound
------------------------------------


but am getting the output as


------------------------------------
In SOAPHandler SOAPHandlerTwo method:handleMessage - direction = inbound
------------------------------------
------------------------------------
In SOAPHandler SOAPHandlerOne method:handleMessage - direction = inbound
------------------------------------


Please let me know what am i missing , if this is an expected behavior ? then why ?

Handlers Code


First Handler





Second Handler






The handler-chain.xml file

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<javaee:handler-chains xmlns:javaee="http://java.sun.com/xml/ns/javaee" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<javaee:handler-chain>
<javaee:handler>
<javaee:handler-class>com.company.jaxws.handler.cardservice.common.SOAPHandlerOne</javaee:handler-class>
</javaee:handler>
<javaee:handler>
<javaee:handler-class>com.company.jaxws.handler.cardservice.common.SOAPHandlerTwo</javaee:handler-class>
</javaee:handler>
</javaee:handler-chain>
</javaee:handler-chains>


Why is it calling SOAPHandlerTwo before SOAPHandlerOne ?


similary if i have LogicalHandler along with the SOAPHandlerOne the output is coming as

------------------------------------
In SOAPHandler SOAPHandlerTwo method:handleMessage - direction = inbound
------------------------------------
------------------------------------
In SOAPHandler SOAPHandlerOne method:handleMessage - direction = inbound
------------------------------------
------------------------------------
In SOAPHandler LogicalHandlerThree method:handleMessage - direction = inbound
------------------------------------
------------------------------------
In SOAPHandler LogicalHandlerTwo method:handleMessage - direction = inbound
------------------------------------
------------------------------------
In SOAPHandler LogicalHandlerOne method:handleMessage - direction = inbound
------------------------------------



and not as


------------------------------------
In SOAPHandler SOAPHandlerOne method:handleMessage - direction = inbound
------------------------------------
------------------------------------
In SOAPHandler SOAPHandlerTwo method:handleMessage - direction = inbound
------------------------------------
------------------------------------
In SOAPHandler LogicalHandlerOne method:handleMessage - direction = inbound
------------------------------------
------------------------------------
In SOAPHandler LogicalHandlerTwo method:handleMessage - direction = inbound
------------------------------------
------------------------------------
In SOAPHandler LogicalHandlerThree method:handleMessage - direction = inbound
------------------------------------

Complete handler-chain.xml


<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<javaee:handler-chains xmlns:javaee="http://java.sun.com/xml/ns/javaee" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<javaee:handler-chain>
<javaee:handler>
<javaee:handler-class>com.company.jaxws.handler.cardservice.common.SOAPHandlerOne</javaee:handler-class>
</javaee:handler>
<javaee:handler>
<javaee:handler-class>com.company.jaxws.handler.cardservice.common.SOAPHandlerTwo</javaee:handler-class>
</javaee:handler>
<javaee:handler>
<javaee:handler-class>com.company.jaxws.handler.cardservice.common.LogicalHandlerOne</javaee:handler-class>
</javaee:handler>
<javaee:handler>
<javaee:handler-class>com.company.jaxws.handler.cardservice.common.LogicalHandlerTwo</javaee:handler-class>
</javaee:handler>
<javaee:handler>
<javaee:handler-class>com.company.jaxws.handler.cardservice.common.LogicalHandlerThree</javaee:handler-class>
</javaee:handler>
</javaee:handler-chain>
</javaee:handler-chains>






Thanks in advance.

 
Nikita Dutt
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
any luck for me ...
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic