I need to call methods exposed by a wcf without specifying Action, how can I do? in the old web services services could be done by entering the attribute [SoapDocumentService (RoutingStyle = SoapServiceRoutingStyle.RequestElement)]
Thanks
For compatible with the old web service, WCF provides Basichttpbinding, we can use httpclient/httpwebrequest/webclient to build the HTTP request, then add the HTTP header “SOAPAction” to specify action need to be invoked, also we can set a SOAP message directly, if we follow this, the first child element which under the BODY tag in SOAP message will specify the Action.
For other WCF bindings, such as Webhttpbinding, you can specify Action in the URL, just like the Web API. In fact, we could generate the client proxy class by adding the service reference, and then use the client proxy class to invoke the service.
Besides, you could use the svcutil.exe to generate the client proxy class from metadata documents. https://learn.microsoft.com/en-us/dotnet/framework/wcf/servicemodel-metadata-utility-tool-svcutil-exe