You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Andreas Schultz <an...@gmail.com> on 2007/10/16 15:53:36 UTC
Axis2: howto handle custom mustUnderstand Headers
Hi all,
I need to handle custom header fields that have the mustUnderstand
attribute set to true(1).
Currently such an invocation triggers a fault:
org.apache.axis2.AxisFault: Must Understand check failed for header : MyID
Searching the maillinglist has turned up a references to a
MustUnderstandChecker, but i don't understand how i tell it what
header elements are supported.
Is there a magic trick to tell axis which headers my service likes?
Regards
Andreas
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org
Re: Axis2: howto handle custom mustUnderstand Headers
Posted by Andreas Schultz <an...@gmail.com>.
Hi,
Thanks for you help, i have it working now.
It might be noteworthy that the mustUnderstand validation is executed
after the inFlow is complete but before the message receiver is
invoked. So doing the header processor in the invokeBusinessLogic()
method of a generate ADB binding is to late.
I have now written my own in flow handler that processes the incoming
headers and a out flow handler that adds the headers in the response.
Andreas
On 10/16/07, ROSSILLE Samuel <sa...@cgi.com> wrote:
> Hi
>
> messageContext.getEnvelope().getHeader().examineAllHeaderBlocks()
> gives you an Iterator over all the SOAPHeaderBlock of the message
>
> hb.getMustUnderstand()
> tells you if a the SOAPHeaderBlock hb must be understood.
>
> hb.setProcessed()
> tells Axis that your program understands a the SOAPHeaderBlock hb and has correctly completed it's processing.
>
> Regards
> Samuel Rossille
>
> -----Message d'origine-----
> De: Andreas Schultz [mailto:andreas.schultz@gmail.com]
> Envoyé: mardi 16 octobre 2007 15:54
> À: axis-user@ws.apache.org
> Objet: Axis2: howto handle custom mustUnderstand Headers
>
> Hi all,
>
> I need to handle custom header fields that have the mustUnderstand
> attribute set to true(1).
> Currently such an invocation triggers a fault:
> org.apache.axis2.AxisFault: Must Understand check failed for header : MyID
>
> Searching the maillinglist has turned up a references to a
> MustUnderstandChecker, but i don't understand how i tell it what
> header elements are supported.
>
> Is there a magic trick to tell axis which headers my service likes?
>
> Regards
> Andreas
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org
Re: Axis2: howto handle custom mustUnderstand Headers
Posted by Sanka Samaranayke <ss...@gmail.com>.
And I believe you should process it via custom module since Axis2 verifies whether all headers with mustUnderstand attribute set to true, have been processed before Message Receiver being invoked.
Cheers,
-- Sanka
ROSSILLE Samuel wrote:
> Hi
>
> messageContext.getEnvelope().getHeader().examineAllHeaderBlocks()
> gives you an Iterator over all the SOAPHeaderBlock of the message
>
> hb.getMustUnderstand()
> tells you if a the SOAPHeaderBlock hb must be understood.
>
> hb.setProcessed()
> tells Axis that your program understands a the SOAPHeaderBlock hb and has correctly completed it's processing.
>
> Regards
> Samuel Rossille
>
> -----Message d'origine-----
> De : Andreas Schultz [mailto:andreas.schultz@gmail.com]
> Envoyé : mardi 16 octobre 2007 15:54
> À : axis-user@ws.apache.org
> Objet : Axis2: howto handle custom mustUnderstand Headers
>
> Hi all,
>
> I need to handle custom header fields that have the mustUnderstand
> attribute set to true(1).
> Currently such an invocation triggers a fault:
> org.apache.axis2.AxisFault: Must Understand check failed for header : MyID
>
> Searching the maillinglist has turned up a references to a
> MustUnderstandChecker, but i don't understand how i tell it what
> header elements are supported.
>
> Is there a magic trick to tell axis which headers my service likes?
>
> Regards
> Andreas
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>
>
--
Sanka Samaranayake
WSO2 Inc.
http://www.bloglines.com/blog/sanka
http://www.wso2.org/
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org
RE: Axis2: howto handle custom mustUnderstand Headers
Posted by ROSSILLE Samuel <sa...@cgi.com>.
Hi
messageContext.getEnvelope().getHeader().examineAllHeaderBlocks()
gives you an Iterator over all the SOAPHeaderBlock of the message
hb.getMustUnderstand()
tells you if a the SOAPHeaderBlock hb must be understood.
hb.setProcessed()
tells Axis that your program understands a the SOAPHeaderBlock hb and has correctly completed it's processing.
Regards
Samuel Rossille
-----Message d'origine-----
De : Andreas Schultz [mailto:andreas.schultz@gmail.com]
Envoyé : mardi 16 octobre 2007 15:54
À : axis-user@ws.apache.org
Objet : Axis2: howto handle custom mustUnderstand Headers
Hi all,
I need to handle custom header fields that have the mustUnderstand
attribute set to true(1).
Currently such an invocation triggers a fault:
org.apache.axis2.AxisFault: Must Understand check failed for header : MyID
Searching the maillinglist has turned up a references to a
MustUnderstandChecker, but i don't understand how i tell it what
header elements are supported.
Is there a magic trick to tell axis which headers my service likes?
Regards
Andreas
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org