I have a simple WCF service application (.NET 3.5) that has the default code created by VS 2008 when I open a new project.
I have wshttpbinding with the following configuration in the web.config file.
<system.serviceModel> <services> <service name="WCFTestServiceApp.Service1" behaviorConfiguration="WCFTestServiceApp.Service1Behavior"> <endpoint address="" binding="wsHttpBinding" contract="WCFTestServiceApp.IService1" bindingConfiguration="binding1"> <identity> <dns value="localhost"/> </identity> </endpoint> <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange"/> </service> </services> <bindings> <wsHttpBinding> <binding name="binding1"> </binding> </wsHttpBinding> </bindings> <behaviors> <serviceBehaviors> <behavior name="WCFTestServiceApp.Service1Behavior"> <serviceMetadata httpGetEnabled="true"/> <serviceDebug includeExceptionDetailInFaults="true"/> </behavior> </serviceBehaviors> </behaviors> </system.serviceModel>
I launched this WCF application and was able to use VS 2008 WCFTESTCLIENT to send and receive messages. I can not do the same with the SoapUI tool. When I switch to basichttpBinding, it works like SOAP version 1.1. But wsHttpBinding (SOAP 1.2) does not seem to work.
The following are the reqest and response messages that I receive in the SoapUI tool.
Request
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:tem="http://tempuri.org/"> <soap:Header/> <soap:Body> <tem:GetData> <tem:value>3</tem:value> </tem:GetData> </soap:Body> </soap:Envelope>
answer
<s:Envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope" xmlns:a="http://www.w3.org/2005/08/addressing"> <s:Header> <a:Action s:mustUnderstand="1">http://www.w3.org/2005/08/addressing/soap/fault</a:Action> </s:Header> <s:Body> <s:Fault> <s:Code> <s:Value>s:Sender</s:Value> <s:Subcode> <s:Value xmlns:a="http://schemas.xmlsoap.org/ws/2005/02/sc">a:BadContextToken</s:Value> </s:Subcode> </s:Code> <s:Reason> <s:Text xml:lang="en-IN">The message could not be processed. This is most likely because the action 'http://tempuri.org/IService1/GetData' 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 binding.</s:Text> </s:Reason> </s:Fault> </s:Body> </s:Envelope>
Please advise how I should act. Any help is appreciated.
source share