cancel
Showing results for 
Search instead for 
Did you mean: 

SOAP Receiver error

Former Member
0 Kudos

Hi guys,

I have a problem with a synchronous integration Proxy <-> SAP PI <-> Web Service.

I tried with SOAP Ui and runs properly. When I try with the ABAP Proxy, the first error obtained was com.sap.engine.interfaces.messaging.api.exception.MessagingException: java.io.IOException: Can't parse the document; HTTP 200 OK and also the adapter gets the error. Then I tried checking the flag Do not use the SOAP Envelope and obtained the same error


Then I tried adding the module localejbs/AF_Modules/MessageTransformBean to the SOAP adatper as a first module and the error was the same. After I tried checking the flag Do not use SOAP Envelope and get the same.


The different thing was setting the module in second place, in this case, the error is in the response mapping and flag do not use soap envelope checked: Runtime exception occurred during application mapping com/sap/xi/tf/_MM_TEST_; com.sap.aii.utilxi.misc.api.BaseRuntimeException:The markup in the document following the root element must be well-formed. Also the adapter changes to green and processed successfully.

I don't know what could be the problem, I have done many webservices and didn't have this error before, I have the same URL in the adapter than SOAP Ui

Do you know other things I should check?

Many thanks,

Xavier.

Accepted Solutions (1)

Accepted Solutions (1)

markangelo_dihiansan
Active Contributor
0 Kudos

Hi Xavier,

Placing the module before the call adapter means it will be applied in the request message before it gets sent to the receiving system. Placing the module after the call adapter (for synch scenarios only) will mean that it will be applied on the response message.

Can you share the HTTP Header in SOAP UI?

Regards,

Mark

Former Member
0 Kudos

Hi Mark,

In SOAP Ui I have

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

   <soapenv:Header/>

   <soapenv:Body>

      <urn:Test soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">

         <tipus xsi:type="xsd:string">test</tipus>

      </urn:Test>

   </soapenv:Body>

</soapenv:Envelope>

And in the response I have:

<SOAP-ENV:Envelope SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/">

   <SOAP-ENV:Body>

      <ns1:TestResponse xmlns:ns1="urn:dades">

         <return xsi:type="xsd:string">El señor de los anillos,Los límites de la Fundación,The Rails Way</return>

      </ns1:TestResponse>

   </SOAP-ENV:Body>

</SOAP-ENV:Envelope>

I don't know if the characters could be a problem,

Thanks,

Xavier.

markangelo_dihiansan
Active Contributor
0 Kudos

Hi Xavier,

This is RPC-encoded webservice. You either need to use XSLT mapping/java mapping to match the request sent in SOAP UI. You could try the extraction type in WSDL to be RPC, but to be honest, I was never able to make it work in PI 7.11.

Regards,

Mark

Former Member
0 Kudos

Hi,

I have tried with more parameters and I got the error White spaces are required between publicId

I don't know how to deal this error, because with SOAP Ui is fine.

Can anybody help?

markangelo_dihiansan
Active Contributor
0 Kudos

Hi Javier,

The reason for this error is that PI only sends <tipus>test</tipus> instead of <tipus xsi:type="xsd:string">test</tipus> . That is why Do Not Use SOAP Envelope has to be used in your receiver CC and then you need to manipulate it the payload (via XSLT or Java) such that it matches the structure sent by Soap UI.

Regards,

Mark

Former Member
0 Kudos

Hi Mark,

In SAP PI monitoring I can see the message

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

<ns1:tipus xmlns:ns1="urn:dades">test</ns1:tipus>

I have done many times Web Service and I haven't had to manipulate the payolad with a mapping. Could be the .wsdl definition?

Kind Regards,

Xavier.

Former Member
0 Kudos

Another strange thing,

I have another Web Services to call. I downloaded the WSDL and use it as External Definition.

When I call with SOAP Adapter I obtain the error: com.sap.engine.interfaces.messaging.api.exception.MessagingException: java.io.IOException: invalid content type for SOAP: TEXT/HTML; HTTP 404 Not Found

I used also this configuration seen in other post but I have obtained the same error

Use the Transformation Module like this:

Processing Sequence:

localejbs/AF_Modules/MessageTransformBean               - Local Enterprise Bean - TransformTo

sap.com/com.sap.aii.af.soapadapter/XISOAPAdapterBean - Local Enterprise Bean - soap

localejbs/AF_Modules/MessageTransformBean               - Local Enterprise          - TransformFrom

Module Configuration:

TransformTo      - Transform.ContentType - application/soap+xml; charset=utf-8

TransformFrom  - Transform.ContentType - text/xml; charset=utf-8

I don't understand why I have so much problems in this client with Web Services

former_member184720
Active Contributor
0 Kudos

Hi Xavier -

HTTP 404 : - The web site hosting server will typically generate a "404 Not Found" web page when a user attempts to follow a broken or dead link;

Did you try testing you webservice through Soap UI?  Make sure that you configured the channl will valid details.

Former Member
0 Kudos

Hi Hareesh,

I have done some changes, and the Webservice is called, I get an error in the response mapping with the next message:

Runtime exception occurred during application mapping com/sap/xi/tf/_MM_TEST; com.sap.aii.utilxi.misc.api.BaseRuntimeException:The markup in the document following the root element must be well-formed.


The SOAP adapter is green and with message processed successfully, but I can't obtain the content of the response message to see the format, in the adapter engine I only see the SOAP document.


I will investigate about that.


Many thanks,

Xavier.

markangelo_dihiansan
Active Contributor
0 Kudos

Hi Xavier,

You can try using RPC definition in ESR. Try it if it works.

Regards,

Mark

Former Member
0 Kudos

Hi Mark,

changing this the Web Service runs properly.

Also the basis team has changed some thing in firewalls and at the end all the Web Services are running.

Many thanks guys.

Kind Regards,

Xavier.

Answers (0)