[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Parse error when trying to send a SOAP document with http_url_post_xml()



I've written a number of successful web services programs using this web site (URL is below) with different web services in the SOAP field.


Now, I can't get past error #66 for this page.

I never got this particular web service to work.

I don't know what the error text SetError() #66: XML parse failed at line 2, col 0: no element found" relates to.


Below is the error I'm getting using the http_url_post_xml().

(This is the entire debug text.)

I'm not connecting to the web service, so, is the URL referenced below even going out?

(The call to http_url_post_xml() is listed below.)


HTTPAPI Ver 1.15 released 2006-03-30    


SetError() #66: XML parse failed at line 2, col 0: no element found  



I really feel like I'm missing something obvious in the SOAP contents.

Please refer to the highlighted lines within the "<soap:body>" (below).


Would the parse error be because the elements have sub-elements?



Here's the "SOAP" value:


SOAP =   

   '<?xml version="1.0" encoding="utf-8"?>'                   

 + '<soap:Envelope'                                           

 + ' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"'   

 + ' xmlns:xsd="http://www.w3.org/2001/XMLSchema"'             

 + ' xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">' 

 + ' <soap:Header>'                                           

 + '<MultiSpeakMsgHeader Version="3.0"'                       

 + ' UserID="dkeidske" Pwd="dkei3mfik"'                            

 + ' Company="dkdiendike"'                                        

 + ' CSUnits="other"'                                         

 + ' xmlns="http://www.multispeak.org/Version_3.0" />'        

 + '</soap:Header>'                                            

 + '<soap:Body>'                                              

 + '<MeterChangedNotification'                                

                       + ' xmlns="http://www.multispeak.org/Version_3.0">'          

      + '<changedMeters>'                                           

                 + '<meter>'                                                  

                           + '<meterNo>' + %trim(MeterIn) + '</meterNo>'                

                           + '<manufacturer>Austin</manufacturer>'                      

                 + '</meter>'                                                 

      + '</changedMeters>'                                         

 + '</MeterChangedNotification'                               

 + '</soap:Body>'                                             




Or, is it the URL http://demo.turtletech.com/latest/webAPI/MR_CB.asmx :

(I cannot see a typo comparing this URL to those I used.)


Here's the call:

rc = http_url_post_xml(                                               


                   : %addr(SOAP) + 2                                   

                   : %len(SOAP)                                        

                   : *NULL                                             

                   : %paddr(Incoming)                                  

                   : *NULL                                              

                   : HTTP_TIMEOUT                                      

                   : HTTP_USERAGENT                                    

                   : 'text/xml; charset=utf-8'                         

   : 'http://www.multispeak.org/Version_3.0/MeterChangedNotification');