Hi Erich,
You can enforce mustUnderstand attribute in WSA SOAP headers using CXF
AddressingProperties.
AddressingProperties.getMustUnderstand() should contain list of WSA SOAP
headers QNames to be extended with mustUnderstand attribute.
AddressingProperties object itself should be available via message property
JAXWSAConstants.CLIENT_ADDRESSING_PROPERTIES.
Client code can look like:
Map<String, Object> requestContext = ((BindingProvider)
serviceProxy).getRequestContext();
AddressingProperties maps = new AddressingPropertiesImpl();
List<QName> mustUnderstandList = maps.getMustUnderstand();
mustUnderstandList.add(Names.WSA_ACTION_QNAME);
mustUnderstandList.add(Names.WSA_ADDRESS_QNAME);
mustUnderstandList.add(Names.WSA_REPLYTO_QNAME);
mustUnderstandList.add(Names.WSA_MESSAGEID_QNAME);
requestContext.put(JAXWSAConstants.CLIENT_ADDRESSING_PROPERTIES,
maps);
After it all mentioned elements will be sent with mustUnderstand="1".
Of course, you can configure AddressingProperties via Spring/Blueprint for
client/endpoint or in interceptors as well.
Regards,
Andrei.
> -----Original Message-----
> From: Eric-01 [mailto:[email protected]]
> Sent: Montag, 4. März 2013 14:18
> To: [email protected]
> Subject: RE: Insert elements in soap header?
>
> Hi Andrei,
>
> thank you.
>
> The standard interceptor does not generate a mustUnderstand attribute. So
> do have do add it via java code or can this be done by policy too? Is there an
> extra policy file required or how to add special header elements or attributes
> via policy?
>
> Eric
>
>
>
> --
> View this message in context: http://cxf.547215.n5.nabble.com/Insert-
> elements-in-soap-header-tp5712191p5724021.html
> Sent from the cxf-user mailing list archive at Nabble.com.