Quantcast
Channel: SCN : Unanswered Discussions - Process Integration (PI) & SOA Middleware
Viewing all articles
Browse latest Browse all 6719

"Content is not allowed in prolog" error in http receiver adapter

$
0
0

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:

  • What do I have to do that this string fits to the data type of the massage mapping? Actually the data type is a simple type of a xsd:string.
  • I´ve seen that there is a possibility of XI payload manipulation using prolog and epilog. But does it mean that the message of the request is manipulated in this way, or the message of the response, or both? What do if have to declare in this case?
  • Am I using the correct adapter type? I´ve also tested with soap and http_aae adapter, but also without success. The http adapter seems to be first choice to me.
  • Later on, how can I put the parameters of the proxy to the http body? With a UDF and dynamic configuration, or with a java mapping?

 

Any suggestions are welcome.

 

Regards,

Marcus


Viewing all articles
Browse latest Browse all 6719

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>