If those elements are already defined in the wsdl:binding section, those are implicit headers -- see article #56 of http://www.jroller.com/gmazza/entry/blog_article_index, else you can use either JAX-WS handlers or CXF interceptors (articles #52 - #53), as an alternative to #52-#53 CXF's transformation feature (which I haven't used before) might be able to help you: http://cxf.apache.org/docs/transformationfeature.html.

HTH,
Glen

On 08/08/2012 10:45 AM, meteora28 wrote:
Hello there,

is it possible to add some more elements in the soap header?

For example the following elements next to "security" in the header:

<?xml version="1.0" encoding="utf-8"?>
<s:Envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope";
xmlns:a="http://www.w3.org/2005/08/addressing";>
        <s:Header>
                <a:Action
s:mustUnderstand="1">http://www.onvif.org/ver10/events/wsdl/PullPointSubscription/PullMessagesRequest</a:Action>
                
<a:MessageID>urn:uuid:5b3d2467-ed65-4fb8-a2c3-174c83f4e113</a:MessageID>
                <a:ReplyTo>
                        
<a:Address>http://www.w3.org/2005/08/addressing/anonymous</a:Address>
                </a:ReplyTo>
                <wsse:Security
xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd";
xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd";>
                        ...
                </wsse:Security>
                <SubscriptionId a:IsReferenceParameter="true"
xmlns="http://www.hitron.co.kr/event";
xmlns:dom0="http://www.hitron.co.kr/event";>1</SubscriptionId>
                <a:To 
s:mustUnderstand="1">http://1.2.3.4/onvif/device_service</a:To>
        </s:Header>
        <s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
xmlns:xsd="http://www.w3.org/2001/XMLSchema";>
                <PullMessages xmlns="http://www.onvif.org/ver10/events/wsdl";>
                        <Timeout>PT20S</Timeout>
                        <MessageLimit>2</MessageLimit>
                </PullMessages>
        </s:Body>
</s:Envelope>





--
View this message in context: 
http://cxf.547215.n5.nabble.com/Insert-elements-in-soap-header-tp5712191.html
Sent from the cxf-user mailing list archive at Nabble.com.

Reply via email to