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:

| User | Count |
|---|---|
| 13 | |
| 8 | |
| 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.