Skip to Content
0

Error on mapping SAP>PI>SOAP

Jan 13, 2017 at 04:13 PM

158

avatar image
Former Member

Hello,

I'm trying to create a interface to get a XML from a website, I managed to get to the website through a SOAP receiver adapter, but now I'm getting the error

Runtime exception occurred during application mapping 
com/sap/xi/tf/_mm_XXXXXXXXXX_Resp_Out_In_; 
com.sap.aii.utilxi.misc.api.BaseRuntimeException:Fatal Error: 
com.sap.engine.lib.xml.parser.ParserException: XMLParser: No data allowed here (:main:, row:2, col:2)

I don't know if my mapping is right, I got the XML from the website and create a XSD for the ESR

My mapping is:

While the action XML is

One thing I'm not sure is the SOAPAction field on SOAP channel, I'm leaving it blank while the whole URL is being passed through a UDF.

Is there a way to see the content the channel is receiving? I tryed RWB, SXI_MONITOR and XPI Inspector but I coudnt see nothing.

I don't know if this "Body" is related to my inbound

Thanks in advance

mapping.jpg (247.3 kB)
ihnk6t3.jpg (30.7 kB)
insp.jpg (210.7 kB)
10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Andrzej Filusz Jan 13, 2017 at 05:00 PM
0

Hi Marcelo,

As I understood the problem is that your external Web Service sends you a TEXT/HTML page as a response (instead of XML content). The reason of that may be an incorrect URL or an incorrect request message.

Could you check with SoapUI that you can connect successfully with your Web Service?

To see the content of the response please use XPI Inspector (choose: 50 (XI Channel) and add your communication channel).

Best regards,

Andrzej

Show 6 Share
10 |10000 characters needed characters left characters exceeded
Former Member

I've seen that and I think its very weird because on SoapUI the content type is XML, look what I get from there


HTTP/1.1 200 OK Cache-Control: private Content-Type: text/xml Content-Encoding: gzip Vary: Accept-Encoding Server: Microsoft-IIS/8.0 X-AspNet-Version: 4.0.30319 X-Powered-By: ASP.NET Date: Mon, 16 Jan 2017 10:37:17 GMT Content-Length: 13618 <?xml version="1.0" encoding="utf-8"?> <DataInfo Host="SAAS10" User="XXXX" Auth="Blo9lM8eGC0yYAcvMRarLDg".. ...

I'm using REST project on SoapUI

0

Marcelo, you wrote you send your URL through a UDF.

Could you copy the URL from your log and paste it to the SoapUI and then test it? I want to make sure that your UDF generates the correct URLs.

Regards,

Andrzej

0
Former Member
Andrzej Filusz

Thanks for the answer

The log on XPI is

16:43:18:261

J2EE_GUEST

~logix_SOAP_IN/Srv_XXXXXX/]_86467

~pl.ModuleContextImpl.getContextData

Exiting method with http://saas10.XXXXXX.com/web/query.axd?format=xml&machines=all&type=coredata☆t=20170102

Then further there is

16:43:18:314J2EE_GUEST

~logix_SOAP_IN/Srv_XXXXXX/]_864

~dk.xi.net.HTTPClientConnection.callCalling endpoint: http: //USER%3APASSWORD@saas10.XXXXXX.com/web/query.axd?format=xml&machines=all&type=coredata☆t=20170102

I Got this URL and its working fine on SoapUI or Chrome

0

But did you reproduce your scenario in SoapUI? You wrote you were using a SOAP receiver adapter. So did you create a Soap project in SoapUI? And did you use the URL and the request message from your log? What was the response? A correct XML message?

Regards,

Andrzej

0
Former Member
Andrzej Filusz

Yes I reproduced it and it was replyed me with the correct XML, the data from my first reply to you is a raw from SoapUI.

I'm using Rest project because it doesn't have a WDSL, it's a simple website request like this one https://voip.ms/rates/xmlapi.php?dest=United%20States. First I would use an HTTP adapter, but another user advised me that HTTP adapter doesn't support dynamic URL and a SOAP channel could be used in this scenario(just disabling SOAP envelope on the channel), thats what I did

Thanks

0

1. You didn't reproduce your scenario cos you used a REST project, not a SOAP project (but I understood why).

2. Is your website a SOAP Web Service? If not, I'm not sure if this solution would work. You checked "Do Not Use SOAP Envelope" option in your communication channel. In "a normal/standard scenario" - it's your job to create a SOAP envelope. But as I understood, in your case you don't need it.

3. Are you sure that you can't use a HTTP adapter? You can dynamically specify many parameters.

4. Have you seen that?

https://blogs.sap.com/2012/01/05/michals-pi-tips-exchange-rates-from-an-xml-file-on-a-web-page-rest-axis/

Regards,

Andrzej

0