Note that there are some explanatory texts on larger screens.

plurals
  1. POWCF: Adding Nonce to UsernameToken
    text
    copied!<p>I'm trying to connect to a web service, written in Java, but there's something I can't figure out.</p> <p>Using WCF and a customBinding, almost everything seems to be fine, except one part of the SOAP message, as it's missing the Nonce and Created part nodes. Obviously I'm missing something, so if you could point me into the right direction, it'd be much appreciated.</p> <p>Here's the custom binding:</p> <pre><code>&lt;binding name="CustomHTTPBinding"&gt; &lt;security includeTimestamp="false" authenticationMode="UserNameOverTransport" defaultAlgorithmSuite="Basic256" requireDerivedKeys="True" messageSecurityVersion="WSSecurity10WSTrustFebruary2005WSSecureConversationFebruary2005WSSecurityPolicy11BasicSecurityProfile10"&gt; &lt;/security&gt; &lt;textMessageEncoding maxReadPoolSize="211" maxWritePoolSize="2132" messageVersion="Soap11" writeEncoding="utf-8"/&gt; &lt;httpsTransport /&gt; &lt;/binding&gt; </code></pre> <p>And here's the relevant part of the message:</p> <pre><code>&lt;o:Security s:mustUnderstand="1" xmlns:o="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"&gt; &lt;o:UsernameToken u:Id="uuid-c306efd1-e84c-410e-a2ad-1046b368582e-1"&gt; &lt;o:Username&gt; &lt;!-- Removed--&gt; &lt;/o:Username&gt; &lt;o:Password&gt; &lt;!-- Removed--&gt; &lt;/o:Password&gt; &lt;/o:UsernameToken&gt; &lt;/o:Security&gt; </code></pre> <p>And this's how it should look:</p> <pre><code>&lt;wsse:Security xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" soapenv:mustUnderstand="1"&gt; &lt;wsse:UsernameToken xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" wsu:Id="UsernameToken-25763165"&gt; &lt;wsse:Username&gt;..&lt;/wsse:Username&gt; &lt;wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordDigest"&gt;..&lt;/wsse:Password&gt; &lt;wsse:Nonce&gt;6ApOnLn5Aq9KSH46pzzcZA==&lt;/wsse:Nonce&gt; &lt;wsu:Created&gt;2009-05-13T18:59:23.309Z&lt;/wsu:Created&gt; &lt;/wsse:UsernameToken&gt; &lt;/wsse:Security&gt; </code></pre> <p>So the question is: How could I introduce the Nonce and Created elements inside the security part?</p>
 

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