Loading ...
Sorry, an error occurred while loading the content.

Re: [soaplite] SOAP::Transport::HTTP::Client::send_receive: HTTP/1.1 500 (Internal Server Error) Internal Server Error anybody help with this error

Expand Messages
  • Duncan Cameron
    ... 1, ... message ... Server ... an ... type. ... I got a similar error message until I tried escaping the content of the CommandParameters element. It looks
    Message 1 of 2 , May 20 2:17 AM
    • 0 Attachment
      At 2005-05-20, 04:45:42 you wrote:

      >Can anyone assist me with this error message
      >
      >Here is the full error using debug
      >
      >The reply message refers to 'Element' is an invalid node type. Line
      1,
      >position 413' however when I change the xml output length the error
      message
      >does not change the position in the error message.
      >
      >Any help appreciated
      >
      >Thanks in advance
      >
      >David Inglis
      >
      >SOAP::Transport::HTTP::Client::send_receive: POST
      >http://national.atdw.com.au/soap/AustralianTourismWebService.asmx?WSDL
      >HTTP/1.1
      >Accept: text/xml
      >Accept: multipart/*
      >Accept: application/soap
      >Content-Length: 546
      >Content-Type: text/xml; charset=utf-8
      >SOAPAction:
      >"http://tempuri.org/soap/AustralianTourismWebService/CommandHandler"
      >
      ><?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><CommandHa
      >ndler
      >xmlns="http://tempuri.org/soap/AustralianTourismWebService"><DistributorKey>
      >xxxxxxxxxxxxx</DistributorKey><CommandName>QueryProducts</CommandName><Comma
      >ndParameters><parameters><row><param>COUNTRY</param><value>Australia</value>
      ></row></parameters></CommandParameters></CommandHandler></soap:Body></soap:E
      >nvelope>
      >SOAP::Transport::HTTP::Client::send_receive: HTTP/1.1 500 (Internal
      Server
      >Error) Internal Server Error.
      >Cache-Control: private
      >Connection: close
      >Date: Fri, 20 May 2005 02:45:49 GMT
      >Server: Microsoft-IIS/5.0
      >Content-Length: 539
      >Content-Type: text/xml; charset=utf-8
      >Client-Date: Fri, 20 May 2005 03:46:13 GMT
      >Client-Response-Num: 1
      >X-AspNet-Version: 1.1.4322
      >X-Powered-By: ASP.NET
      >
      ><?xml version="1.0" encoding="utf-8"?>
      ><soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
      >xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      >xmlns:xsd="http://www.w3.org/2001/XMLSchema">
      > <soap:Body>
      > <soap:Fault>
      > <faultcode>soap:Client</faultcode>
      > <faultstring>Server was unable to read request. --> There is
      an
      >error in XML document (1, 413). --> 'Element' is an invalid node
      type.
      >Line 1, position 413.</faultstring>
      > <detail />
      > </soap:Fault>
      > </soap:Body>
      ></soap:Envelope>
      >
      I got a similar error message until I tried escaping the content of the
      CommandParameters element.
      It looks like the content of the CommandParameters element needs to be
      an escaped xml document, not sub-elements. If you construct your
      parameters xml and then escape & and < characters before including it
      within the CommandParameters element.
      So you will end up with something like this


      <CommandHandler
      xmlns="http://tempuri.org/soap/AustralianTourismWebService"><DistributorKey>xxxxxxxxxxxxx</DistributorKey>
      <CommandName>QueryProducts</CommandName>
      <CommandParameters>
      <parameters>
      <row>
      <param>COUNTRY</param><value>Australia</value>
      </row>
      </parameters>
      </CommandParameters>
      </CommandHandler>

      This then fails with a different error message but I think that the
      original one has been fixed.

      Regards

      Duncan










      ___________________________________________________________
      How much free photo storage do you get? Store your holiday
      snaps for FREE with Yahoo! Photos http://uk.photos.yahoo.com
    Your message has been successfully submitted and would be delivered to recipients shortly.