Note that there are some explanatory texts on larger screens.

plurals
  1. POCalling a .NET web service (WSE 3.0, WS-Security) from JAXWS-RI
    primarykey
    data
    text
    <p>I'm writing a JAXWS-RI client that must call a .NET Web Service that is using WS-Security. The service's WSDL does not contain any WS-Security info, but I have an example soap message from the service's authors and know that I must include wsse:Security headers, including X:509 tokens.</p> <p>I've been researching, and I've seen example of folks calling this type of web service from Axis and CXF (in conjunction with Rampart and/or WSS4J), but nothing about using plain JAXWS-RI itself. However, I'm (unfortunately) constrained to using JAXWS-RI by my gov't client. Does anyone have any examples/documentation of doing this from JAXWS-RI? </p> <p>I need to ultimately generate a SOAP header that looks something like the one below - this is a sample soap:header from a .NET client written by the service's authors. (Note: I've put the 'VALUE_HERE' string in places where I need to provide my own values)</p> <pre><code>&lt;soapenv:Envelope xmlns:iri="http://EOIR/IRIES" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xenc="http://www.w3.org/2001/04/xmlenc#"&gt; &lt;soapenv:Header xmlns:wsa="http://www.w3.org/2005/08/addressing"&gt; &lt;wsse:Security xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401- wss-wssecurity-secext-1.0.xsd"&gt; &lt;xenc:EncryptedKey Id="VALUE_HERE"&gt; &lt;xenc:EncryptionMethod Algorithm="http://www.w3.org/2001/04/xmlenc#rsa-oaep-mgf1p"/&gt; &lt;ds:KeyInfo xmlns:ds="http://www.w3.org/2000/09/xmldsig#"&gt; &lt;wsse:SecurityTokenReference&gt; &lt;wsse:KeyIdentifier 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"&gt; VALUE_HERE &lt;/wsse:KeyIdentifier&gt; &lt;/wsse:SecurityTokenReference&gt; &lt;/ds:KeyInfo&gt; &lt;xenc:CipherData&gt; &lt;xenc:CipherValue&gt;VALUE_HERE&lt;/xenc:CipherValue&gt; &lt;/xenc:CipherData&gt; &lt;xenc:ReferenceList&gt; &lt;xenc:DataReference URI="#EncDataId-8"/&gt; &lt;/xenc:ReferenceList&gt; &lt;/xenc:EncryptedKey&gt; &lt;/wsse:Security&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload