Get soap exception when calling SAP webservice (HTTPS) in BizTalk 2010 using WSBasicHTTPBinding
I am calling SAP web service (HTTPS) in BizTalk 2010. I created a schema using the wcf service wizard. When I call the web service passing in the requested schema instance, I get the following error:
<SOAP:Fault xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/">
<faultcode>SOAP:Server</faultcode>
<faultstring>Server Error</faultstring>
<detail>
<s:SystemError xmlns:s="http://sap.com/xi/WebService/xi2.0">
<context>XIAdapter</context>
<code>ADAPTER.JAVA_EXCEPTION</code>
<text><![CDATA[ com.sap.aii.af.service.cpa.CPAException: com.sap.aii.af.service.cpa.impl.exception.CPALookupException: Couldn't retrieve inbound binding for the given P/S/A values: FP=;TP=;FS=null;TS=null;AN=null;ANS=null; at com.sap.aii.af.service.cpa.impl.lookup.CommonLookup.checkForError(CommonLookup.java:53) at com.sap.aii.af.service.cpa.InboundRuntimeLookup.getBinding(InboundRuntimeLookup.java:411) at com.sap.aii.af.service.cpa.impl.lookup.AbstractLookupManager.getBinding(AbstractLookupManager.java:714) at com.sap.aii.adapter.soap.web.MessageServlet.doPost(MessageServlet.java:427) at javax.servlet.http.HttpServlet.service(HttpServlet.java:754) at javax.servlet.http.HttpServlet.service(HttpServlet.java:847) ….. ……
]]></text>
</s:SystemError>
</detail>
</SOAP:Fault>
I tried to call webservice using SOAPUI tool and I got the correct answer. I traced the request coming out of the BizTalk sendPort (webservice call overHTTP-soap using the wcfBasicHTTP binding) using a script, the request looks fine and works in SOAPUI. I don't know why I am getting this particular soapy error on BizTalk. Any help is appreciated Thanks.
BizTalk Fiddler Dump (ordered order of HTTP headers)
POST localhost:8888 HTTP/1.1
Accept-Encoding: gzip, deflate
Content-Type: text/xml; charset=utf-8
SOAPAction: "sap.com/xi/WebService/soap1.1";
Content-Length: 2296
Host: localhost:8888
Expect: 100-continue
Connection: Keep-Alive
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Body>
<ns0:z xmlns:ns0="urn:sap-com:document:sap:rfc:functions">
........
</ns0:z>
</s:Body>
</s:Envelope>
SOAPUI Fiddler Dump
POST localhost:8888 HTTP/1.1
Accept-Encoding: gzip,deflate
Content-Type: text/xml;charset=UTF-8
SOAPAction: "sap.com/xi/WebService/soap1.1";
Content-Length: 2417
Host: localhost:8888
Proxy-Connection: Keep-Alive
User-Agent: Apache-HttpClient/4.1.1 (java 1.5)
<SOAP-ENV:Envelope xmlns:SOAP-ENV="schemas.xmlsoap.org/soap/envelope/";
xmlns:ns0="urn:sap-com:document:sap:rfc:functions">
<SOAP-ENV:Header/>
<SOAP-ENV:Body>
<ns0:z xmlns:ns0="urn:sap-com:document:sap:rfc:functions">
....
</ns0:z>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
source to share
I don't see anything obvious, perhaps other than the utf-8 script in the Content Type header.
And I assumed the payload for soap bodies (........) is identical - you can check if the Soap action is specified in the message as well as the header - I'm not sure if the SAP web service is SOAP 1.1 or 1.2 WCF Soap actions in HTTP header or SOAP header?
One could try to use the XmlTransmit send pipeline on your send port and experiment with the Preserve BOM (i.e. add / remove the UTF BOM on the payload), and also try to set the target encoding to yell UTF-8.
As a last resort, instead of using WebServices, try the AdUA Adapter Service for SAP - see here and here
source to share