Ciao a tutti,
sono alle prese con lo sviluppo in c# di un'applicazione per la comunicazione tramite web services(soap) cn l'anpr (anagrafe nazionale), server sogei, che implementano il ws-security con asserzione saml.
Mi sono creato la classe proxy tramite il wsdl e l'asserzione saml, sapreste darmi qualche consiglio su come andare avanti?? Ho cercato ci crearmi l'xml della richiesta a mano, ma con scarsi risultati, nel senso che ricevo sempre un errore di digest value.
vi posto un esempio della richiesta soap:

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Header xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<wsse:Security xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" soap:mustUnderstand="1">
<wsu:Timestamp wsu:Id="TS-657fcb15-67e5-4a56-8247-a49fcb4895e1">
<wsu:Created>2016-06-29T10:35:41.869Z</wsu:Created>
<wsu:Expires>2016-06-29T10:40:41.869Z</wsu:Expires>
</wsu:Timestamp>
<saml2:Assertion>
.
.
</saml2:Assertion>
<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="X509-75604798-bf2d-4dfc-bd7e-4c3809dca189">MI.......CKBKnhjO16pdv3Pp2u08cfsf</wsse:BinarySecurityToken>
<ds:Signature xmlns:ds="http://www.w3.org/2000/09/xmldsig#" Id="SIG-072ed36e-998c-4207-b225-5f70f1b86b5c">
<ds:SignedInfo>
<ds:CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">
<ec:InclusiveNamespaces xmlns:ec="http://www.w3.org/2001/10/xml-exc-c14n#" PrefixList="soap"/>
</ds:CanonicalizationMethod>
<ds:SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1"/>
<ds:Reference URI="#TS-657fcb15-67e5-4a56-8247-a49fcb4895e1"><ds:Transforms>
<ds:Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">
<ec:InclusiveNamespaces xmlns:ec="http://www.w3.org/2001/10/xml-exc-c14n#" PrefixList="wsse soap"/>
</ds:Transform></ds:Transforms><dsigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>
<dsigestValue>C9l/HIjqVd14HMT00FPMmRxia7I=</dsigestValue>
</ds:Reference>
<ds:Reference URI="#_776e8567-bfb6-4624-8acb-6585c855b594">
<ds:Transforms>
<ds:Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">
<ec:InclusiveNamespaces xmlns:ec="http://www.w3.org/2001/10/xml-exc-c14n#" PrefixList=""/>
</ds:Transform>
</ds:Transforms>
<dsigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>
<dsigestValue>gYmoUCItYGfBEujMc6cJFHn+r0w=</dsigestValue>
</ds:Reference>
</ds:SignedInfo>
<ds:SignatureValue>h2y12rJefVxwdlDTzJnHrs7hJFcKOMq jR6Dv4rxcyPX8yiYeQ6jwiZD7RxDEeAQq7yJD3OZERzEiaj48p xWThJYGIksj9PQibFYzspig==</ds:SignatureValue>
<ds:KeyInfo Id="KI-0f60b217-acb5-4fd9-b988-eb8a6f119ea1">
<wsse:SecurityTokenReference wsu:Id="STR-4e06cad8-ec4f-41f1-9e61-685db96be47a">
<wsse:Reference URI="#X509-75604798-bf2d-4dfc-bd7e-4c3809dca189" ValueType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profile-1.0#X509v3"/>
</wsse:SecurityTokenReference>
</ds:KeyInfo>
</ds:Signature>
</wsse:Security>
</SOAP-ENV:Header>
<soap:Body xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" wsu:Id="_776e8567-bfb6-4624-8acb-6585c855b594">
.
.
.
</soap:Body>
</soap:Envelope>

Grazie anticipatamente.