cancel
Showing results for 
Search instead for 
Did you mean: 

HTTP AXIS - Add soap header element

Joseph_BERTHE
Active Contributor
0 Kudos

Hi,

I want to use WS-Security in my SOAP flow. But I want also add an attribute inside the soap header.

Here is what I want :

 
<SOAP:Envelope xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/"> 
   <SOAP:Header> 
        <OPER_REF>SAPPI</OPER_REF> 
   </SOAP:Header> 
   <SOAP:Body> 
      <ns2:createSapProductRequest xmlns:ns2="http://www.blabla.com/"> 
         <productCode>000000000001101238</productCode> 
              </ns2:createSapProductRequest> 
   </SOAP:Body> 
</SOAP:Envelope> 

It works fine without security option (I used an HTTP - SOAP adapter) with Java mapping

Now I want to add WS-Security options :

<wsse:Security SOAP:mustUnderstand="1" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd";> 
         <wsse:UsernameToken wsu:Id="UsernameToken-17224938" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd";> 
            <wsse:Username>sp</wsse:Username> 
            <wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordDigest">Cv1nK/fX6p8C74aHMJ0iILpeAsc=</wsse:Password> 
            <wsse:Nonce>SBjsJ0qqXPNNPfUVP8u87A==</wsse:Nonce> 
            <wsse:Created>2009-06-26T07:28:31.720Z<;/wsse:Created> 
         </wsse:UsernameToken> 
      </wsse:Security>

I reach that with the Java mapping but the generation of the password is not efficient because if there is a problem in the flow, the password has to be regenerated when the message it is send to the receiver. So the password generation has to be inside the receiver adapter not in the mapping itself.

So I would like to use HTTP AXIS adapter, but it cannot deactivate the SOAP envelope so I can't add my parameter OPER_REF inside the soap header.

I'm not sure i'm clear so do not hesitate to ask questions.

Thanks

Regards

Accepted Solutions (0)

Answers (1)

Answers (1)

Joseph_BERTHE
Active Contributor
0 Kudos

Solve with Java Mapping.