bradles has asked for the wisdom of the Perl Monks concerning the following question:

I am having problems getting the basic server/client program working with SOAP::Lite on MS IIS. I've done work before with SOAP::Lite on Linux/Apache without issues. I've verified that basic perl CGI stuff works.

(Note: I've cross posted to the SOAP::Lite yahoo group but there does not seem to be much activity there)

Any help or insight would be appreciated

Here is the client code

#!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 is the server side

use SOAP::Transport::HTTP; SOAP::Transport::HTTP::CGI -> dispatch_to('Demo') -> handle; package Demo; sub hi { return "Hello, world"; }

Here is the debug from the client

C:\Perl\bin>c:\perl\bin\perl.exe \cygwin\home\Administrator\soap_clien +t.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 3 +710 SOAP::Transport::HTTP::Client::send_receive: HTTP::Request=HASH(0x1e11 +f64) SOAP::Transport::HTTP::Client::send_receive: POST http://146.225.100.2 +32: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/s +oap/encodi ng/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" soap:encodingStyle=" +http://sch emas.xmlsoap.org/soap/encoding/" xmlns:soap="http://schemas.xmlsoap.or +g/soap/env elope/"><soap:Body><on_debug xmlns="http://146.225.100.232/Demo" /></s +oap:Body>< /soap:Envelope> SOAP::Transport::HTTP::Client::send_receive: HTTP::Response=HASH(0x219 +3408) SOAP::Transport::HTTP::Client::send_receive: HTTP/1.1 500 Internal Ser +ver 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/s +oap/encodi ng/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" soap:encodingStyle=" +http://sch emas.xmlsoap.org/soap/encoding/" xmlns:soap="http://schemas.xmlsoap.or +g/soap/env elope/"><soap:Body><soap:Fault><faultcode>soap:Client</faultcode><faul +tstring>Fa iled to access class (Demo): Can't locate Demo.pm in @INC (@INC contai +ns: 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\hom +e\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: ()

Replies are listed 'Best First'.
Re: Soap::Lite and IIS problems
by Anonymous Monk on Dec 09, 2009 at 22:18 UTC
    Modifying your code to run on my machine, I have and I get error That first error can be fixed with
    BEGIN { $INC{'Demo.pm'} = __FILE__; }
    The error that follows can be fixed by removing on_debug
    0.65-beta2 Mon Oct 25 2004 + Deprecated SOAP::Lite->on_debug removed
    After that the program works
Re: Soap::Lite and IIS problems
by girarde (Hermit) on Dec 09, 2009 at 21:38 UTC
    This question would be VASTLY improved with the use of <readmore> tags.