robopet3 ([personal profile] robopet3) wrote in [site community profile] dw_dev2020-02-18 09:52 pm
Entry tags:

Errors on a first step

Hi all.
I practically didn’t work with API before, so I took an example from here
http://wiki.dwscoalition.org/wiki/index.php/XML-RPC_Protocol_Method:_postevent
as it is, and and got an error


faultCodeClientfaultStringApplication failed during request deserialization:
XML or text declaration not at start of entity at line 1, column 1, byte 1 at /home/dw/current/extlib/lib/perl5/x86_64-linux-gnu-thread-multi/XML/Parser.pm line 187.



Could anyone please tell me which client is needed to work with and in what field ?
Thank you all in advance

UPD
Fixed, by replace ESC 0D 0A by
$ReturnTextPostTestMessage01.Replace("`r`n","")
kareila: Taking refuge from falling debris under a computer desk. (computercrash)

[personal profile] kareila 2020-02-18 04:03 pm (UTC)(link)
For the example request, don't include the sample HTTP headers given in the syntaxhighlight block. The error indicates that the line that specifies the XML version needs to be the first line. The data you send should start there.
kareila: Taking refuge from falling debris under a computer desk. (computercrash)

[personal profile] kareila 2020-02-20 04:27 am (UTC)(link)
Is there a newline character in front of the xml version line? That seems like the most likely culprit.
kareila: "PERL!" (perl)

[personal profile] kareila 2020-02-20 01:57 pm (UTC)(link)
Glad I could help!