Page 1 of 1

service http_url_post_xml

Posted: Tue Sep 12, 2023 9:24 pm
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.

Re: service http_url_post_xml

Posted: Tue Sep 12, 2023 9:38 pm
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.

Re: service http_url_post_xml

Posted: Wed Sep 13, 2023 12:48 pm
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.