Forum Discussion

tibistibi's avatar
tibistibi
New Contributor
12 years ago

Add tags to envelope header

i want to generate something like this:


<soapenv:Header xmlns:wsa="http://www.w3.org/2005/08/addressing">
<wsse:Security xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
<wsse:BinarySecurityToken EncodingType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary" ValueType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profile-1.0#X509v3" wsu:Id="CertId-14D1E5676896628F9713243978587641512" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"><!-- certificaat removed --></wsse:BinarySecurityToken>
<ds:Signature Id="Signature-2827" xmlns:ds="http://www.w3.org/2000/09/xmldsig#">
<ds:SignedInfo>
<ds:CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/>
<ds:SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1"/>
<ds:Reference URI="#Timestamp-2826">
<ds:Transforms>
<ds:Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/>
</ds:Transforms>
<ds:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>
<ds:DigestValue>i8SrvDPLMS/GYOVx9VfKdgnocPE=</ds:DigestValue>
</ds:Reference>
<ds:Reference URI="#id-2828">
<ds:Transforms>
<ds:Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/>
</ds:Transforms>
<ds:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>
<ds:DigestValue>mFi9Wz65pUeVJW+tUoemwFlVayA=</ds:DigestValue>
</ds:Reference>
<ds:Reference URI="#id-2829">
<ds:Transforms>
<ds:Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/>
</ds:Transforms>
<ds:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>
<ds:DigestValue>lZWhDAL6SemOEcgXsoh+RjaePK8=</ds:DigestValue>
</ds:Reference>
<ds:Reference URI="#id-2830">
<ds:Transforms>
<ds:Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/>
</ds:Transforms>
<ds:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>
<ds:DigestValue>Zne8qDKNG8EoX7jEb/GiGUuwrn4=</ds:DigestValue>
</ds:Reference>
<ds:Reference URI="#id-2831">
<ds:Transforms>
<ds:Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/>
</ds:Transforms>
<ds:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>
<ds:DigestValue>6+EnI+8ZaiBVfu6MEmoykJ3gye8=</ds:DigestValue>
</ds:Reference>
<ds:Reference URI="#id-2832">
<ds:Transforms>
<ds:Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/>
</ds:Transforms>
<ds:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>
<ds:DigestValue>wInfKohujRrS4DYYCF/uwSRbvkY=</ds:DigestValue>
</ds:Reference>
</ds:SignedInfo>
<ds:SignatureValue>
tvGSVtyac8dbd4TEi5gX/lnC05PlzF57XEQwKtPFSDWV0frdOoA/6p0Ix/CaSszgr7mP1M9uNys8
bwPiF5q+kJN29e32Nzd2eWbKtax9WKhitFbHhHIm0BfYbeM84DqxJndGvdc1MOcYoYUgqDvnOzQt
hdJtYOO6gPJQxdDS8qA=
</ds:SignatureValue>
<ds:KeyInfo Id="KeyId-14D1E5676896628F9713243978587641513">
<wsse:SecurityTokenReference wsu:Id="STRId-14D1E5676896628F9713243978587641514" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
<wsse:Reference URI="#CertId-14D1E5676896628F9713243978587641512" ValueType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profile-1.0#X509v3"/>
</wsse:SecurityTokenReference>
</ds:KeyInfo>
</ds:Signature>
<wsu:Timestamp wsu:Id="Timestamp-2826" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
<wsu:Created>2011-12-20T16:17:38.724Z</wsu:Created>
<wsu:Expires>2011-12-20T16:27:38.724Z</wsu:Expires>
</wsu:Timestamp>
</wsse:Security>
<wsa:Action wsu:Id="id-2831" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">http://logius.nl/digipoort/wus/2.0/aanleverservice/1.2/AanleverService/aanleverenRequest</wsa:Action>
<wsa:ReplyTo wsu:Id="id-2832" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
<wsa:Address>http://www.w3.org/2005/08/addressing/anonymous</wsa:Address>
</wsa:ReplyTo>
<wsa:MessageID wsu:Id="id-2830" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">uuid:0a528087-4b2e-4d89-ba5d-a0168b344f04</wsa:MessageID>
<wsa:To wsu:Id="id-2829" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">https://preprod.procesinfrastructuur.nl/wus/2.0/aanleverservice/1.2</wsa:To>
</soapenv:Header>



at this point a can sign my message fine. the action tag is generated and i have added the timestamp with the timestamp in the WS-Security Configurations tab.

now i need to add the reployTo, MessageID and TO tags. but i have no clue howto. when i add them in the request by hand the security tags are not generated anymore. is there a differnt way to add them??

thanks!!!

2 Replies

  • nmrao's avatar
    nmrao
    Icon for Champion Level 1 rankChampion Level 1
    Probably you want to check the preferences? I believe it allows to add the head information for the out going requests.
  • DavidEtcell's avatar
    DavidEtcell
    Occasional Contributor
    I'm not sure if I'm missing whats being asked for here, but isn't all of the above in the 'WS-A' tab when you edit the request itself?