A synchronous business scenarios, SAP CE call web service on SFDC.
SAP CE发出请求后没有收到回复,查看SOAP receiver adapter的audit log发现下面的错误:
Error Adapter Framework caught exception: SOAP:
response message contains an error XIAdapter/HTTP/ADAPTER.HTTP_EXCEPTION - HTTP
500 Internal Server Error
Error MP: exception caught with cause
com.sap.engine.interfaces.messaging.api.exception.MessagingException: SOAP:
response message contains an error XIAdapter/HTTP/ADAPTER.HTTP_EXCEPTION - HTTP
500 Internal Server Error
Error SOAP: response message contains an error
XIAdapter/HTTP/ADAPTER.HTTP_EXCEPTION - HTTP 500 Internal Server Error
用SOAP UI模拟PI的SOAP request得到下面的回复:
<?xml
version="1.0"?>
<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<soapenv:Fault>
<faultcode>soapenv:Client</faultcode>
<faultstring>System.NullPointerException: Attempt to de-reference
a null object
Class.CCWSOrderCreateFromExternal.prepareTransmitRetValue:
line 1211, column 1
Class.CCWSOrderCreateFromExternal.transmit:
line 53, column 1</faultstring>
</soapenv:Fault>
</soapenv:Body>
</soapenv:Envelope>
为什么这样的回复会导致adapter framework抛出异常? SAP Note 1533195解释道:
After Note 1109648:
The received SOAP faults are treated as adapter framework internal errors and again treated further as HTTP 500 "Internal Server Error". No payload follows to this message, as it is treated as unsuccessful in the Adapter Framework.
Before Note 1109648:
The received SOAP faults are treated further as HTTP 500 Internal Server Error and sent to Integration Engine. The payload with the fault XML follows. The message is successful in the Adapter Framewrok.
To get the behavior vor note 1109648:
for the default module sap.com/com.sap.aii.af.soapadapter/XISOAPAdapterBean,set
Module Key = soap
Parameter Name = noSOAPMakeSysErrFromResponseFault
Parameter Value = false (default value is true)
Module Key = soap
Parameter Name = noSOAPMakeSysErrFromResponseFault
Parameter Value = false (default value is true)
The HTTP status code check for the no-soap mode of the SOAP receiver adapter can be disabled by the following module parameter for the SOAP adapter module
parameter name: XMBWS.NoSOAPIgnoreStatusCode
parameter value: true or false (default is false)
Setting the above parameter to true will configure the SOAP receiver adapter to ignore the HTTP status code.
没有评论:
发表评论