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

Problems with Soap::Lite in IIS

Expand Messages
  • helbaby33
    I am having problems getting the generic client/server script to run under IIS with activestate per 5.8.9 I have tested basic perl CGI handling at it works.
    Message 1 of 2 , Dec 9, 2009
    • 0 Attachment
      I am having problems getting the generic client/server script to run under IIS with activestate per 5.8.9

      I have tested basic perl CGI handling at it works. I'm really unsure about the uri and how I would find out what the correct namespace is.

      Any help would be very appreciated!!!

      thanks - Brad



      Here are the scripts and debug
      **** Server ****

      use SOAP::Transport::HTTP;

      SOAP::Transport::HTTP::CGI
      -> dispatch_to('Demo')
      -> handle;

      package Demo;
      sub hi {
      return "Hello, world";
      }

      ***** Client ****
      #!perl -w

      use SOAP::Lite +trace;


      print SOAP::Lite
      -> uri('http://146.225.100.232/Demo')
      -> proxy('http://146.225.100.232:81/soap_server.pl')
      -> on_debug( sub {print @_})
      -> hi()
      -> result;
      ******


      Here are the debug results

      *******

      C:\Perl\bin>c:\perl\bin\perl.exe \cygwin\home\Administrator\soap_client.pl
      Unquoted string "trace" may clash with future reserved word at \cygwin\home\Admi
      nistrator\soap_client.pl line 3.
      SOAP::Transport::new: ()
      SOAP::Serializer::new: ()
      SOAP::Deserializer::new: ()
      SOAP::Parser::new: ()
      SOAP::Lite::new: ()
      SOAP::Transport::HTTP::Client::new: ()
      SOAP::Lite::call: ()
      SOAP::Serializer::envelope: ()
      SOAP::Serializer::envelope: on_debug CODE(0x1832064)
      SOAP::Data::new: ()
      SOAP::Data::new: ()
      SOAP::Data::new: ()
      SOAP::Data::new: ()
      SOAP::Data::new: ()
      Cannot marshall CODE reference at c:/perl/site/lib/SOAP/Lite.pm line 3710
      SOAP::Transport::HTTP::Client::send_receive: HTTP::Request=HASH(0x1e11f64)
      SOAP::Transport::HTTP::Client::send_receive: POST http://146.225.100.232:81/soap
      _server.pl HTTP/1.1
      Accept: text/xml
      Accept: multipart/*
      Accept: application/soap
      Content-Length: 415
      Content-Type: text/xml; charset=utf-8
      SOAPAction: "http://146.225.100.232/Demo#on_debug"

      <?xml version="1.0" encoding="UTF-8"?><soap:Envelope xmlns:xsi="http://www.w3.or
      g/2001/XMLSchema-instance" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encodi
      ng/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" soap:encodingStyle="http://sch
      emas.xmlsoap.org/soap/encoding/" xmlns:soap="http://schemas.xmlsoap.org/soap/env
      elope/"><soap:Body><on_debug xmlns="http://146.225.100.232/Demo" /></soap:Body><
      /soap:Envelope>
      SOAP::Transport::HTTP::Client::send_receive: HTTP::Response=HASH(0x2193408)
      SOAP::Transport::HTTP::Client::send_receive: HTTP/1.1 500 Internal Server Error
      Date: Wed, 09 Dec 2009 19:56:36 GMT
      Server: Microsoft-IIS/6.0
      Content-Length: 582
      Content-Type: text/xml; charset=utf-8
      Client-Date: Wed, 09 Dec 2009 19:56:36 GMT
      Client-Peer: 146.225.100.232:81
      Client-Response-Num: 1
      SOAPServer: SOAP::Lite/Perl/0.710.10
      X-Powered-By: ASP.NET

      <?xml version="1.0" encoding="UTF-8"?><soap:Envelope xmlns:xsi="http://www.w3.or
      g/2001/XMLSchema-instance" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encodi
      ng/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" soap:encodingStyle="http://sch
      emas.xmlsoap.org/soap/encoding/" xmlns:soap="http://schemas.xmlsoap.org/soap/env
      elope/"><soap:Body><soap:Fault><faultcode>soap:Client</faultcode><faultstring>Fa
      iled to access class (Demo): Can't locate Demo.pm in @INC (@INC contains: C:/Per
      l/site/lib C:/Perl/lib .) at (eval 99) line 3.
      </faultstring></soap:Fault></soap:Body></soap:Envelope>
      SOAP::Deserializer::deserialize: ()
      SOAP::Parser::decode: ()
      SOAP::SOM::new: ()
      Can't locate object method "hi" via package "SOAP::SOM" at \cygwin\home\Administ
      rator\soap_client.pl line 10.
      SOAP::SOM::DESTROY: ()
      SOAP::Lite::DESTROY: ()
      SOAP::Transport::DESTROY: ()
      SOAP::Transport::HTTP::Client::DESTROY: ()
      SOAP::Deserializer::DESTROY: ()
      SOAP::Parser::DESTROY: ()
      SOAP::Serializer::DESTROY: ()
      SOAP::Data::DESTROY: ()
      SOAP::Data::DESTROY: ()
      SOAP::Data::DESTROY: ()
      SOAP::Data::DESTROY: ()
      SOAP::Data::DESTROY: ()
      ******
    • martin.busik@busik.de
      Hi, ... The reason is: Failed to access class (Demo): Can t locate Demo.pm in @INC (@INC contains: C:/Per l/site/lib C:/Perl/lib .) you might extend your @INC
      Message 2 of 2 , Dec 10, 2009
      • 0 Attachment
        Hi,

        > I am having problems ...

        The reason is:

        Failed to access class (Demo): Can't locate Demo.pm in @INC (@INC contains: C:/Per
        l/site/lib C:/Perl/lib .)

        you might extend your @INC paths. use lib qw(mypath) or use require("c:/path/to/my/module/Demo.pm")

        Cheers,
        Martin
      Your message has been successfully submitted and would be delivered to recipients shortly.