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

Re: Getting soap client/server to work

by gellyfish (Monsignor)
on Dec 04, 2006 at 21:30 UTC ( #587741=note: print w/ replies, xml ) Need Help??


in reply to Getting soap client/server to work

you will get better diagnostics if you do:

use SOAP::Lite +trace => 'all';

/J\


Comment on Re: Getting soap client/server to work
Download Code
Replies are listed 'Best First'.
Re^2: Getting soap client/server to work
by jfroebe (Parson) on Dec 04, 2006 at 21:36 UTC

    Thanks!

    Looks like I'm getting closer :) A 500 error from apache. hmmm. This should be reported in the /var/log/httpd/error_log but isn't.

    Jason L. Froebe

    Team Sybase member

    No one has seen what you have seen, and until that happens, we're all going to think that you're nuts. - Jack O'Neil, Stargate SG-1

      Figured it out! The URI was wrong! :)

      Working:
      print SOAP::Lite ->uri('http://localhost/Demo') ->proxy('http://localhost/cgi-bin/soap/hibye.cgi') ->hi() ->result;

      Doesn't work:

      print SOAP::Lite ->uri('http://localhost/cgi-bin/soap/Demo') ->proxy('http://localhost/cgi-bin/soap/hibye.cgi') ->hi() ->result;

      Jason L. Froebe

      Team Sybase member

      No one has seen what you have seen, and until that happens, we're all going to think that you're nuts. - Jack O'Neil, Stargate SG-1

        Yeah the uri actually becomes the namespace for the content of the SOAP Body element. SOAP::Lite uses this to determine the module to use for an rpc/encoded request. So with your original attempt would try to load a module like cgi-bin::soap::Demo. The namespace URI doesn't have to be a URI of an actual resource and shouldn't be confused with one. This is one reason why I tend to use a URI of the form urn:Demo (which should work in your case, avoiding using the http scheme reduces the potential for confusion IMO,

        /J\

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://587741]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (10)
As of 2015-07-28 18:02 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (258 votes), past polls