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

Setting the SOAP server uri

Expand Messages
  • Matthew
    In the SOAP Lite user guide (http://guide.soaplite.com/), you test many examples against a remote server. However, I d like to test these examples locally.
    Message 1 of 2 , May 3, 2005
    • 0 Attachment
      In the SOAP Lite user guide (http://guide.soaplite.com/), you test many
      examples against a remote server. However, I'd like to test these examples
      locally. Where do I declare the server's URI in a perl server?

      If I save the first example on my server:

      #!perl -w

      use SOAP::Transport::HTTP;

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

      package Demo;

      (etc...)

      How should I reference it from the test script?

      #!perl -w

      use SOAP::Lite;

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

      Thanks for any help.

      Matthew

      __________________________________________________
      Do You Yahoo!?
      Tired of spam? Yahoo! Mail has the best spam protection around
      http://mail.yahoo.com
    • obc_spike
      ... examples ... I ll answer my own question here. If the package on the server is called Demo ... ... Matthew
      Message 2 of 2 , May 4, 2005
      • 0 Attachment
        --- In soaplite@yahoogroups.com, Matthew <obc_spike@y...> wrote:
        > In the SOAP Lite user guide (http://guide.soaplite.com/), you test many
        > examples against a remote server. However, I'd like to test these
        examples
        > locally. Where do I declare the server's URI in a perl server?

        I'll answer my own question here. If the package on the server is
        called "Demo"...

        > package Demo;

        You reference it this way from the test script (urn: + package name):

        > #!perl -w
        >
        > use SOAP::Lite;
        >
        > print SOAP::Lite
        > -> uri('urn:Demo')
        > -> proxy('http://localhost/hibye.cgi')
        > -> hi()
        > -> result;

        Matthew
      Your message has been successfully submitted and would be delivered to recipients shortly.