Calling WCF Services from ABAP

I’m writing an ABAP application that needs to call a back end .NET web service which is written using Windows Communication Foundation. When creating a running WCF web service out of the box, ABAP could not connect to the web service.

The problem

The SAP HTTP Client returns „Cannot process the message because the content type ‘text/xml; charset=utf-8′ was not the expected type ‘application/soap+xml; charset=utf-8′.

The reason

WCF is running a newer version of web services than expected by the ABAP HTTP Client.

The solution

Change the binding type of the WCF service from „wsHttpBinding“ to „basicHttpBinding“ in „web.config„.
This ensures that your .NET web service would support clients and other services that conform to the WS-I standards.

On the ABAP side double check that the namespace and the SOAPAction are correct. If you get a message like „SOAP fault“ then your SOAP action is wrong. Believe me 😉

 

Schreibe einen Kommentar

Deine E-Mail-Adresse wird nicht veröffentlicht.