• 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
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

Handler soap-role and soap-header

 
Ranch Hand
Posts: 210
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
In the webservice deployment descriptor where you define the handler, you may specify an element 'soap-role' and 'soap-header'. Both of them are needed to determine if the handler will be executed with a given SOAP request.

In order for the handler to execture a SOAP request, the SOAP request must at least have a header that is specified by the 'soap-header' and the actor attribute of that header must have the value of the 'soap-role' (otherwise the handler is not applied to that SOAP message).

I have 2 questions about this:

1) Why does a handler have to define a method getHeader() who return QNames of the headers that the handler may process? You allready specify this in the deployment descriptor (soap-header) so why also in the Handler itself ? It seems that there is a shortcut, using the handlerInfo.getHeader (HandlerInfo which is set by the init of the handler) which returns (atleast that is what I guess) the headers defined in the descriptor. But why do you have to do this ? and why is this not in the pre implemented methods of GenericHandler ? Or is there something wrong with my reasoning...

2) It is stated that when a SOAP message contains a header without an actor attribute, the header is meant for the 'final receiver'. What is the final receiver and how is it identified ? For example, if I specify a SOAP message without actor, and I have a handler without soap-role, will my handler be invoked for that message (given that the soap-header contains the name of the header to be processed) ?

Thanks.
 
What I don't understand is how they changed the earth's orbit to fit the metric calendar. Tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic