Skip to Content
0
Former Member
Aug 10, 2016 at 09:18 AM

Can PI accept escape character in SOAP envelope?

552 Views

Hi Guys,

I'm trying to send SOAP message which has message with escape characters in SOAP Body using SOAP UI tool and I'm getting below error

<s:SystemError xmlns:s='http://sap.com/xi/WebService/xi2.0'>

<context>XIAdapter</context>

<code>ADAPTER.JAVA_EXCEPTION</code>

<text><![CDATA[

Unexpected content in SOAP:Body; nested exception caused by:

com.sap.aii.af.sdk.xi.util.XMLScanException: Unexpected content in SOAP:Body

Structure: I have not pasted the complete structure.

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
   <soapenv:Header/>
   <soapenv:Body>
      <SiebelMessage MessageId="?" MessageType="Integration Object" IntObjectName="H" IntObjectFormat="Siebel" MsgType="?" BatchId="?">
         <!--Optional:-->
         <ListOfFinancialLineItems>
            <!--Zero or more repetitions:-->
            <FinancialLineItem>
               <!--Optional:-->
               <Id>?</Id>
               <!--Optional:-->
               <PaymentType>?</PaymentType>
               <!--Optional:-->
               <PlanId>?</PlanId>
               <!--Optional:-->
               <Amount>?</Amount>
               <!--Optional:-->

Trying to send below message through SOAP UI:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
   <soapenv:Header/>
   <soapenv:Body>
&lt;SiebelMessage
 MessageId=&quot;1&quot;
 MessageType=&quot;Integration Object&quot;
 IntObjectName=&quot;H&quot;
 IntObjectFormat=&quot;Siebel&quot;
 MsgType=&quot;Payment&quot;&gt;&lt;ListOfFinancialLineItems&gt;
&lt;FinancialLineItem&gt;&lt;Id&gt;1&lt;/Id&gt;
&lt;PaymentType&gt;Payment&lt;/PaymentType&gt;
&lt;PlanId&gt;1&lt;/PlanId&gt;
&lt;Amount&gt;4&lt;/Amount&gt;

Getting below error:

?xml version='1.0'?>

<!-- see the documentation -->

<SOAP:Envelope xmlns:SOAP='http://schemas.xmlsoap.org/soap/envelope/'>

<SOAP:Body>

<SOAP:Fault>

<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[

Unexpected content in SOAP:Body; nested exception caused by:

com.sap.aii.af.sdk.xi.util.XMLScanException: Unexpected content in SOAP:Body

In PI we have XSLT mapping written which will convert CDATA into XML and map it with source structure and process the same.

My question here is whether PI can accept CDATA or not, if yes, then what changes do I need to make in SOAP Sender channel to accept the CDATA?

I have tried using MTB in the channel and calling the XSLT code to convert the CDATA into XML but it did not work.

Let me know if there are any options to post this data into PI?

Thanks.

Regards,

AJ