cancel
Showing results for 
Search instead for 
Did you mean: 

SOAP Receiver error

vadim_laas
Explorer
0 Kudos

Hi together,

I try to establish a connection to a webservice over soap protocol.

The  integration process: synchronous Abap Proxy <-> SAP PI (7.1) <-> Web Service.


In the inbound communication channel I have set parameter "do not use SOAP Envelope". The soap envelope is created by XSLT mapping.


Message content:

<?xml version="1.0" encoding="UTF-8" ?>

- <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:reg="http://regis_tr_xml_load" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

<soapenv:Header />

- <soapenv:Body>

- <ns1:send_xml xmlns:ns1="http://regis_tr_xml_load">

<user>ME</user>

<password>XXXX</password>

<loaded_xml><![CDATA[<?xml version="1.0" encoding="UTF-8" standalone="yes"?><reportingOperations xmlns="http://regis-tr.com/schema/2012/1.1.0/Reporting"><reportingOperation>
........
</reportingOperation></reportingOperations>]]></loaded_xml>

</ns1:send_xml>

</soapenv:Body>

</soapenv:Envelope>

As response I get following error message:


<?xml version="1.0" encoding="UTF-8" ?>

- <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

- <soapenv:Body>

- <ns1:send_xmlResponse soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns1="http://regis_tr_xml_load">

<send_xmlReturn xsi:type="xsd:string">Error: Invalid format FATAL ERROR at 1,3: The markup in the document preceding the root element must be well-formed.</send_xmlReturn>

</ns1:send_xmlResponse>

</soapenv:Body>

</soapenv:Envelope


If i try to send the message with the same content over SOUP UI  works fine.

I have tried different settings but have no success.


Thanks,


Vadim


Accepted Solutions (0)

Answers (3)

Answers (3)

vadim_laas
Explorer
0 Kudos

Hi Can,

if I put the same content into SOAP UI tool it works fine.

Response:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

   <soapenv:Body>

      <ns1:send_xmlResponse soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns1="http://regis_tr_xml_load">

         <send_xmlReturn xsi:type="xsd:string"/>

      </ns1:send_xmlResponse>

   </soapenv:Body>

</soapenv:Envelope>

     So from my point of view it could not be the error in the XML format.

      The only difference I have found till now is that SOAP UI send the message with content-type "text/xml". And in the transaction SXMB_MONI of SAP PI I see content-type "application/xml).

     Could it be a problem?

     Regards,

     Vadim



iaki_vila
Active Contributor
0 Kudos

Hi Vadim,

The content-type can give problems too. Have you checked the XML sxmb_moni  with notepad editor in order to view if the tags are correctly interpreted?

Also with the XSL you can control the content-type and this instruction:

<xsl:output

method="xml|html|text|name"

version="string"

encoding="string"

omit-xml-declaration="yes|no"

standalone="yes|no"

doctype-public="string"

doctype-system="string"

cdata-section-elements="namelist"

indent="yes|no"

media-type="string"/>

Regards.

Former Member
0 Kudos

Hello Vadim,

Try with below adapter module


Module Name: AF_Modules/MessageTransformBean


Parameter Name: Transform.ContentType

Parameter value: text/xml,charset=UTF-8

Regards

RK N

vadim_laas
Explorer
0 Kudos

Hello RK N,

it does not work:

Regards,

Vadim

markangelo_dihiansan
Active Contributor
0 Kudos

Hi Vadim,

The module configuration is not correct, should be something like this:

Regards,

Mark

vadim_laas
Explorer
0 Kudos

Hi Mark,

Thanks for hint.

Unfortunately it has not changed any thing.

Regards,

Vadim

iaki_vila
Active Contributor
0 Kudos

Hi Vadim,

For only testing purpose, have tried to copy the exact SOAPui request to the XSL file mapping to assure that the request is really the same?.

Regards.

Former Member
0 Kudos

Hi Vadim,

Pls check with the below,

Regards

RK N

vadim_laas
Explorer
0 Kudos

Hi,

I  have found a solution.

SAP PI converted all "<" and ">" signs of CDATA section into &lt and &lg, because XSLT mapping did not work properly.

So I have adjusted XSLT mapping.

Thanks

Vadim

Former Member
0 Kudos

Hi Vadim,

    Maybe Iñaki is correct, but check the XML content also, I have faced this issue time ago and the problem was in the XML format.

Regards.

Former Member
0 Kudos

Your case:

<![CDATA[<?xml version="1.0" encoding="UTF-8" standalone="yes"?>

My case, and works fine:

<![CDATA[<?xml version="1.0"?>.........

vadim_laas
Explorer
0 Kudos

Hi Iñaki,

Do You assume that definition of response structure is incorrect?

I use external definition that I have uploaded over WSDL file.

Regards

iaki_vila
Active Contributor
0 Kudos

Hi Vadim,

Looking the wenbservice response i notice a problem similar than i have recently. If you check the answer the tag has

xsi:type="xsd:string" in <send_xmlReturn xsi:type="xsd:string">

I think that you have to set this xsi:type="xsd:string"  in the request root tag as well. May be in all your request tags too.

Regards.