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

openserver and soaplite

Expand Messages
  • dahven
    Hi, I have a server that is running Sco Openserver 5 and I have set up an HTTP daemon and soap lite. installed: SOAP-Lite-0.55 libwww-perl-5.65
    Message 1 of 1 , May 16, 2003
    • 0 Attachment
      Hi,

      I have a server that is running Sco Openserver 5 and I have set up an
      HTTP daemon and soap lite.

      installed:
      SOAP-Lite-0.55
      libwww-perl-5.65
      HTML-Tagset-3.03
      HTML-Parser-3.26

      I have a second system running redhat 8.0 as a soap client.

      installed:

      Crypt-SSLeay-0.49 IO-1.20 SOAP-Lite-0.55 libwww-perl-5.65
      Digest-MD5-2.20 MIME-Base64-2.12 URI-1.22
      HTML-Parser-3.26 MIME-Lite-2.117 XML-Parser-2.31
      HTML-Tagset-3.03 MIME-tools-5.411 expat-1.95.5

      I set up a basic hello script and had it work fine.

      I would like to set up an encrypted (ssl) communication between them
      as once in use I cannot be sure that the connect between them is
      going to stay on a private network.

      I am having trouble compiling and setting up the needed perl modules.
      (Crypt::SSLeay) The sco server does not have a cc compiler only gcc.

      I managed to install the module on the redhat system but it stalls
      when run:

      daemon.pl
      #!/usr/bin/perl -w

      use SOAP::Transport::HTTP;
      $SIG{PIPE} = $SIG{INT} = 'IGNORE';

      my $daemon = SOAP::Transport::HTTP::Daemon
      -> new (LocalPort => 8123)
      -> dispatch_to('/soap/test')
      ;

      print "Contact to soap server at ", $daemon->url, "\n";
      $daemon->handle;

      hello.pl
      #!/usr/bin/perl -w

      use LWP::Protocol::https;

      use SOAP::Lite +trace =>
      qw(transport debug);

      my $soap = SOAP::Lite
      -> uri('http://localhost:8123/Hello')
      -> proxy('https://localhost:8123/cgi-bin/hello.cgi');

      my $name = shift;
      print "Calling\n";

      my $result = $soap->sayhello($name);

      unless ( $result->fault ) {
      print $result->result();
      } else {
      print join ', ',
      $result->faultcode,
      $result->faultstring,
      $result->faultdetail;
      }


      Hello.pm
      package Hello;
      sub sayhello {
      shift;
      return "Hello" . shift;
      }
      1;

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

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

      script of transmission:

      SOAP::Transport::new: ()
      SOAP::Serializer::new: ()
      SOAP::Deserializer::new: ()
      SOAP::Parser::new: ()
      SOAP::Lite::new: ()
      SOAP::Transport::HTTP::Client::new: ()
      Calling
      SOAP::Lite::call: ()
      SOAP::Serializer::envelope: ()
      SOAP::Serializer::envelope: sayhello james
      SOAP::Data::new: ()
      SOAP::Data::new: ()
      SOAP::Data::new: ()
      SOAP::Data::new: ()
      SOAP::Data::new: ()
      SOAP::Transport::HTTP::Client::send_receive: HTTP::Request=HASH
      (0x848c5f8)
      SOAP::Transport::HTTP::Client::send_receive: POST
      https://localhost:8123/cgi-bin
      /hello.cgi
      Accept: text/xml
      Accept: multipart/*
      Content-Length: 523
      Content-Type: text/xml; charset=utf-8
      SOAPAction: "http://localhost:8123/Hello#sayhello"

      <?xml version="1.0" encoding="UTF-8"?><SOAP-ENV:Envelope
      xmlns:xsi="http://www.w
      3.org/1999/XMLSchema-instance" xmlns:SOAP-
      ENC="http://schemas.xmlsoap.org/soap/e
      ncoding/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
      xmlns:xsd="
      http://www.w3.org/1999/XMLSchema" SOAP-
      ENV:encodingStyle="http://schemas.xmlsoap
      .org/soap/encoding/"><SOAP-ENV:Body><namesp1:sayhello
      xmlns:namesp1="http://loca
      lhost:8123/Hello"><c-gensym3 xsi:type="xsd:string">james</c-
      gensym3></namesp1:sa
      yhello></SOAP-ENV:Body></SOAP-ENV:Envelope>



      It freezes there unless I kill the daemon or stop the program.

      If I kill the daemon I get the error:
      SOAP::Transport::HTTP::Client::send_receive: HTTP::Response=HASH
      (0x84c64ec)
      SOAP::Transport::HTTP::Client::send_receive: 500 (Internal Server
      Error) SSL neg
      otiation failed:
      Client-Date: Fri, 16 May 2003 12:58:21 GMT
      500 SSL negotiation failed: at ./hello.pl line 15
      SOAP::Lite::DESTROY: ()
      SOAP::Serializer::DESTROY: ()
      SOAP::Data::DESTROY: ()
      SOAP::Data::DESTROY: ()
      SOAP::Data::DESTROY: ()
      SOAP::Data::DESTROY: ()
      SOAP::Data::DESTROY: ()
      SOAP::Deserializer::DESTROY: ()
      SOAP::Parser::DESTROY: ()
      SOAP::Transport::DESTROY: ()
      SOAP::Transport::HTTP::Client::DESTROY: ()


      What am I doing wrong?
    Your message has been successfully submitted and would be delivered to recipients shortly.