Quantcast
Channel: Claims based access platform (CBA), code-named Geneva forum
Viewing all articles
Browse latest Browse all 2535

WS-Trust namespace problem - WSTrustSerializationException: ID3007: The element 'AppliesTo' with namespace 'http://www.w3.org/ns/ws-policy' is unrecognized.

$
0
0

I need to request a security token from an ADFS service deployed in Microsoft ADFS 2.0 server.

The service is https://yourcompany.com/adfs/services/trust/13/UsernameMixed

I have the below Soap envelope (generated from ADFS 2.0 Server's WSDL) that I post to the server,

<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope"><soap:Header><Action xmlns="http://www.w3.org/2005/08/addressing">http://docs.oasis-open.org/ws-sx/ws-trust/200512/RST/Issue</Action><MessageID xmlns="http://www.w3.org/2005/08/addressing">urn:uuid:e49f823f-938c-4891-af7a-50785daa341d</MessageID><To xmlns="http://www.w3.org/2005/08/addressing" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" wsu:Id="Id-1280721692">https://yourcompany.com/adfs/services/trust/13/usernamemixed</To><ReplyTo xmlns="http://www.w3.org/2005/08/addressing"><Address>http://www.w3.org/2005/08/addressing/anonymous</Address></ReplyTo><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="true"><wsu:Timestamp wsu:Id="TS-95D9398249ED135AE8138537380334211"><wsu:Created>2013-11-25T10:03:23.342Z</wsu:Created><wsu:Expires>2013-11-25T10:08:23.342Z</wsu:Expires></wsu:Timestamp><wsse:UsernameToken wsu:Id="UsernameToken-95D9398249ED135AE8138537380334212"><wsse:Username>NA</wsse:Username><wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">NA</wsse:Password></wsse:UsernameToken></wsse:Security></soap:Header><soap:Body><wst:RequestSecurityToken xmlns:wst="http://docs.oasis-open.org/ws-sx/ws-trust/200512"><wst:RequestType>http://docs.oasis-open.org/ws-sx/ws-trust/200512/Issue</wst:RequestType><wsp:AppliesTo xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy"><wsa:EndpointReference xmlns:wsa="http://www.w3.org/2005/08/addressing"><wsa:Address>http://my.endpoint</wsa:Address></wsa:EndpointReference></wsp:AppliesTo><wst:TokenType>http://docs.oasis-open.org/wss/oasis-wss-saml-token-profile-1.1#SAMLV2.0</wst:TokenType><wst:Lifetime xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"><wsu:Created>2013-11-25T10:03:23.340Z</wsu:Created><wsu:Expires>2013-11-25T10:03:31.340Z</wsu:Expires></wst:Lifetime><wst:KeyType>http://docs.oasis-open.org/ws-sx/ws-trust/200512/Bearer</wst:KeyType></wst:RequestSecurityToken></soap:Body></soap:Envelope>


However I keep getting the below error in the ADFS server,

The Federation Service encountered an error while processing the WS-Trust request. 
Request type: http://docs.oasis-open.org/ws-sx/ws-trust/200512/RST/Issue 

Additional Data 
Exception details: 
Microsoft.IdentityModel.Protocols.WSTrust.WSTrustSerializationException: ID3007: The element 'AppliesTo' with namespace 'http://www.w3.org/ns/ws-policy' is unrecognized.
   at Microsoft.IdentityModel.Protocols.WSTrust.WSTrustSerializationHelper.ReadRSTXml(XmlReader reader, RequestSecurityToken rst, WSTrustSerializationContext context, WSTrustConstantsAdapter trustConstants)
   at Microsoft.IdentityModel.Protocols.WSTrust.WSTrust13RequestSerializer.ReadXmlElement(XmlReader reader, RequestSecurityToken rst, WSTrustSerializationContext context)
   at Microsoft.IdentityServer.Protocols.WSTrust.MSISWSTrust13RequestSerializer.ReadXmlElement(XmlReader reader, RequestSecurityToken rst, WSTrustSerializationContext context)
   at Microsoft.IdentityModel.Protocols.WSTrust.WSTrustSerializationHelper.CreateRequest(XmlReader reader, WSTrustSerializationContext context, WSTrustRequestSerializer requestSerializer, WSTrustConstantsAdapter trustConstants)
   at Microsoft.IdentityModel.Protocols.WSTrust.WSTrustServiceContract.CreateDispatchContext(Message requestMessage, String requestAction, String responseAction, String trustNamespace, WSTrustRequestSerializer requestSerializer, WSTrustResponseSerializer responseSerializer, WSTrustSerializationContext serializationContext)
   at Microsoft.IdentityModel.Protocols.WSTrust.WSTrustServiceContract.BeginProcessCore(Message requestMessage, WSTrustRequestSerializer requestSerializer, WSTrustResponseSerializer responseSerializer, String requestAction, String responseAction, String trustNamespace, AsyncCallback callback, Object state)

Can someone please help to understand what is going wrong here...










Viewing all articles
Browse latest Browse all 2535

Trending Articles