cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jaroslav Půbal <pu...@marbes.cz>
Subject CXF WSS and .NET with certificate (BinarySecurityToken)
Date Wed, 22 Aug 2012 12:14:02 GMT
Hello,

I need call .NET server from CXF java client.

 

.NET web service use WSS with certificate.

 

I have valid certificate, but I don't know how to configure CXF to get it
work.

 

Request header must look like this:

<SOAP:Envelope xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/03/addressing"
xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecuri
ty-secext-1.0.xsd"
xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurit
y-utility-1.0.xsd">

  <SOAP:Header>

    <wsa:Action>http://xxx/xxx/proceed2</wsa:Action>

    <wsa:MessageID>uuid:0850345f-4462-44ec-ba79-322a01cf2e3b</wsa:MessageID>

    <wsa:To>http://xxx/xxx/</wsa:To>

    <wsse:Security SOAP:mustUnderstand="1">

      <wsu:Timestamp
wsu:Id="Timestamp-6650292b-e070-4234-961c-becfb5c54d58">

        <wsu:Created>2008-09-17T09:59:18Z</wsu:Created>

      </wsu:Timestamp>

      <wsse:BinarySecurityToken
ValueType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-toke
n-profile-1.0#X509v3"
EncodingType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-m
essage-security-1.0#Base64Binary"
wsu:Id="SecurityToken-439239a1-158e-40a2-b969-012afa36e061">.pYYjs=</wsse:Bi
narySecurityToken>

      <Signature xmlns="http://www.w3.org/2000/09/xmldsig#">

        <SignedInfo>

          <ds:CanonicalizationMethod
Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"
xmlns:ds="http://www.w3.org/2000/09/xmldsig#" />

          <SignatureMethod
Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1" />

          <Reference URI="#Id-1baa4d05-a59a-4b53-afc3-166cb8cfac10">

            <Transforms>

              <Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"
/>

            </Transforms>

            <DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"
/>

            <DigestValue>vXCPk+2yjstl9FhZlPq+lW+bbfg=</DigestValue>

          </Reference>

        </SignedInfo>

        <SignatureValue>.YQGsAtCQ=</SignatureValue>

        <KeyInfo>

          <wsse:SecurityTokenReference>

            <wsse:Reference
URI="#SecurityToken-439239a1-158e-40a2-b969-012afa36e061"
ValueType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-toke
n-profile-1.0#X509v3" />

          </wsse:SecurityTokenReference>

        </KeyInfo>

      </Signature>

    </wsse:Security>

  </SOAP:Header>

  <SOAP:Body
wsu:Id="Id-1baa4d05-a59a-4b53-afc3-166cb8cfac10">...</SOAP:Body>

</SOAP:Envelope>

 

 

Any help will be appreciated!

 

 


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message