I am having this POST issue with rest api. the background is that I want to integrate one existing service with salesforce, on salesforce side I've exposed an apex class thru Site’s public access settings, which could process post xml like this, as documented in http://ift.tt/YDdyFp:
<request>
<field1>value1</field1>
<field2>value2</field2>
</request>
the problem is the existing service can only issue xml with as root element like this,
<xml>
<field1>value1</field1>
<field2>value2</field2>
</xml>
which will yield "message": "Root element must be named 'request'", "errorCode": "XML_PARSER_ERROR"
is there any way to work around this? thanks.
No comments:
Post a Comment