on ‎2023 May 31 5:18 PM
Here is a tough one.
I have a REST receiver with custom error handling. When the HTTP response is not 200, I am getting a json with the error description in an object i.e. {"errorCode":"Generic","errors":{"vendorId":"SKYPAI not exist."},"message":"Bad request"}. My custom response looks like:
<?xml version="1.0" encoding="UTF-8"?>
<data>
{http_result}
</data>
For some reason, PI only converts the first part to XML and disregards the object completely so I get:
<data><errorCode>Generic</errorCode></data>
And I cannot fetch the rest of the json whatever I try to do.
Any ideas? I am on 7.5 latest SP and patches.
Thanks
Request clarification before answering.
I managed to work around this by setting the "Add Wrapper Element" flag. I still think there is some kind of bug there that has to do with JSON to XML conversion of objects, but it's working now. (Of course I now have to remove the wrapper in JAVA mapping or XSLT, but that's easy enough)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 9 | |
| 7 | |
| 6 | |
| 4 | |
| 3 | |
| 3 | |
| 3 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.