WCF
От: Alex_aa  
Дата: 13.10.10 16:01
Оценка:
Пишу WCF сервис (Soap11 without WS-Addressing) к которому будут обращатся запросами такого формата:

<?xml version="1.0" encoding="utf-8"?>
<soapenv:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
 <soapenv:Header>
  <wsse:Security xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity- secext-1.0.xsd"
  soapenv:mustUnderstand="1">
   <ds:Signature xmlns:ds="http://www.w3.org/2000/09/xmldsig#"
   Id="Signature-1234">
    <ds:SignedInfo>
     <ds:CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#" />
     <ds:SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#dsa-sha1" />
     <ds:Reference URI="#body">
      <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>[body digest value]</ds:DigestValue>
     </ds:Reference>
     <ds:Reference URI="#Timestamp">
      <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>[timestamp digest
      value]</ds:DigestValue>
     </ds:Reference>
    </ds:SignedInfo>
    <ds:SignatureValue>[signature value]</ds:SignatureValue>
    <ds:KeyInfo Id="KeyId-1234">
     <wsse:SecurityTokenReference xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/ oasis-200401-wss-wssecurity-utility-1.0.xsd"
     wsu:Id="STRId-1234">
      <ds:X509Data>
       <ds:X509IssuerSerial>
        <ds:X509IssuerName>[issuer
        name]</ds:X509IssuerName>
        <ds:X509SerialNumber>[serial
        number]</ds:X509SerialNumber>
       </ds:X509IssuerSerial>
      </ds:X509Data>
     </wsse:SecurityTokenReference>
    </ds:KeyInfo>
   </ds:Signature>
   <wsu:Timestamp xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss- wssecurity-utility-1.0.xsd"
   wsu:Id="timestamp">
    <wsu:Created>2010-08-20T16:34:32.257Z</wsu:Created>
    <wsu:Expires>2010-08-20T16:39:32.257Z</wsu:Expires>
   </wsu:Timestamp>
  </wsse:Security>
 </soapenv:Header>
 <soapenv:Body xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-...>
 .....
 </soapenv:Body>
</soapenv:Envelope>


customBinding with MutualCertificate security mode used for service.
С дотнетовским клиентом все хорошо, т.к. тот отправляет в запросе BinarySecurityToken а в данном примере его нет.
Что надо сделать что бы работало без BinarySecurityToken в запросе ?
 
Подождите ...
Wait...
Пока на собственное сообщение не было ответов, его можно удалить.