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

RE: [soaplite] Problems with '#' in SOAPAction - http header.

Expand Messages
  • Mitchell, Louise M
    Read this article.... it shows how to change the # to a / as well as other good info about calling a MS .NET web service from Soap::Lite perl...
    Message 1 of 2 , May 28, 2004
    • 0 Attachment
      Read this article.... it shows how to change the # to a / as well as
      other good info about calling a MS .NET web service from Soap::Lite
      perl...

      http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnsoap/
      html/soapliteperl.asp

      -----Original Message-----
      From: arhofs [mailto:arhofs@...]
      Sent: Friday, May 28, 2004 6:31 AM
      To: soaplite@yahoogroups.com
      Subject: [soaplite] Problems with '#' in SOAPAction - http header.


      I'm having trouble understanding why I get a '#' in my SOAPACtion in
      the http header ?

      I use this code (yes, it's awful..) to call the webservice:

      #!/bin/perl -w

      use SOAP::Lite(
      trace => qw(debug),
      readable => 1,
      );

      $myURI = 'http://canaldigital/ListCategories';
      $myPROXY = 'http://62.92.49.6:80/TVGuide.asmx';

      my $soap = SOAP::Lite
      -> uri($myURI)
      -> proxy($myPROXY);

      $soap->readable(1);

      $soap->envprefix('soap');

      my $result = $soap->call(SOAP::Data
      ->uri ('http://canaldigital/')
      -> name('q1:ListCategories') =>
      (SOAP::Data
      -> name('SMSid')
      -> value('3')
      ),
      );


      if($result->fault)
      {
      print "\nSOAP Fault occurred:" .
      "\n\tCode = " . $result->faultcode .
      "\n\tString = " . $result->faultstring .
      "\n";
      } else {
      print "\nCall result is \"" . $result->result() . "\".";
      }


      The trace shows:
      SOAP::Transport::HTTP::Client::send_receive: POST
      http://62.92.49.6:80/TVGuide.asmx
      Accept: text/xml
      Accept: multipart/*
      Content-Length: 506
      Content-Type: text/xml; charset=utf-8
      SOAPAction: "http://canaldigital/#ListCategories"

      <?xml version="1.0" encoding="UTF-8"?>
      <soap:Envelope xmlns:SOAP-
      ENC="http://schemas.xmlsoap.org/soap/encoding/"
      soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
      xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
      xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
      xmlns:xsd="http://www.w3.org/1999/XMLSchema">
      <soap:Body>
      <q1:ListCategories xmlns:q1="http://canaldigital/">
      <SMSid xsi:type="xsd:int">3</SMSid>
      </q1:ListCategories>
      </soap:Body>
      </soap:Envelope>

      The response from the server is:
      SOAP::Transport::HTTP::Client::send_receive: HTTP/1.1 500 (Internal
      Server Error) Internal Server Error.
      Cache-Control: private
      Connection: close
      Date: Fri, 28 May 2004 13:26:46 GMT
      Server: Microsoft-IIS/5.0
      Content-Length: 488
      Content-Type: text/xml; charset=utf-8
      Client-Date: Fri, 28 May 2004 13:26:47 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 did not recognize the value of HTTP Header
      SOAPAction: http://canaldigital/#ListCategories.</faultstring>
      <detail />
      </soap:Fault>
      </soap:Body>
      </soap:Envelope>



      What I want to send to the service is:

      POST /TVGuide.asmx HTTP/1.1
      Host: 62.92.49.6
      Content-Type: text/xml; charset=utf-8
      Content-Length: length
      SOAPAction: "http://canaldigital/ListChannels"

      <?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>
      <ListChannels xmlns="http://canaldigital">
      <SMSid>int</SMSid>
      </ListChannels>
      </soap:Body>
      </soap:Envelope>




      What do I have to do to remove the # in SOAPAction ?

      Thanks

      AH





      Yahoo! Groups Links
    Your message has been successfully submitted and would be delivered to recipients shortly.