cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
520
Views
15
Helpful
4
Replies

Send POST via CVP Rest Client element with CDATA in body

Calladot
Level 1
Level 1

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

Calladot_0-1669799331505.png

 

1 Accepted Solution

Accepted Solutions

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).

REST-EXAMPLE.png


 

Regards,

Gerry

View solution in original post

4 Replies 4

Gerry O'Rourke
Spotlight
Spotlight

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

Yes, postmen send full request. And all works fine.

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).

REST-EXAMPLE.png


 

Regards,

Gerry

Thanks, it works without CDATA.

I also implement callbacks and I just didn't know that it was possible to do so.