Hello all,

I need to connect to WS developed with C#... using axis2.
Everything is fine with axis2 but I could not understand how to use Microsoft's policy file here.

What do you think? Is it possible?


Without this file I have

Exception in thread "main" org.apache.axis2.AxisFault: Microsoft.Web.Services2.Policy.PolicyVerificationException: WSE402: The message does not conform to the policy it was mapped to. at Microsoft.Web.Services2.Policy.SimplePolicyVerifier.VerifyMessageWithExpression(PolicyExpression expression, SoapEnvelope message, EndpointReference endpoint, String action, Uri requestEndpoint) at Microsoft.Web.Services2.Policy.SimplePolicyVerifier.Verify(SoapEnvelope message) at Microsoft.Web.Services2.Policy.PolicyVerificationInputFilter.ProcessMessage(SoapEnvelope envelope) at Microsoft.Web.Services2.Pipeline.ProcessInputMessage(SoapEnvelope envelope) at Microsoft.Web.Services2.WebServicesExtension.BeforeDeserializeServer(SoapServerMessage message) at org.apache.axis2.description.OutInAxisOperationClient.execute(OutInAxisOperation.java:308)
       at xxx
       at xxx.Client.main(Client.java:11)


Here is header of policy file:

<?xml version="1.0" encoding="utf-8"?>
<policyDocument xmlns="http://schemas.microsoft.com/wse/2003/06/Policy";>
 <mappings xmlns:wse="http://schemas.microsoft.com/wse/2003/06/Policy";>
<!--The following policy describes the policy requirements for the service: http://XXX.asmx .-->
   <endpoint uri="Http://XXX.asmx">
     <defaultOperation>
       <request policy="#Sign-SCT" />
       <response policy="#Sign-SCT-1" />
       <fault policy="" />
     </defaultOperation>
<operation requestAction="http://schemas.xmlsoap.org/ws/2004/04/security/trust/RST/SCT";>
       <request policy="#Sign-Username" />
       <response policy="#Sign-X.509" />
       <fault policy="" />
     </operation>
   </endpoint>
....
 </mappings>
<policies xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"; xmlns:wsp="http://schemas.xmlsoap.org/ws/2002/12/policy"; xmlns:wssp="http://schemas.xmlsoap.org/ws/2002/12/secext"; xmlns:wse="http://schemas.microsoft.com/wse/2003/06/Policy"; xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"; xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/03/addressing";>
   <wsp:Policy wsu:Id="Sign-Username">
<wsp:MessagePredicate wsp:Usage="wsp:Required" Dialect="http://schemas.xmlsoap.org/2002/12/wsse#part";>wsp:Body() wsp:Header(wsa:To) wsp:Header(wsa:Action) wsp:Header(wsa:MessageID) wse:Timestamp()</wsp:MessagePredicate>
     <wssp:Integrity wsp:Usage="wsp:Required">
...

--
WBR,
Mikhail


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to