We've got a WCF service with BasicHttpBinding and tested it via SoapUI.
My co-worker can post the requests just fine, but on my machine I get the following error returned:
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Body>
<s:Fault>
<faultcode xmlns:a="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">a:InvalidSecurity</faultcode>
<faultstring xml:lang="de-AT">The caller was not authenticated by the service.</faultstring>
</s:Fault>
</s:Body>
</s:Envelope>
I'm pretty clueless as to why it doesn't work on my machine. IIS Settings are the same, too. A typical "It works on MY machine!" problem...
Am testing a WCF service with a sample input in SOAPUI. when i hit the run,I get an SOAP Exception like below:
<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/fault</a:Action>
</s:Header>
<s:Body>
<s:Fault>
<s:Code>
<s:Value>s:Sender</s:Value>
<s:Subcode>
<s:Value>a:ActionMismatch</s:Value>
</s:Subcode>
</s:Code>
<s:Reason>
<s:Text xml:lang="en-US">The SOAP action specified on the message, '', does not match the HTTP SOAP Action, 'http://XXX.XX.XXXX/IXXXXXX/AddOrderInfromation'.</s:Text>
</s:Reason>
<s:Detail>
<a:ProblemHeaderQName>a:Action</a:ProblemHeaderQName>
</s:Detail>
</s:Fault>
</s:Body>
</s:Envelope>
In blogs, they are asking to add Soap Action . How to Add Soap Action in my request below:
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:wkus="http://XXX.XX.XXXX/IXXXXXX">
<soap:Header />
<soap:Body>
<ns1:AddOrderInfromation>
<!--Optional:-->
<ns1:inputsting>
<ns1:AddOrderInfromation>
<ns1:OrderNo>4500146</ns1:OrderNo>
<ns1:OrderDate>08/22/2014</ns1:OrderDate>
<ns1:TotalItems>1</ns1:TotalItems>
</ns1:AddOrderInfromation>
</ns1:inputsting>
</ns1:AddOrderInfromation>
Please Suggest. Thanks in Advance
This is probably a WS-A addressing issue.
In the WS-A tab of your Request, check Enable WS-A addressing.
You may also have to check Add default was:To.
Your web service is returning a SOAPFault which is saying that web service expects a SOAP Action http header. In order to add a SOAP action in your SOAP request from SOAPUI you must add a http header named SOAPAction, to do so do the next step:
In the bottom of your SOAP test request there are some tabs (Header(0), Attachments(0)...), open the Header(0) tab.Then using + add button, add a header with SOAPAction name and your value:
hope this helps,
I had this problem too, and solved it by enabling WS-A addressing in SopaUI.
screenshot from SoapUI
This error also occurs due to improper syntax in xml request
For Eg : It will throw same error if
closing tag is missing
</soap:Body>
</soap:Envelope>
in below code
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:wkus="http://XXX.XX.XXXX/IXXXXXX">
<soap:Header />
<soap:Body>
<ns1:AddOrderInfromation>
<ns1:inputsting>
<ns1:AddOrderInfromation>
<ns1:OrderNo>4500146</ns1:OrderNo>
<ns1:OrderDate>08/22/2014</ns1:OrderDate>
<ns1:TotalItems>1</ns1:TotalItems>
</ns1:AddOrderInfromation>
</ns1:inputsting>
</ns1:AddOrderInfromation>
or if having unexpected syntax like this
<ns1:OrderNo>4500146**<ns1:OrderNo>**
instead of
<ns1:OrderNo>4500146**</ns1:OrderNo>**
or this
<ns1:**OrderNo**4500146</ns1:OrderNo>
instead of
<ns1:**OrderNo>**4500146</ns1:OrderNo>
I have just encountered similar problem. And I solved the issue like below;
https://blabla.com/xyz.svc?wsdl -->go to the wsdl url on browser and you will see some actions inside methods;
I use python for development and i added soapAction like below;
headers = {'Content-type': 'text/xml;charset=UTF-8',
'SOAPAction': 'http://tempuri.org/IArasCargoIntegrationService/GetQueryXML'
}
and it worked.
I am trying to access a https Java webservice from .net client but always end up with "504 Gateway Timeout" exception.
I could get the response from the same webservice using SoapUI.
I also noticed that the request soap message of SoapUI and .net client aren't similar. My question is, does the wrong format of message gives the "504 Gateway Timeout" problem ? if yest, How could i modify the soap message in .net client?
Here are the request soap message that two different app generates:
SoapUI
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:v1="http://company.domain.com/EchoService/v1_00">
<soapenv:Header/>
<soapenv:Body>
<v1:Echo>test</v1:Echo>
</soapenv:Body>
</soapenv:Envelope>
.NET client
{<s:Envelope xmlns:a="http://www.w3.org/2005/08/addressing" xmlns:s="http://www.w3.org/2003/05/soap-envelope">
<s:Header>
<a:Action s:mustUnderstand="1">Echo</a:Action>
<a:MessageID>urn:uuid:7a76925d-5bf0-4f2d-a9c5-c5a026e1eefb</a:MessageID>
<a:ReplyTo>
<a:Address>http://www.w3.org/2005/08/addressing/anonymous</a:Address>
</a:ReplyTo>
</s:Header>
<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<Echo xmlns="http://company.domain.com/EchoService/v1_00">test</Echo>
</s:Body>
</s:Envelope>}
sorry, folks nothing to do with wcf binding or soap message but the proxy was blocking the request. SoapUI could send/receive the message because it doesn't use proxy. just changed useDefaultWebProxy="false" in binding section of configuration.
I'm trying to implement a custom WCF service client. Server uses wsHttpBinding and message security with no client credentials. I have to programically form a proper soap envelope to begin TLS handshake. I've captured initial request from standard WCF client. The message looks like this:
<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://schemas.xmlsoap.org/ws/2005/02/trust/RST/Issue</a:Action>
<a:MessageID>urn:uuid:f88d1721-29ce-4418-994e-a3796f053e63</a:MessageID>
<a:ReplyTo>
<a:Address>http://www.w3.org/2005/08/addressing/anonymous</a:Address>
</a:ReplyTo>
<a:To s:mustUnderstand="1">http://localhost:56635/Service1.svc</a:To>
</s:Header>
<s:Body>
<t:RequestSecurityToken xmlns:t="http://schemas.xmlsoap.org/ws/2005/02/trust" Context="uuid-6549ee11-0349-4dbc-8686-6b7f0b079251-1">
<t:TokenType>http://schemas.xmlsoap.org/ws/2005/02/sc/sct</t:TokenType>
<t:RequestType>http://schemas.xmlsoap.org/ws/2005/02/trust/Issue</t:RequestType>
<t:KeySize>256</t:KeySize>
<t:BinaryExchange ValueType="http://schemas.xmlsoap.org/ws/2005/02/trust/tlsnego" EncodingType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary">FgMBAFoBAABWAwFPQ8mbvU/nL8Cgu/CRIhhvVyRAYNdppNpdUY2UEi/GLQAAGAAvADUABQAKwBPAFMAJwAoAMgA4ABMABAEAABX/AQABAAAKAAYABAAXABgACwACAQA=</t:BinaryExchange>
</t:RequestSecurityToken>
</s:Body>
</s:Envelope>
The problem is, I can't figure out what value I should encode and insert into the BinaryExchange tag. Any help would be appreciated.
you do not want to go that path. there are two complex standards involved (ws-secureconversation and ssl nego). each one includes multiple message exchanges. You will need to work really hard to get all the signed and encrypted parts right. You should use the regular WCF client.
I want to find out what the element below means:
<a:To s:mustUnderstand="1">http://localhost/w.Web/service.svc</a:To>
It seems that the WCF service still process the soap request when the url is wrong.
Why is it not in the SOAP message I saw in other sites?
Any idea?
<s:Envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope" xmlns:a="http://www.w3.org/2005/08/addressing">
<s:Header>
<a:ReplyTo>
<a:Address>http://www.w3.org/2005/08/addressing/anonymous</a:Address>
</a:ReplyTo>
<a:To s:mustUnderstand="1">http://localhost/w.Web/service.svc</a:To>
</s:Header>
<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
...
</s:Body>
</s:Envelope>
To header is part of WS-Addressing protocol. It defines the destination of the message (it can be used for example by message routers to pass message to the real destination). It is included in SOAP message only if it uses WS-Addressing. WCF always uses addressing when WsHttpBinding is used.