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

Re: [soaplite] Does SOAP::Lite support DBI::mysql?

Expand Messages
  • Shihe Wang
    Thanks. I ll try. But my problem seems DBI::mysql not installed in default diractory. ... __________________________________________________ Do you Yahoo!?
    Message 1 of 7 , Sep 16, 2002
    • 0 Attachment
      Thanks. I'll try.
      But my problem seems DBI::mysql not installed in
      default diractory.

      --- Duncan Cameron <dcameron@...> wrote:
      > On 2002-09-15 shihewang wrote:
      > >Hello,
      > >This is second time post the question- Does
      > SOAP::Lie support
      > >DBI::mysql? I really care it. If anybody has the
      > answer, please let
      > >me know.
      > Can you run a SOAP::Lite daemon instead of a CGI?
      > That will allow
      > you to run it under debug and may help to see what's
      > going on.
      >
      > Regards,
      > Duncan Cameron
      >
      >
      >
      >
      >


      __________________________________________________
      Do you Yahoo!?
      Yahoo! News - Today's headlines
      http://news.yahoo.com
    • Shihe Wang
      Thanks, Michael. I add your lines to my code and test it. I found the server side can t load dbi-mysql driver. However, on usual command line, as my test2.pl,
      Message 2 of 7 , Sep 16, 2002
      • 0 Attachment
        Thanks, Michael.
        I add your lines to my code and test it. I found the
        server side can't load dbi-mysql driver. However, on
        usual command line, as my test2.pl, the DBI::mysql
        works. So it seems as server, it searches DBI module
        in different way.
        Shawn Wang
        --- Michael Goepper <michael@...> wrote:
        > Hi,
        >
        > your code is working very well on my machine.
        >
        > It seem's, there's a runtime error somewhere (wrong
        > DB login or something
        > like this). If your mysoap.cgi dies (in case of a
        > runtime error) -
        > SOAP::Lite will create a SOAP-Fault. So you should
        > react on faults in your
        > test1.pl like this:
        >
        > --test1.pl---->8--------------schnipp----
        > #!/usr/bin/perl -w
        >
        > use SOAP::Lite;
        > my $soap=SOAP::Lite
        > ->uri('urn:Mysoap')
        > ->proxy(
        > 'http://services.soap-portal.de/mysoap.cgi')
        > -> on_fault(sub { my($soap, $res) = @_;
        > die ref $res ? $res->faultstring :
        > $soap->transport->status, "\n";
        > })
        > ->search_db();
        > my $result=$soap->result;
        > print "result: $result\n";
        > --test1.pl---->8--------------schnapp----
        >
        > And then you'll see, what went wrong.
        >
        > Have fun,
        > Michael
        >
        > ----------------------
        > www.SOAP-PORTAL.DE
        > ----------------------
        >
        > > Hello,
        > > This is second time post the question- Does
        > SOAP::Lie support
        > > DBI::mysql? I really care it. If anybody has the
        > answer, please let me
        > > know.
        > > I created a server-client, mysoap.cgi-test1.pl.
        > They do not work. While
        > > the other pair, hibye.cgi-hello.pl, work in the
        > same dir on the same
        > > machine. And I copied the sub, search_db, from
        > mysoap.cgi
        > > package, and put into test2.pl. test2.pl also
        > works. See the codes and
        > > running results(Sorry, codes post a moment ago not
        > readable, now
        > > re-post the code):
        > >
        > > 1. server: mysoap.cgi, client: test1.pl
        > > mysoap.cgi
        > > *****************************************
        > > #!/usr/bin/perl -w
        > >
        > > # use DBI;#tried either with or without this line
        > > use SOAP::Transport::HTTP;
        > >
        > > SOAP::Transport::HTTP::CGI
        > > -> dispatch_to('Mysoap')
        > > -> handle;
        > >
        > > package Mysoap;
        > >
        > > sub search_db{
        > > use DBI;
        > > my $db_name = "mydb";
        > > my $passwd = "mypasswd";
        > > my $login = "mylogin";
        > > my $dbh
        > =DBI->connect("DBI:mysql:$db_name", $login,
        > $passwd);
        > >
        > > $sth=$dbh->prepare(qq{select id from test
        > where id =1});
        > > $sth -> execute;
        > > my $retval = $sth->fetchrow;
        > > return $retval;
        > > }
        > > 1;
        > > *****************************************
        > >
        > > test1.pl
        > > *****************************************
        > > #!/usr/bin/perl -w
        > >
        > > use SOAP::Lite;
        > > my $soap=SOAP::Lite
        > > ->uri('urn:Mysoap')
        > > ->proxy(
        >
        'http://www.dept.univ.edu/~mylogin/cgi-bin/mysoap.cgi')
        > > ->search_db();
        > > my $result=$soap->result;
        > > print "result: $result\n";
        > > *****************************************
        > >
        > > Running result:
        > > *****************************************
        > > %perl test1.pl
        > > Use of uninitialized value in concatenation (.) or
        > string at test1.pl
        > > line 9.
        > > result:
        > > %
        > > *****************************************
        > >
        > [...]
        > >
        > > 3. copy the sub search_db from server mysoap.cgi,
        > put into test2.pl
        > > test2.pl
        > > *****************************************
        > > #!/usr/bin/perl -w
        > >
        > > sub search_db{
        > > use DBI;
        > > my $db_name = "mydb";
        > > my $passwd = "mypasswd";
        > > my $login = "mylogin";
        > > my $dbh =DBI->connect('DBI:mysql:$db_name",
        > > $login, $passwd);
        > >
        > > $sth=$dbh->prepare(
        > > qq{select id from test where id =1});
        > > $sth -> execute;
        > > my $retval = $sth->fetchrow;
        > > return $retval;
        > > }
        > >
        > > $result = search_db();
        > > print "result: $result\n";
        > > *****************************************
        > >
        > > Running result:
        > > *****************************************
        > > %perl test2.pl
        > > result: 1
        > > %
        > > *****************************************
        > >
        > >
        > >
        > > ------------------------ Yahoo! Groups Sponsor
        > ---------------------~-->
        > > Looking for a more powerful website? Try GeoCities
        > for $8.95 per month.
        > > Register your domain name (http://your-name.com).
        > More storage! No ads!
        > > http://geocities.yahoo.com/ps/info
        > >
        >
        http://us.click.yahoo.com/aHOo4D/KJoEAA/MVfIAA/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/
        >
        >
        >


        __________________________________________________
        Do you Yahoo!?
        Yahoo! News - Today's headlines
        http://news.yahoo.com
      Your message has been successfully submitted and would be delivered to recipients shortly.