camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Satyam Maloo <maloosat...@gmail.com>
Subject How to set SOAP Headers in SOAP Message - Camel blueprint
Date Wed, 13 Jan 2016 16:14:33 GMT
Hi Team,

I am using Camel blueprint 2.10, CXF 2.6, JBoss Fuse 6.0. 
I am facing an issue trying to connect to Microsoft IIS 8.5 SOAP services
with securityPolicy enabled. Provider is expecting to generate a sample SOAP
request like below. but my SOAP request is generated without the
<soap:header> tag, Do I need to manually code in Java for this or can I set
it in the camel-route.xml - what am I missing, can you please throw some
light.


<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
    <soap:Header>
        <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"
            soap:mustUnderstand="1">
            <xenc:EncryptedKey
xmlns:xenc="http://www.w3.org/2001/04/xmlenc#"
                Id="EK-12747936E7F83C159813176421345694">
                <xenc:EncryptionMethod
                    Algorithm="http://www.w3.org/2001/04/xmlenc#rsa-1_5" />
                <ds:KeyInfo xmlns:ds="http://www.w3.org/2000/09/xmldsig#">
                    <wsse:SecurityTokenReference>
                        <ds:X509Data>
                            <ds:X509IssuerSerial>
                                <ds:X509IssuerName>CN=localhost
                                </ds:X509IssuerName>
                                <ds:X509SerialNumber>1317633571
                                </ds:X509SerialNumber>
                            </ds:X509IssuerSerial>
                        </ds:X509Data>
                    </wsse:SecurityTokenReference>
                </ds:KeyInfo>
                <xenc:CipherData>
                   
<xenc:CipherValue>ZmdQmouQD3MmR8gTHaMDncmNXZ8S4pkl+qdDK7nqy2iBHpy/HTWdCMgRnolmAwlzT6hy9e4+BRCTbwZLHSvad39MtOk+O/HQFTLqGBrLl7ne0aUQG98WXV3n2iSTnp7L1MsherqDHK5FSgx7VpM70U2C+25ny+IU23mp5NRWat4=
                    </xenc:CipherValue>
                </xenc:CipherData>
                <xenc:ReferenceList>
                    <xenc:DataReference URI="#ED-4" />
                    <xenc:DataReference URI="#ED-5" />
                </xenc:ReferenceList>
            </xenc:EncryptedKey>
            <xenc:EncryptedData
xmlns:xenc="http://www.w3.org/2001/04/xmlenc#"
                Id="ED-4" Type="http://www.w3.org/2001/04/xmlenc#Element">
                <xenc:EncryptionMethod
                   
Algorithm="http://www.w3.org/2001/04/xmlenc#tripledes-cbc" />
                <ds:KeyInfo xmlns:ds="http://www.w3.org/2000/09/xmldsig#">
                    <wsse:SecurityTokenReference
                       
xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"
                       
xmlns:wsse11="http://docs.oasis-open.org/wss/oasis-wss-wssecurity-secext-1.1.xsd"
                       
wsse11:TokenType="http://docs.oasis-open.org/wss/oasis-wss-soap-message-security-1.1#EncryptedKey">
                        <wsse:Reference
                            URI="#EK-12747936E7F83C159813176421345694" />
                    </wsse:SecurityTokenReference>
                </ds:KeyInfo>
                <xenc:CipherData>
                   
<xenc:CipherValue>yYYbMK88LqUrx0FtoelxODzyom2qX4n5HD8d+ZvNMQmUhSOoVOULpKoU2nb5kiLKBwDeyJZSl1XroHZ94KBqqxHMddGUc79l3lf9GCMRyNZWpY9atd3YxBrw6pKmGwHIcaKZIBWNMoq9R6iyDqK0JBo835KgSFmu2WvLmhrXTVtvsS64gw2tukYdf+KSJW7Mr3f+Ujp9usH6Jeh4O7njtsDNm101c0B+M39xbo+WNJfKDMkpn2y/am23656KPF/5ZAxBQ+VNc1NoC1VvPd2Hk2l+7fQWse+1a7fA3Sim6ODZMTVOwBbgxU5Z3FQPZc/BldqX9G/TC1b/UHI9rVfcUMBJPQ6ptARwrelLvb79hyu9xSJ/sfby9R7QlT2hDPxz1Qw/H7wAWfvdjO3ztcsI2SwThrRLmf+D1hpwY04hns9ltcIv4YgeoXQZKzFZB07Km8FeQwD0yPXx2fY4+2oCpnx8DlL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M01ndLozgIkcV89JI7CqMGevxJaejPVfvtil1rBGKR6n4oTMlP4/lza+TM9u3q409yhtAj5yUlSahjZAttYks7m0zKkXVPXE0o28HSevL1gA7W1/c/PygGZNazIRyVxYHh+mnhnLzHLTiK+wG
                    </xenc:CipherValue>
                </xenc:CipherData>
            </xenc:EncryptedData>
            <wsu:Timestamp wsu:Id="TS-1">
                <wsu:Created>2011-10-03T11:42:14.242Z</wsu:Created>
                <wsu:Expires>2011-10-03T11:47:14.242Z</wsu:Expires>
            </wsu:Timestamp>
        </wsse:Security>
    </soap:Header>
    <soap:Body
       
xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"
        wsu:Id="id-2">
        <xenc:EncryptedData xmlns:xenc="http://www.w3.org/2001/04/xmlenc#"
            Id="ED-5" Type="http://www.w3.org/2001/04/xmlenc#Content">
            <xenc:EncryptionMethod
                Algorithm="http://www.w3.org/2001/04/xmlenc#tripledes-cbc"
/>
            <ds:KeyInfo xmlns:ds="http://www.w3.org/2000/09/xmldsig#">
                <wsse:SecurityTokenReference
                   
xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"
                   
xmlns:wsse11="http://docs.oasis-open.org/wss/oasis-wss-wssecurity-secext-1.1.xsd"
                   
wsse11:TokenType="http://docs.oasis-open.org/wss/oasis-wss-soap-message-security-1.1#EncryptedKey">
                    <wsse:Reference
                        URI="#EK-12747936E7F83C159813176421345694" />
                </wsse:SecurityTokenReference>
            </ds:KeyInfo>
            <xenc:CipherData>
               
<xenc:CipherValue>9MmmHrmHXaCSocFyODDmjWF/HCZ4BnxI3bjg9D9uLArYNrGtNHHIgReTZmXNeXjy1gbXxc+mNdU8iAAdGZwyyONfFDYlWSXluuLj5PEsL4YdYDjnMpQ+cLhdmns+Ca8GEM1DFOHlg47BbcOyFoFp3dieL+fR+gm2su4x3gDerIA=
                </xenc:CipherValue>
            </xenc:CipherData>
        </xenc:EncryptedData>
    </soap:Body>
</soap:Envelope>



-----
Satyam
--
View this message in context: http://camel.465427.n5.nabble.com/How-to-set-SOAP-Headers-in-SOAP-Message-Camel-blueprint-tp5776204.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Mime
View raw message