我在 BizTalk 2010 中调用 SAP webservice(HTTPS)。我使用使用 wcf 服务向导生成了架构。当我通过传递请求的模式实例调用 web 服务时,我收到以下错误消息:
<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>
我尝试使用 SOAPUI 工具调用 web 服务,并且收到了正确的响应。我使用提琴手跟踪了从 BizTalk sendPort 发出的请求(使用 wcfBasicHTTP 绑定调用 webservice overHTTP-soap),该请求看起来很好并且在 SOAPUI 中工作。我不知道为什么我会在 BizTalk 中收到这个特定的肥皂错误。感谢任何帮助。
BizTalk Fiddler 转储(HTTP 标头顺序重新排列)
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 提琴手转储
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>