service http_url_post_xml

Discussions related to HTTPAPI (An HTTP Client Package for RPG programming.) http://www.scottklement.com/httpapi/
Post Reply
jtalavera
Posts: 10
Joined: Thu Dec 16, 2021 9:52 pm

service http_url_post_xml

Post by jtalavera »

Good afternoon, the service http_url_post_xml is returning this error

<faultcode>a:DeserializationFailed</faultcode><faultstring>The formatter threw an exception while trying to deserialize the message: Error in deserializing body of request message for operation 'MolST247Transacciones'. End element 'XmlInMol' from namespace 'http://tempuri.org/' expected. Found element 'DATA' from namespace ''. Line 1, position 303.</faultstring><s:Fault></s:Fault><s:Body></s:Body><s:Envelope></s:Envelope>

Please if you can tell me what the error could be.

Thanks.
Scott Klement
Site Admin
Posts: 658
Joined: Sun Jul 04, 2021 5:12 am

Re: service http_url_post_xml

Post by Scott Klement »

This message is NOT coming from http_url_post_xml. It is coming from the HTTP server that you are communicating with.

The message says that it is having a problem interpreting the XML document that you are sending. Please read this:
End element 'XmlInMol' from namespace 'http://tempuri.org/' expected. Found element 'DATA' from namespace ''. Line 1, position 303
It says it is expecting the end of the XmlInMol element -- this is something specific to your application, but... surely if you look at how your program works, you can see where the XmlInMol element starts, and determine where it is supposed to end, right?

It says that instead of the end of the XmlInMol element, it is finding element "DATA" from namespace ''. (In other words, there's no namespace, or it is blank.) This looks to me like someone created an XML document incorrectly. Sent it to an HTTP server (probably using the SOAP protocol) and since it was invalid, the server sent back a message explaining what was wrong.

Fix your XML.
jtalavera
Posts: 10
Joined: Thu Dec 16, 2021 9:52 pm

Re: service http_url_post_xml

Post by jtalavera »

Thank you very much for the comments, I already found the problem, it was a Ñ in the address TAG, which possibly interprets it as an invalid character.

Thank you.
Post Reply