11-30-2022 01:15 AM - edited 11-30-2022 01:17 AM
I rty to send POST request via CVP Rest Client element with body:
<import>
<fileContent>
<![CDATA[
Phone01
0631231212
]]>
</fileContent>
<delimiter>,</delimiter>
</import>
, but I receive
400 Bad Request - javax.xml.bind.UnmarshalException
- with linked exception:
[org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 1; Content is not allowed in prolog.]
In wireshark I found that request is not complete
Solved! Go to Solution.
12-01-2022 10:13 AM - edited 12-01-2022 10:14 AM
Have you set the Content-Type Header?
Can you also try without the CDATA format.
i.e. here is a very similar example - which I know works perfectly. (I use this to insert a callback into the Dialer).
Regards,
Gerry
11-30-2022 01:38 AM
I believe you have an error in the XML formatting ?
Have you tested the format and got it to work outside of CVP, e.g. in Postman?
Gerry
11-30-2022 02:26 AM
Yes, postmen send full request. And all works fine.
12-01-2022 10:13 AM - edited 12-01-2022 10:14 AM
Have you set the Content-Type Header?
Can you also try without the CDATA format.
i.e. here is a very similar example - which I know works perfectly. (I use this to insert a callback into the Dialer).
Regards,
Gerry
12-01-2022 01:03 PM
Thanks, it works without CDATA.
I also implement callbacks and I just didn't know that it was possible to do so.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide