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

XML parse failed



I'm receiving an error stating the XML parse failed because of a
mismatched tag when using the http_url_post_xml() procedure to post a
soap request. Here is the soap statement I'm posting.
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-ENV:Body> '
        +'<GetInfoByZIP xmlns="http://www.webserviceX.NET";> '
           +'<USZip>' +%Trim(InZipCode) +'</USZip> '
        +'</GetInfoByZIP>'
    +'</soap:Body> '
 +'</soap:Envelope>';

This is the soap request information I'm going off of.
POST /uszip.asmx HTTP/1.1
Host: www.webservicex.net
Content-Type: text/xml; charset=utf-8
Content-Length: length
SOAPAction: "http://www.webserviceX.NET/GetInfoByZIP";

<?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:Body>
    <GetInfoByZIP xmlns="http://www.webserviceX.NET";>
      <USZip>55045</USZip>
    </GetInfoByZIP>
  </soap:Body>
</soap:Envelope>

And here is the response it tells me I'm supposed to be receiving
HTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8
Content-Length: length

<?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:Body>
    <GetInfoByZIPResponse xmlns="http://www.webserviceX.NET";>
      <GetInfoByZIPResult>xml</GetInfoByZIPResult>
    </GetInfoByZIPResponse>
  </soap:Body>
</soap:Envelope>

This is the xml that gets created when I run the webservice  (Run from a
browser).
<?xml version="1.0" encoding="utf-8" ?> 
- <NewDataSet>
- <Table>
  <CITY>Lindstrom</CITY> 
  <STATE>MN</STATE> 
  <ZIP>55045</ZIP> 
  <AREA_CODE>612</AREA_CODE> 
  <TIME_ZONE>C</TIME_ZONE> 
  </Table>
  </NewDataSet>

It appears to me that the post is working, but I think the problem is
with the response. Is there a way for me to see what the response looks
like after the post? I'm using a data structure for the response just
like EXAMPLE16 and I'm pretty sure I don't have that set up correctly
and I'm not sure how it needs to be defined. 



-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------