• 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:
  • Campbell Ritchie
  • Ron McLeod
  • Rob Spoor
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Henry Wong
  • Liutauras Vilda
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Tim Holloway
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Mikalai Zaikin
  • Piet Souris

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 ...
 
Nothing up my sleeve ... and ... presto! A tiny ad:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
reply
    Bookmark Topic Watch Topic
  • New Topic