on 01-31-2014 12:52 PM
Hello,
I recently started working with PI and I`m faced with a requirement that I fear I can´t solve on my own.
We need to send data via proxy to PI and further on to a 3rd party using http post with parameters in the http body. It´s a synchronous interface, so we need to pick up the http body of the incoming response and send it back to the calling proxy.
I´m currently testing with a http 7.3 adapter (xi payload in http-body) with a dummy parameter in the first step. With this I get a response of the 3rd party, but the message mapping of the response runs on following error:
<SAP:Category>Application</SAP:Category><SAP:Code area="MAPPING">EXCEPTION_DURING_EXECUTE</SAP:Code>
<SAP:P1>com/sap/xi/tf/_MM_TEST_RESPONSE_</SAP:P1>
<SAP:P2>com.sap.aii.utilxi.misc.api.BaseRuntimeException:</SAP:P2>
<SAP:P3>Content is not allowed in prolog.</SAP:P3>
The incoming response looks like this (as one big string):
error.1.errorCode=123&error.1.message=FIELD1+is+missing&error.1.consumerMessage=FIELD1+is+missing.&
error.2.errorCode=456&error.2.message=FIELD2+is+missing.&error.2.consumerMessage=FIELD2+is+missing.&status=1
I think the problem is that this string can´t be matched into the data type of the message mapping because a xml structure is expected.
Now I´ve got several questions:
Any suggestions are welcome.
Regards,
Marcus
I´m still faced with this problem... Does nobody have an idea?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Marcus
You need to use Java mapping to pass the parameters in the HTTP body for POST method.For the response mapping also you need a java mapping to read the whole string and generate the xml structure from it and then send back to Proxy.
Below blog will show you how you can do a simple HTTP post
User | Count |
---|---|
88 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.