I have a WCF service defined as follows:
[ServiceContract(Namespace = "http://AttributeServiceNameSpace", Name = "AttributeServiceName1")] public interface IHelloIndigoService1 { [OperationContract(Name="AttributeOperationName11", Action = "aaa2")] String HelloIndigo11(); [OperationContract(Name = "AttributeOperationName12", Action = "aaa1")] String HelloIndigo12(); }
And I captured the HTTP message during the service call, as shown below.
POST http: //xxx/Service.svc/IHelloIndigoServiceAddress1 HTTP / 1.1
Content-Type: text / xml; encoding = UTF-8
SOAPAction: " aaa2 "
Host: shao-02.fareast.corp.microsoft.com
Content-Length: 162
Expect: 100-continue
Connection: Keep-Alive
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"> <s:Body> <AttributeOperationName11 xmlns="http://AttributeServiceNameSpace"/> </s:Body> </s:Envelope>
So, we can see that the name Action and Operation both exist in the SOAP message to call the service.
But I'm just wondering: Why do we need an Action and an Operation Name to identify one service method? Only one should be enough.
source share