You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by jamesnmullen <ma...@james-mullen.me.uk> on 2011/08/04 14:01:28 UTC
adding SOAP header to SOAP Fault
I wanted to check my understanding.
I need to add a SOAP Header to a SOAP Fault, this will be returning a
transaction id I received in the request.
I have done this successfully using the @WebParam annotation for
inbound/outbound SOAP Headers in a request/response scenario.
There doesn't seem to be a way to annotate a WebFault to return a SOAP
Header. I am correct in thinking the only way to achieve this is with the
use of an Interceptor which would add the header to the SOAP Fault as the
interceptor chain was being unwound?
Also does this mean I cannot get my WSDL (generated from Java code) to
include the fact my SOAP Fault will include a header?
Thanks,
James
--
View this message in context: http://cxf.547215.n5.nabble.com/adding-SOAP-header-to-SOAP-Fault-tp4666053p4666053.html
Sent from the cxf-user mailing list archive at Nabble.com.
Re: adding SOAP header to SOAP Fault
Posted by Glen Mazza <gm...@talend.com>.
Well, you can also use JAX-WS handlers, very similar to interceptors.
Look at SOAPHandler.java here:
http://www.jroller.com/gmazza/entry/jaxws_handler_tutorial. As for your
second question, I think you're looking for soap:headerfault
(http://www.w3.org/TR/wsdl#_soap:header) but I haven't used that before
and am unsure if there's a JAX-WS annotation that can cause it to be listed
Glen
On 08/04/2011 08:01 AM, jamesnmullen wrote:
> I wanted to check my understanding.
>
> I need to add a SOAP Header to a SOAP Fault, this will be returning a
> transaction id I received in the request.
>
> I have done this successfully using the @WebParam annotation for
> inbound/outbound SOAP Headers in a request/response scenario.
>
> There doesn't seem to be a way to annotate a WebFault to return a SOAP
> Header. I am correct in thinking the only way to achieve this is with the
> use of an Interceptor which would add the header to the SOAP Fault as the
> interceptor chain was being unwound?
>
> Also does this mean I cannot get my WSDL (generated from Java code) to
> include the fact my SOAP Fault will include a header?
>
> Thanks,
>
> James
>
> --
> View this message in context: http://cxf.547215.n5.nabble.com/adding-SOAP-header-to-SOAP-Fault-tp4666053p4666053.html
> Sent from the cxf-user mailing list archive at Nabble.com.
--
Glen Mazza
Talend - http://www.talend.com/ai
Blog - http://www.jroller.com/gmazza
Twitter - glenmazza
Re: adding SOAP header to SOAP Fault
Posted by Daniel Kulp <dk...@apache.org>.
On Thursday, August 04, 2011 5:01:28 AM jamesnmullen wrote:
> I wanted to check my understanding.
>
> I need to add a SOAP Header to a SOAP Fault, this will be returning a
> transaction id I received in the request.
>
> I have done this successfully using the @WebParam annotation for
> inbound/outbound SOAP Headers in a request/response scenario.
>
> There doesn't seem to be a way to annotate a WebFault to return a SOAP
> Header. I am correct in thinking the only way to achieve this is with the
> use of an Interceptor which would add the header to the SOAP Fault as the
> interceptor chain was being unwound?
>
> Also does this mean I cannot get my WSDL (generated from Java code) to
> include the fact my SOAP Fault will include a header?
It definitely doesn't look like it, no. I'm not seeing anything in the JAX-
WS spec or similar that would allow this.
Dan
>
> Thanks,
>
> James
>
> --
> View this message in context:
> http://cxf.547215.n5.nabble.com/adding-SOAP-header-to-SOAP-Fault-tp4666053p
> 4666053.html Sent from the cxf-user mailing list archive at Nabble.com.
--
Daniel Kulp
dkulp@apache.org
http://dankulp.com/blog
Talend - http://www.talend.com