I'm trying to consume a web service that uses Soap 1.2.
Added the WSDL reference and using VS-generated proxy class:
var client = new MyApp.Droid.MyWS.AuthService();
var response = client.InitSession();
From generated Reference.cs:
[System.Web.Services.WebServiceBindingAttribute(Name="AuthService", Namespace="link-to-namespace")]
public partial class AuthService : SoapHttpClientProtocol
public AuthService()
{
SoapVersion = System.Web.Services.Protocols.SoapProtocolVersion.Soap12;
...
}
[SoapDocumentMethod("link-to-action", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = SoapParameterStyle.Bare)]
public SResponse InitSession(InitSessionRequest request)
{
...
My request fails because the action parameter is not included in the HTTP header:
Content-Type: application/soap+xml; charset=utf-8
Required header:
Content-Type: application/soap+xml; charset=utf-8; action="link-to-action"
Meanwhile, the same code works successfully in ASP.NET Web Forms.
Is there maybe a mistake with Mono's implementation of SoapHttpClientProtocol or its parent classes?