SOAP server & client problem

Discussion in 'Perl Misc' started by Some1, Nov 8, 2007.

  1. Some1

    Some1 Guest

    Hello All,

    I have written SOAP client send two variables "two massages" , also I
    have written SOAP server accept one variable. My problem I want the
    soap server accept two variables "two massages" and replay with
    results.

    Helle.pm file
    ======================
    package Hello;
    sub sayHello {
    shift;

    return "Hello Jack" if shift eq "Jack";

    die "Sorry..\n";

    }

    1;



    hello.cgi
    ===============================
    #!/usr/bin/perl -w


    use lib '/var/www/cgi-bin/Hello';
    use SOAP::Transport::HTTP;
    SOAP::Transport::HTTP::CGI
    -> dispatch_to('Hello::(?:sayHello)')
    -> handle
    ;
    #############################
    Hello.pm and hello.cgi all of them in the same folder /var/www/cgi-bin



    Now the soap client script hclient.pl:
    ===============================
    #!/usr/bin/perl -w

    use SOAP::Lite;

    my $name = shift;
    my $lname = shift ;
    print "\n\nCalling the SOAP Server to say hello\n\n";
    print "The SOAP Server says: \n";
    print SOAP::Lite
    -> uri('urn:Hello')
    -> proxy('http://homesrv/cgi-bin/hello.cgi')
    -> sayHello($name,$lname)
    -> result . "\n\n";

    ##############################END##################################3


    If I run "perl hclient.pl Jack" it is working fine, but when I tried
    "perl hclient.pl Jack King" it will not work... why?
    by the way Jack is variable 1 and King variable 2, I want my soap
    server accept all the variables.

    Could you please guide me where is my mistake or how to fix it?
     
    Some1, Nov 8, 2007
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Sham Ramakrishnan
    Replies:
    2
    Views:
    8,477
    Sham Ramakrishnan
    Jul 1, 2003
  2. -
    Replies:
    2
    Views:
    447
    Alan Krueger
    Jul 29, 2005
  3. Frederik Vanderhaegen

    Soap Extension problem (seems that soap request is not sent to server)

    Frederik Vanderhaegen, Oct 20, 2006, in forum: ASP .Net Web Services
    Replies:
    0
    Views:
    296
    Frederik Vanderhaegen
    Oct 20, 2006
  4. Mason Brown
    Replies:
    1
    Views:
    401
  5. Some1

    SOAP server & client problem

    Some1, Nov 8, 2007, in forum: Perl Misc
    Replies:
    4
    Views:
    201
    RedGrittyBrick
    Nov 9, 2007
Loading...

Share This Page