Win a copy of Head First Android this week in the Android forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Rob Spoor
  • Bear Bibeault
Saloon Keepers:
  • Jesse Silverman
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • Al Hobbs
  • salvin francis

Order of SOAP Handler call in JAX-WS

 
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
any luck for me ...
 
reply
    Bookmark Topic Watch Topic
  • New Topic