on 02-06-2013 10:15 PM
Hi,
i want to send a plain text message to a http receiver. The receiver format (called JSON) looks like (example):
{
"currency": "EUR",
"fromCurrency": "NOK",
"exchangeRate": 0.89042,
"exchangeRateDate": "2010-02-28 00:00:00"
}
I m able to create that result with xsl (Java or ABAP is as well possible) but the PI runtime is adding a prolog and comment like:
<?xml version="1.0" encoding="UTF-8"?>
<!-- Request Operation Mapping -->
and so the request is failing.
Do you have any idea how i can send a plain text message via http?
Best regards,
Udo
Hi,
it was actually an application error - the added PI lines (prolog / comment) are obviously only parts of PI monitoring. That means: You can use http adaper in comibination with xsl, java or abap mapping.
Thanks all for your help,
Udo
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Your JSON structure does not seem so complicated. You might try using java mapping. I would also try using StrictXML2PlainBean module in the receiver adapter and see if that helps. I have seen using this in the file receiver adapter. I think you can give a try using in http receiver and give us your updates.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Udo,
I think XSLT mapping has a tendency (not 100% sure) to add XML declaration and comment line by mapping run time. Try with java mapping.
If java mapping case also produces the same result, then you should go for custom module to remove these lines and use module either with java HTTP adapter (assuming you have latest PI) or with SOAP adapter with Do not use SOAP envelope option.
Regards,
Praveen Gujjeti
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Praveen,
thanks a lot for your promt answer
I will first check out if an ABAP dummy mapping is producing the prolog/comment too. Then i need to go for soap adapter (i m on PI 7.1). I m a bit concerned the soap adapter might change the payload by using escape sequences or something like that.
Best Regards,
Udo
Hello Udo,
I m a bit concerned the soap adapter might change the payload by using escape sequences or something like that.
The payload sent in the HTTP Body is sent as is (what you see in the payload after request message mapping).
For HTTP POST, maybe my blog can help See page 22
http://scn.sap.com/docs/DOC-29829
Hope this helps,
Mark
User | Count |
---|---|
87 | |
10 | |
10 | |
9 | |
7 | |
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.