Forum Xamarin.Forms

Does Xamarin not support SOAP 1.2? How to make SOAP 1.2 requests?

phantonymphantonym Member ✭✭
edited February 2018 in Xamarin.Forms

I am trying to make calls to a web service that supports SOAP 1.2. But my requests fail because the action parameter is not added in Content-Type as required:

Content-Type: application/soap+xml; charset=utf-8; action="link-to-action"

The docs state:

The Xamarin platform supports standard SOAP 1.1 implementations over HTTP

Does Xamarin not support SOAP version 1.2? I know ASP.NET Web Forms supports it, and the same code can be run there with success. How can I make calls to SOAP 1.2 service?

I tried to override the header with this, but it doesn't change.

[System.Web.Services.WebServiceBindingAttribute(Name="TheService", Namespace="link-to-ns")]
public partial class TheService : SoapHttpClientProtocol
    protected override WebRequest GetWebRequest(Uri uri)
        var request = base.GetWebRequest(uri);
        request.ContentType = "application/soap+xml; charset=utf-8; action=\"link-to-action\"";
        return request;
Sign In or Register to comment.