Insert XML elment in the existing node after Message Signing

Not applicable

Hi ,

I need to extract a context variable 'apigee.developer.app.name' and insert the same inside <wsse:Security> tag after message signing.

Request After SOAP Message signing ..

<soap:Envelope>
   <soap:Header> 
      <wsse:Security>
      </wsse:Security>  
   </soap:Header> 
   <soap:Body>
   </soap:Body> 
</soap:Envelope> 

Request Before reaching to the back end ..

<soap:Envelope>
 <soap:Header>
  <wsse:Security>
    <wsse:UsernameToken>
	<wsse:Username>CN={Extracted apigee.developer.app.name}</wsse:Username>
    </wsse:UsernameToken>
  </wsse:Security>
 </soap:Header>
 <soap:Body>
 </soap:Body>
</soap:Envelope>

Can you provide some thoughts on this.

Thanks

naga

0 1 340
1 REPLY 1

Hi @naga

You can use apigee xsl transform policy.

For referring context variables please check

https://community.apigee.com/questions/1505/how-to-read-context-variables-in-xsl.html

and for adding xml element please check

http://stackoverflow.com/questions/54683/how-do-you-insert-xml-into-an-existing-xml-node

Please check if it helps.

Thanks