Lucas Miller Derek Albaugh
Lucas, Derek,
I have GP WebServices installed and running. I’m trying to invoke sample service (GetCustomersList action), but getting this error:
-*-*-*----------------------------------------------------------------------------------------------------------------------------------------
<s:Fault>
<s:Code>
<s:Value>s:Sender</s:Value>
<s:Subcode>
<s:Value xmlns:a="schemas.xmlsoap.org/.../s:Value>
</s:Subcode>
</s:Code>
<s:Reason>
<s:Text xml:lang="en-US">The message could not be processed. This is most likely because the action 'schemas.microsoft.com/.../GetCustomerList' is incorrect or because the message contains an invalid or expired security context token or because there is a mismatch between bindings. The security context token would be invalid if the service aborted the channel due to inactivity. To prevent the service from aborting idle sessions prematurely increase the Receive timeout on the service endpoint's binding.</s:Text>
</s:Reason>
</s:Fault>
Based on my research it means that WSS headers required by the service are not provided, or incorrect.
Native endpoint is set to use wsHttpBinding with the following definition (default from WSBinding config file):
<security mode="Message">
<message clientCredentialType="Windows"/>
</security>
-*-*-*----------------------------------------------------------------------------------------------------------------------------------------
I tried to use these headers without any luck:
<soap:Header>
<wsse:Security mustUnderstand="1" xmlns:wsse="docs.oasis-open.org/.../oasis-200401-wss-wssecurity-secext-1.0.xsd">
<wsse:UsernameToken wsu:Id="UsernameToken-5700630" xmlns:wsu="docs.oasis-open.org/.../oasis-200401-wss-wssecurity-utility-1.0.xsd">
<wsse:Username>someUser</wsse:Username>
<wsse:UserTokenID>somePassword</wsse:UserTokenID>
</wsse:UsernameToken>
</wsse:Security>
</soap:Header>
-*-*-*----------------------------------------------------------------------------------------------------------------------------------------
Question:
What should be the SOAP header structure in order to meet this requirement and properly authenticate with the service?
I have a Windows user account with proper permissions to access Web Services.
Could somebody share an XML example?
I need a plain XML example, not a code to generate them.
Please help.