on 2018 May 22 7:55 AM
Hello Experts,
I’m working on PI dual stack 7.30 , and have a scenaio RFC( ECC ) -> PI -> SOAP.(3rd).
Either in synchronized or asynchronize mode, the SOAP Receiver channel got an error:
SOAP: call failed: java.io.IOException: Cant parse the document; HTTP 200 OK.
The logs as below:

However, 3rd checked that the message had been received and got no error.
I have check that, 3rd response with text/utf-8 format message.

Then ,I tried to use Soap UI tool to call the soap service directly, everything is OK.
Even , I used the provided WSDL to generate client proxy in ECC to test the SOAP service, and with ABAP developers' help to call the service, and all is working fine.
The message by soap ui directly sent look like as below:

So, how could I overcome this error?
Please give me some advice.
Thanks in advance.
Request clarification before answering.
Hi Wu Feng,
Use below XSLT Code to "add soap-envelope" in your request message:
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml"/>
<xsl:template match="/">
<soap:Envelope
xmlns:soap="http://www.w3.org/2003/05/soap-envelope"
xmlns:ns0="http://tempuri.org/"
xmlns:a="http://www.w3.org/2005/08/addressing">
<soap:Header>
<a:Action soap:mustUnderstand="1">http://tempuri.org/DeviceCategoryInput</a:Action>
</soap:Header>
<soap:Body>
<xsl:copy-of select="."/>
</soap:Body>
</soap:Envelope>
</xsl:template>
</xsl:stylesheet>
Use below XSLT Code to extract body content from soap-envelope of response message:
<xsl:stylesheet version="1.0"
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:soap="http://www.w3.org/2003/05/soap-envelope" exclude-result-prefixes="SOAP-ENV">
<xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes" />
<xsl:template match="soap:Header"></xsl:template>
<xsl:template match="soap:Body">
<xsl:copy-of select="child::node()"/>
</xsl:template>
</xsl:stylesheet>
In operation mapping, Request Mapping Programs's sequence should be like:
and Request Mapping Programs's should be like:
In soap-receiver channel:
You please cross verify soap-request payload once message been triggered using above config.
Regards,
Dilip
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Dilip,
As 3rd system accept soap version 1.1 only, I change the response code:
<xsl:stylesheet version="1.0"
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" exclude-result-prefixes="SOAP-ENV">
<xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes" />
<xsl:template match="soap:Body">
<xsl:copy-of select="child::node()"/>
</xsl:template>
</xsl:stylesheet>
Now, I could read the response content
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!-- XML Validation Inbound Channel Response --> dc
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><ns2:DeviceCategoryInputResponse xmlns:ns2="http://tempuri.org/"><out>S</out></ns2:DeviceCategoryInputResponse></soap:Body></soap:Envelope>
0
and got new error
Während des XSLT-Mappings XLST_03CA8_SWTDGLXT2ERP_SBFL_Return
(http://test.org/NMMDM, 7dac07b0-3c70-11e8-cc02-d7560a808f6d, -1)
ist eine TransformerException aufgetreten.
And how could I remove the unexpected characters?
Hi Wu Feng,
Sorry, I was not able to access my profile due to privacy profile settings.
Its awesome!! finally you nailed it…..please find below comments for new issue:
In above case (with modified xsl at response side), output is like:
<ns2:DeviceCategoryInputResponse
xmlns:ns2="http://tempuri.org/"
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<out>S</out>
</ns2:DeviceCategoryInputResponse><br>
Reason of error in pi is due to soap namespace:
Here we need one more XSL to remove all extra namespaces, below xsl-code can be referred for same:
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml" indent="no"/>
<xsl:template match="/|comment()|processing-instruction()">
<xsl:copy>
<xsl:apply-templates/>
</xsl:copy>
</xsl:template>
<xsl:template match="*">
<xsl:element name="{local-name()}">
<xsl:apply-templates select="@*|node()"/>
</xsl:element>
</xsl:template>
<xsl:template match="@*">
<xsl:attribute name="{local-name()}">
<xsl:value-of select="."/>
</xsl:attribute>
</xsl:template>
</xsl:stylesheet><br>
which provides output as:
<DeviceCategoryInputResponse>
<out>S</out>
</DeviceCategoryInputResponse><br>
In operation mapping, Response-Tab Mapping Programs should be like:
Hope above helps you.
Thanks and regards,
Dilip
Hi Dilip,
The new error caused by extracting body content from soap-response.
The reason is there is "dc" before the soap content and "0" in the end of the soap content; and 3rd developers said that these two string would change as the message type changing.
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><ns2:DeviceCategoryInputResponse xmlns:ns2="http://tempuri.org/"><out>S</out></ns2:DeviceCategoryInputResponse></soap:Body></soap:Envelope>
Hi Wu Feng,
So, in that case at response side, instead of using XSLT code use JavaMap to extract Soap:Body part.
Because, XSLT Code's 1st pre-requisites is well-formed xml structure only.
In JavaMap, you can read incoming response message as a string and apply logic to extract content between <soap:Body> ....</soap:Body>
Thanks & Regards,
Dilip
Hi Dilip,
Thank you very much.
I have done that, and it is working.
Hi Wu Feng,
Thanks & Regards,
Dilip
1、Use below XSLT Code to "add soap-envelope" in request message:
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:outputmethod="xml"/><xsl:template match="/"><soap:Envelope
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:ns0="http://tempuri.org/"
<soap:Body><xsl:copy-ofselect="."/></soap:Body>
</soap:Envelope>
</xsl:template>
</xsl:stylesheet>
2、In operation mapping, Request Mapping :
and Response Mapping Program:
3、In soap-receiver channel:

Hi Wu Feng,
By looking in to your request payloads
[1] I got the reason of soap-fault message saying invalid namespace [when option unchecked "Do Not use soap Envelope"], that is,
<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:tem="http://tempuri.org/"
xmlns:a="http://www.w3.org/2005/08/addressing">
<soap:Header>
<a:Action soap:mustUnderstand="1">http://tempuri.org/DeviceCategoryInput</a:Action>
</soap:Header>
<soapenv:Body>
<tem:DeviceCategoryInput>
<DeviceCategorys>
<!--1 or more repetitions:-->
<DeviceCategory>
<CLASS>P001</CLASS>
<KSCHL>test</KSCHL>
<P_CLASS>H01</P_CLASS>
<P_KSCHL>Furnace</P_KSCHL>
<STATU>Approved</STATU>
<ADATU>20180522</ADATU>
<VDATU>20180522</VDATU>
</DeviceCategory>
</DeviceCategorys>
</tem:DeviceCategoryInput>
</soapenv:Body>
</soapenv:Envelope>
[2] With option "un-check", its good that, you have confirmation of soap-request receipts at 3rd party end is been sent successfully.
Meanwhile, can you try config type [1] all suggested steps in PI ? Here too may come same error while response receipts.
Thanks & Regards,
Dilip
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
I got soap-response from log, no need to re-attach.
Mean while, please try type [1] config, if possible.
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><ns2:DeviceCategoryInputResponse xmlns:ns2="http://tempuri.org/"><out>S</out></ns2:DeviceCategoryInputResponse></soap:Body></soap:Envelope>
Hi Wu Feng,
When working with "uncheck" option for "Do Not use soap Envelope", in response mapping, do you have logic to extract element "DeviceCategoryInputResponse" soap-envelope response ?
You need that too, this can be tried out in both config types, can be achieved using XSLT.
Hi Dilip,
I'm not familiar with XSLT MAPPING.
If generating the Soap-Request format, do I need to change the target message type?
And the Mapping code like below?
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="XML" indent="YES" />
<xsl:template match="/">
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:tem="http://tempuri.org/"
xmlns:a="http://www.w3.org/2005/08/addressing">
<soap:Header>
<a:Action soap:mustUnderstand="1">http://tempuri.org/DeviceCategoryInput</a:Action>
</soap:Header>
<soapenv:Body>
<tem:DeviceCategoryInput>
<DeviceCategorys>
<xsl:for-each select="Z_PM_MASTERDATA_SBFLTX_SEND/IT_CLAS_ATTRIBS/item">
<DeviceCategory>
<xsl:variable name="CLASS" select="CLASS" />
<xsl:variable name="KSCHL" select="KSCHL" />
<xsl:variable name="P_CLASS" select="P_CLASS" />
<xsl:variable name="P_KSCHL" select="P_KSCHL" />
<xsl:variable name="STATU" select="STATU" />
<xsl:variable name="ADATU" select="ADATU" />
<xsl:variable name="VDATU" select="VDATU" />
</DeviceCategory>
</xsl:for-each>
</DeviceCategorys>
</tem:DeviceCategoryInput>
</soapenv:Body>
</soapenv:Envelope>
</xsl:template>
</xsl:stylesheet>
Hi,
One more observation, in soap-ui's response payload, there is no header present.
As per wsdl too, your response payload should be like below, please ask 3rd part team for this.
<soap:Envelope
xmlns:a="http://www.w3.org/2005/08/addressing"
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Header>
<a:Action s:mustUnderstand="1">http://tempuri.org/DeviceCategoryInput</a:Action>
</soap:Header>
<soap:Body>
<ns2:DeviceCategoryInputResponse
xmlns:ns2="http://tempuri.org/">
<out>S</out>
</ns2:DeviceCategoryInputResponse>
</soap:Body>
</soap:Envelope>
At our side too, when my service works with soap-action, it returns that info in header of soap-response.
Hi Dilip,
It is not resolved yet.
1、The request payload and soap ui message of using the option "Do Not use soap Envelope" has been attached now , see attachments:
paload-1657dc38-5036html000016.txt
the service definition and http logs in SOAP UI tool when calling the service are:
2、“uncheck the option "Do Not use soap Envelope" 3rd system receive messages successfully" , it is confirmed by 3rd system developers. They found messages saved in database, and the receiving time is the same as sending message.
However, I could not find out the response payload by SXMb_Moni, but error message "
com.sap.engine.interfaces.messaging.api.exception.MessagingException: java.io.IOException: Can't parse the document; HTTP 200 OK"
?In my last reply, the figure logs is got by path Configuration and Monitoring Home -> Monitoring -> Adapter Engine -> Message MOnitor.
I think, the error is generated when parsing the response message.
3、WSDL document is not RPC-style , when using RPC-style, message types can't be displayed.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Wu Feng,
In PI's SXMB_Moni, check below:
[1st]
[2nd]
Also cross verify in SOAP Receiver channel:

Hope above helps you
Thanks & Regards
Dilip
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Dilip,
Thank your reply.
I configured the soap receive channel as you advised, it don't work.
From monitor tool, I could see the message sent to receiver channel is the same as soap UI called the service directly.
When I checked 'Do Not use soap Envelope' option, it got error as below shown.( OT_return is an element of response message in sender side)

But if not checked 'Do Not use soap Envelope' option, the result is the same error as before.

Hi Wu Feng,
Just provide inputs for below queries:
Regards,
Dilip
Hi Dilip,
"MM_MASTER_DATA_SBFL_RETURN" is the response message mapping.
When checked the option "Do Not use soap Envelope", the inbound payload like this:

"DeviceCategoryInput" Is the request message name, and "http://tempuri.org/" is the namespace of "DeviceCategoryInput".
I have checked that, the payload in the path Original Message -> Adapter Call -> payload consist of the content :
<?xml version="1.0" encoding="UTF-8" ?><ns1:DeviceCategoryInput xmlns:ns1="http://tempuri.org/">
And some time later,review the message, the response node do not present, looks like as below:

The service has attribute soapAction, no other header attributes.
Another thing, from the communicate channel monitor, the receiver channel, has the following logs, and the message not received by 3rd system.
SOAP: request message entering the adapter with user J2EE_GUEST
SOAP: completed the processing
SOAP: continuing to response message d4c5eb36-5e62-11e8-a912-00000076e6de23.05.2018
MP: processing local module localejbs/AF_Modules/MessageTransformBean
Message delivered to the application using connection SOAP_http://sap.com/xi/XI/System23.05.2018
Message status set to DLVD
Hi Wu Feng,

Thanks & Regards,
Dilip
Hi Wu Feng,
When you received soap:fault message in response, it's about soap:version mismatch and invalid namespace in request, to cross verify, can you provide request payloads of "Soap-UI" and "SXMB_MONI of SAP-PI", need to compare.
And about other test case,

If you get it resolved, please let me know, I'm too interested for this type of error resolution.
Regards,
Dilip
| User | Count |
|---|---|
| 13 | |
| 9 | |
| 7 | |
| 5 | |
| 4 | |
| 3 | |
| 2 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.