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

Problem with Unexpected Content-Type 'text/html' returned

Expand Messages
  • john.schattel
    Hi All, I am trying to access a soap service using SOAP::Lite in a Perl script (see code below) and I get an error message back saying that it has received an
    Message 1 of 1 , Aug 4, 2004
    View Source
    • 0 Attachment
      Hi All,

      I am trying to access a soap service using SOAP::Lite in a Perl script
      (see code below) and I get an error message back saying that it has
      received an unexpected content-type 'text/html'. I looked at the SOAP
      response returned in a PHP program from the same SOAP server and the
      content-type is "text/xml" (see SOAP response below). Any thoughts on
      what I should try to get SOAP::Lite to properly handle the returned XML
      data?

      In advance, thanks for your help.

      John

      $latitude = 38.99;
      $longitude = -77.99;
      $product = "time-series";
      $startTime = "2004-01-01T00:00:00";
      $endTime = "2009-12-25T00:00:00";
      $weatherParameters{"maxt"} = 1;
      $NDFD_XML = SOAP::Lite
      -> uri('uri:DWMLgen')
      ->
      proxy('http://weather.gov/forecasts/xml/SOAP_server/ndfdXMLserver.php')
      -> NDFDgen($latitude, $longitude, $product, $startTime,
      $endTime, @weatherParameters)
      -> result;

      <h2>Response</h2>
      <pre>HTTP/1.1 200 OK
      Date: Wed, 04 Aug 2004 20:03:59 GMT
      Server: Apache/1.3.27
      Vary: Accept-Encoding
      X-Powered-By: PHP/4.1.2
      Status: 200 OK
      Content-Length: 22454
      Connection: close
      Content-Type: text/xml; charset=ISO-8859-1

      <?xml version="1.0"
      encoding="ISO-8859-1"?><SOAP-ENV:Envelope
      SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
      xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
      xmlns:xsd="http://www.w3.org/2001/XMLSchema"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
      xmlns:si="http://soapinterop.org/xsd"><SOAP-ENV:Body><NDFDgenResponse><xmlOut
      xsi:type="xsd:string">&lt;?xml
      version=&apos;1.0&apos; ?&gt;
      &lt;dwml version=&apos;1.0&apos;
      xmlns:xsd=&quot;http://www.w3.org/2001/XMLSchema&quot;
    Your message has been successfully submitted and would be delivered to recipients shortly.