Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things

Re: Soap::Lite and IIS problems

by Anonymous Monk
on Dec 09, 2009 at 22:18 UTC ( #812056=note: print w/replies, xml ) Need Help??

in reply to Soap::Lite and IIS problems

Modifying your code to run on my machine, I have #!/usr/bin/perl -- use strict; use warnings; use SOAP::Transport::HTTP; my $daemon = SOAP::Transport::HTTP::Daemon->new( LocalAddr => '', LocalPort => 1203, Reuse => 1 )->dispatch_to('Demo'); print "Contact to SOAP server at ", $daemon->url, "\n"; $daemon->handle; #~ SOAP::Transport::HTTP::CGI #~ -> dispatch_to('Demo') #~ -> handle; package Demo; sub hi { return "Hello, world"; } #!/usr/bin/perl -- use strict; use warnings; #!perl -w use SOAP::Lite +trace => 'all'; print SOAP::Lite #~ -> uri('') #~ -> proxy('') -> uri('') -> proxy('') -> on_debug( sub {print @_}) -> hi() -> result;
and I get error
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(0x97a18c) SOAP::Data::new: () SOAP::Data::new: () SOAP::Data::new: () SOAP::Data::new: () SOAP::Data::new: () SOAP::Transport::HTTP::Client::send_receive: HTTP::Request=HASH(0xe76e +e4) SOAP::Transport::HTTP::Client::send_receive: POST +3 HTTP/1.1 Accept: text/xml Accept: multipart/* Accept: application/soap Content-Length: 409 Content-Type: text/xml; charset=utf-8 SOAPAction: "" <?xml version="1.0" encoding="UTF-8"?><soap:Envelope xmlns:xsi="http:/ +/" xmlns:soapenc="http://schemas.xm" xmlns:xsd=" +" soap:encodingStyle="" xmln +s:soap=""><soap:Body><on_deb +ug xmlns="" /></soap:Body></soap:Envelope> SOAP::Transport::HTTP::Client::send_receive: HTTP::Response=HASH(0x10b +2a34) SOAP::Transport::HTTP::Client::send_receive: HTTP/1.1 500 Internal Ser +ver Error Date: Wed, 09 Dec 2009 22:09:39 GMT Server: libwww-perl-daemon/5.827 Content-Length: 737 Content-Type: text/xml; charset=utf-8 Client-Date: Wed, 09 Dec 2009 22:09:39 GMT Client-Peer: Client-Response-Num: 1 SOAPServer: SOAP::Lite/Perl/0.710.10 <?xml version="1.0" encoding="UTF-8"?><soap:Envelope xmlns:xsi="http:/ +/" xmlns:soapenc="http://schemas.xm" xmlns:xsd=" +" soap:encodingStyle="" xmln +s:soap=""><soap:Body><soap:F +ault><faultcode>soap:Client</faultcode><faultstring>Failed to access +class (Demo): Can't locate in @INC (@INC contains: C:/perl/5. +10.1/lib/MSWin32-x86-multi-thread C:/perl/5.10.1/lib C:/perl/site/5.1 +0.1/lib/MSWin32-x86-multi-thread C:/perl/site/5.10.1/lib .) at (eval +110) line 3. </faultstring><faultactor>http://localhost:1203/</faultactor></soap:Fa +ult></soap:Body></soap:Envelope> SOAP::Deserializer::deserialize: () SOAP::Parser::decode: () SOAP::SOM::new: () Can't locate object method "hi" via package "SOAP::SOM" at lin +e 20. 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: ()
That first error can be fixed with
BEGIN { $INC{''} = __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

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://812056]
[Corion]: Lady_Aleena: Mostly, it's just housekeeping, but it inspires me about things I could do with it, so that's good ;)
[Lady_Aleena]: By the way, I stopped by to let someone know I'm still alive, though I haven't found anything to write in perl for a while now.
[Lady_Aleena]: I need inspiration.
[Discipulus]: hello there: Lady_Aleena for inspiration random browse my homenode.. ;=)
[Lady_Aleena]: Discipulus, Hello there. How are you?

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (6)
As of 2017-09-24 18:18 GMT
Find Nodes?
    Voting Booth?
    During the recent solar eclipse, I:

    Results (274 votes). Check out past polls.