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

RE: [soaplite] Maybe i'm an idiot

Expand Messages
  • Dan Muey
    ... No you re not an idiot! ... Good for you. I m always glad to see the php and perl communities being friendly! ... Just at a glance I think you have to do
    Message 1 of 2 , Mar 20, 2003
    • 0 Attachment
      > -----Original Message-----
      > From: pyckle2k2 [mailto:linuxnerd@...]
      > Sent: Thursday, March 20, 2003 10:21 AM
      > To: soaplite@yahoogroups.com
      > Subject: [soaplite] Maybe i'm an idiot
      No you're not an idiot!

      >
      >
      > The code below is my client. All i want to do is pass the
      > variable to the server then have the server write the
      > variable to a table in a mysql database. FOR THE LIFE of me i
      > can't get it to work. I usually work with PHP but the boss
      > said i should use PERL for this project. I have read and read
      Good for you. I'm always glad to see the php and perl communities being friendly!

      > the docs and websites but i can't get this simple little
      > project to work. ANY help is MUCH appreciated.
      >
      >
      >
      > #!/usr/bin/perl
      >
      > use SOAP::Lite +trace => 'debug';
      > my $SIGN = 'Death';
      > my $retard = SOAP::Lite
      > -> uri('http://localhost/jason')
      > -> proxy('http://localhost/cgi-bin/hibye.cgi')
      > -> hi(SOAP::Data->name("sign" => $SIGN));
      >
      > print $retard->result;
      >
      >
      > server########################
      > #!/usr/bin/perl
      > use DBI();
      > my $soap = SOAP::Lite
      > SOAP::Transport::HTTP::CGI
      > -> dispatch_to('jason')
      > -> handle;
      >
      > package jason;

      Just at a glance I think you have to do it with a subroutine in the server. IE

      package jason;

      sub hi {
      my $som ....
      ...
      $dbh->disconnect();
      }

      Hope that helsp

      DMuey

      >
      >
      >
      > my $som = $soap->hi(SOAP::Data->name("sign" => $SIGN));
      >
      >
      > my $dbh = DBI->connect("DBI:mysql:database=test;host=localhost",
      > "root", "",
      > {'RaiseError' => 1});
      >
      >
      > eval { $dbh->do("DROP TABLE foo") };
      > print "Dropping foo failed: $@\n" if $@;
      >
      > $dbh->do("CREATE TABLE foo (id INTEGER, name VARCHAR(255))");
      >
      > $dbh->do("INSERT INTO foo VALUES (1,'$som')");
      >
      > $dbh->disconnect();
      >
      >
      >
      > ------------------------ Yahoo! Groups Sponsor
      > ---------------------~--> Get 128 Bit SSL Encryption!
      > http://us.click.yahoo.com/xaxhjB/hdqFAA/xGHJAA> /W6uqlB/TM
      >
      >
      > --------------------------------------------------------------
      > -------~->
      >
      > To unsubscribe from this group, send an email to:
      > soaplite-unsubscribe@yahoogroups.com
      >
      >
      >
      > Your use of Yahoo! Groups is subject to
      > http://docs.yahoo.com/info/terms/
      >
      >
      >
    Your message has been successfully submitted and would be delivered to recipients shortly.