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

hello and ssl questions galore

Expand Messages
  • Mental
    Hello there. Sorry to jump right in with questions.Currently I m setting up a SOAP::Lite server and clients. Everything has been easy to use and has worked
    Message 1 of 1 , Oct 18, 2001
    • 0 Attachment
      Hello there. Sorry to jump right in with questions.

      Currently I'm setting up a SOAP::Lite server and clients. Everything has
      been easy to use and has worked well. Up to this point. I seem to have run
      into a wall however. I suspect I know the cause, I just want to verify.

      The soap server works fine over http. However, it is going to need to be
      running over https. I'm using apache_mod_ssl. I'm also using a
      self-generated certificate for development which is what I suspect to be
      causing the problem.

      When I change the client to use https, it doesnt work.... output to
      follow. When I use http, its fine. @INC is the same in both environments,
      and cgi's are handled the same.

      I see the request in the ssl_engine_log and ssl_request_log. Nothing
      shows up in the error log.

      I've tried changig the proxy and the uri to https, I've also just set the
      proxy. Same results.

      The server is a simple 2 liner. I'm dispatching to @INC for now just to
      get it up and going. Later I'll add a BEGIN block to add the right paths
      based on if I'm running under solaris or linux.

      That all said, here is the code.

      Server:

      use SOAP::Transport::HTTP;

      SOAP::Transport::HTTP::CGI->dispatch_to(@INC)->handle();

      The client:

      #!/usr/bin/perl -w
      use strict;
      use diagnostics;
      use SOAP::Lite +trace => 'all';

      my $sid = shift || die "Usage: $0 <session_id>\n";

      my @product1 = qw(28800-062 EA);
      my @product2 = qw(21905-026 PK);
      my @product3 = qw(21905-049 PK);
      my @args;
      # session id first
      # followed by array of arrays (cat_num,uom)
      push @args,$sid,\@product1,\@product2,\@product3;

      my $ref = SOAP::Lite
      -> uri('http://sl76msds.vwrsp.com/Com/Vwr/Soap/GetPrice')
      -> proxy('https://sl76msds.vwrsp.com/soap/')
      -> get_price(@args)
      -> result();

      foreach my $i (@{$ref}){
      print join(':',@{$i}),"\n";
      }
      ###################################END CLIENT############################

      And heres the http (expected) output:

      SOAP::Transport::new: ()
      SOAP::Serializer::new: ()
      SOAP::Deserializer::new: ()
      SOAP::Parser::new: ()
      SOAP::Lite::new: ()
      SOAP::Transport::HTTP::Client::new: ()
      SOAP::Lite::call: ()
      SOAP::Serializer::envelope: ()
      SOAP::Serializer::envelope: get_price XOvAm3KuF91YCBTuqtbmhg ARRAY(0x80ffe48) ARRAY(0x8134d08) ARRAY(0x8233704)
      SOAP::Data::new: ()
      SOAP::Data::new: ()
      SOAP::Data::new: ()
      SOAP::Data::new: ()
      SOAP::Data::new: ()
      SOAP::Transport::HTTP::Client::send_receive: HTTP::Request=HASH(0x848eb08)
      SOAP::Transport::HTTP::Client::send_receive: POST http://sl76msds.vwrsp.com/soap/
      Accept: text/xml
      Accept: multipart/*
      Content-Length: 1087
      Content-Type: text/xml; charset=utf-8
      SOAPAction: "http://sl76msds.vwrsp.com/Com/Vwr/Soap/GetPrice#get_price"

      <?xml version="1.0" encoding="UTF-8"?><SOAP-ENV:Envelope xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance" xmlns:xsd="http://www.w3.org/1999/XMLSchema"><SOAP-ENV:Body><namesp1:get_price xmlns:namesp1="http://sl76msds.vwrsp.com/Com/Vwr/Soap/GetPrice"><c-gensym3 xsi:type="xsd:string">XOvAm3KuF91YCBTuqtbmhg</c-gensym3><SOAP-ENC:Array SOAP-ENC:arrayType="xsd:string[2]" xsi:type="SOAP-ENC:Array"><item xsi:type="xsd:string">28800-062</item><item xsi:type="xsd:string">EA</item></SOAP-ENC:Array><SOAP-ENC:Array SOAP-ENC:arrayType="xsd:string[2]" xsi:type="SOAP-ENC:Array"><item xsi:type="xsd:string">21905-026</item><item xsi:type="xsd:string">PK</item></SOAP-ENC:Array><SOAP-ENC:Array SOAP-ENC:arrayType="xsd:string[2]" xsi:type="SOAP-ENC:Array"><item xsi:type="xsd:string">21905-049</item><item xsi:type="xsd:string">PK</item></SOAP-ENC:Array></namesp1:get_price></SOAP-ENV:Body></SOAP-ENV:Envelope>
      SOAP::Transport::HTTP::Client::send_receive: HTTP::Response=HASH(0x85761e4)
      SOAP::Transport::HTTP::Client::send_receive: HTTP/0.9 200 OK
      Client-Date: Thu, 18 Oct 2001 17:02:59 GMT
      Client-Peer: 12.20.55.70:80

      Status: 200 OK
      Content-Length: 1717
      Content-Type: text/xml; charset=utf-8
      SOAPServer: SOAP::Lite/Perl/0.51

      <?xml version="1.0" encoding="UTF-8"?><SOAP-ENV:Envelope xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/1999/XMLSchema" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"><SOAP-ENV:Body><namesp1:get_priceResponse xmlns:namesp1="http://sl76msds.vwrsp.com/Com/Vwr/Soap/GetPrice"><SOAP-ENC:Array xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="SOAP-ENC:Array[3]"><item xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="xsd:ur-type[8]"><item xsi:type="xsd:string">28800-062</item><item xsi:type="xsd:string">EA</item><item xsi:type="xsd:string">$13.65</item><item xsi:type="xsd:string">$13.65</item><item xsi:type="xsd:int">0</item><item xsi:type="xsd:int">0</item><item xsi:type="xsd:int">0</item><item xsi:type="xsd:int">0</item></item><item xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="xsd:ur-type[8]"><item xsi:type="xsd:string">21905-026</item><item xsi:type="xsd:string">PK</item><item xsi:type="xsd:string">$3.76</item><item xsi:type="xsd:string">$3.76</item><item xsi:type="xsd:int">0</item><item xsi:type="xsd:int">0</item><item xsi:type="xsd:int">0</item><item xsi:type="xsd:int">0</item></item><item xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="xsd:ur-type[8]"><item xsi:type="xsd:string">21905-049</item><item xsi:type="xsd:string">PK</item><item xsi:type="xsd:string">$11.43</item><item xsi:type="xsd:string">$11.43</item><item xsi:type="xsd:int">0</item><item xsi:type="xsd:int">0</item><item xsi:type="xsd:int">0</item><item xsi:type="xsd:int">0</item></item></SOAP-ENC:Array></namesp1:get_priceResponse></SOAP-ENV:Body></SOAP-ENV:Envelope>
      SOAP::Deserializer::deserialize: ()
      SOAP::MIMEParser::new: ()
      SOAP::Parser::decode: ()
      SOAP::SOM::new: ()
      SOAP::Lite::DESTROY: ()
      SOAP::Transport::DESTROY: ()
      SOAP::Transport::HTTP::Client::DESTROY: ()
      SOAP::SOM::DESTROY: ()
      SOAP::Deserializer::DESTROY: ()
      SOAP::MIMEParser::DESTROY: ()
      SOAP::Serializer::DESTROY: ()
      SOAP::Data::DESTROY: ()
      SOAP::Data::DESTROY: ()
      SOAP::Data::DESTROY: ()
      SOAP::Data::DESTROY: ()
      SOAP::Data::DESTROY: ()
      SOAP::Parser::DESTROY: ()
      28800-062:EA:$13.65:$13.65:0:0:0:0
      21905-026:PK:$3.76:$3.76:0:0:0:0
      21905-049:PK:$11.43:$11.43:0:0:0:0

      ####################### END OUTPUT ##################################

      when the proxy is set to https, I get the following:

      SOAP::Transport::new: ()
      SOAP::Serializer::new: ()
      SOAP::Deserializer::new: ()
      SOAP::Parser::new: ()
      SOAP::Lite::new: ()
      SOAP::Transport::HTTP::Client::new: ()
      SOAP::Lite::call: ()
      SOAP::Serializer::envelope: ()
      SOAP::Serializer::envelope: get_price XOvAm3KuF91YCBTuqtbmhg ARRAY(0x80ffe48) ARRAY(0x8134d08) ARRAY(0x8233704)
      SOAP::Data::new: ()
      SOAP::Data::new: ()
      SOAP::Data::new: ()
      SOAP::Data::new: ()
      SOAP::Data::new: ()
      SOAP::Transport::HTTP::Client::send_receive: HTTP::Request=HASH(0x848ea60)
      SOAP::Transport::HTTP::Client::send_receive: POST https://sl76msds.vwrsp.com/soap/
      Accept: text/xml
      Accept: multipart/*
      Content-Length: 1087
      Content-Type: text/xml; charset=utf-8
      SOAPAction: "http://sl76msds.vwrsp.com/Com/Vwr/Soap/GetPrice#get_price"

      <?xml version="1.0" encoding="UTF-8"?><SOAP-ENV:Envelope xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance" xmlns:xsd="http://www.w3.org/1999/XMLSchema"><SOAP-ENV:Body><namesp1:get_price xmlns:namesp1="http://sl76msds.vwrsp.com/Com/Vwr/Soap/GetPrice"><c-gensym3 xsi:type="xsd:string">XOvAm3KuF91YCBTuqtbmhg</c-gensym3><SOAP-ENC:Array SOAP-ENC:arrayType="xsd:string[2]" xsi:type="SOAP-ENC:Array"><item xsi:type="xsd:string">28800-062</item><item xsi:type="xsd:string">EA</item></SOAP-ENC:Array><SOAP-ENC:Array SOAP-ENC:arrayType="xsd:string[2]" xsi:type="SOAP-ENC:Array"><item xsi:type="xsd:string">21905-026</item><item xsi:type="xsd:string">PK</item></SOAP-ENC:Array><SOAP-ENC:Array SOAP-ENC:arrayType="xsd:string[2]" xsi:type="SOAP-ENC:Array"><item xsi:type="xsd:string">21905-049</item><item xsi:type="xsd:string">PK</item></SOAP-ENC:Array></namesp1:get_price></SOAP-ENV:Body></SOAP-ENV:Envelope>
      SOAP::Transport::HTTP::Client::send_receive: HTTP::Response=HASH(0x85acfac)
      SOAP::Transport::HTTP::Client::send_receive: HTTP/0.9 200 OK
      Client-Date: Thu, 18 Oct 2001 17:02:37 GMT
      Client-Peer: 12.20.55.70:443
      Client-SSL-Cert-Issuer: /C=XY/ST=Snake Desert/L=Snake Town/O=Snake Oil, Ltd/OU=Certificate Authority/CN=Snake Oil CA/Email=ca@...
      Client-SSL-Cert-Subject: /C=US/ST=Pennsylvania/L=West Chester/O=VWR/OU=LabVelocity Integration Team/CN=sl76msds.vwrsp.com/Email=jstelzer@...
      Client-SSL-Cipher: EDH-RSA-DES-CBC3-SHA
      Client-SSL-Warning: Peer certificate not verified

      Status: 500 Internal Server Error
      Content-Length: 1947
      Content-Type: text/xml; charset=utf-8
      SOAPServer: SOAP::Lite/Perl/0.51

      <?xml version="1.0" encoding="UTF-8"?><SOAP-ENV:Envelope xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/1999/XMLSchema" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"><SOAP-ENV:Body><SOAP-ENV:Fault><faultcode xsi:type="xsd:string">SOAP-ENV:Client</faultcode><faultstring xsi:type="xsd:string">Uncaught exception from user code:
      SOAP::Fault=HASH(0x781834) at /usr/local/lib/perl5/site_perl/5.005/SOAP/Lite.pm line 1997
      eval {...} called at /usr/local/lib/perl5/site_perl/5.005/SOAP/Lite.pm line 1944
      SOAP::Server::handle('SOAP::Transport::HTTP::CGI=HASH(0x6afce0)', '<?xml version="1.0" encoding="UTF-8"?><SOAP-ENV:Envelope xmlns:S...') called at /usr/local/lib/perl5/site_perl/5.005/SOAP/Transport/HTTP.pm line 237
      SOAP::Transport::HTTP::Server::handle('SOAP::Transport::HTTP::CGI=HASH(0x6afce0)') called at /usr/local/lib/perl5/site_perl/5.005/SOAP/Transport/HTTP.pm line 309
      SOAP::Transport::HTTP::CGI::handle('SOAP::Transport::HTTP::CGI=HASH(0x6afce0)') called at /www/vwr3/web/soap/index.cgi line 4
      eval 'package Apache::ROOTsl76msds_2evwrsp_2ecom::soap::index_2ecgi;use Apache qw(exit);
      #line 1 /www/vwr3/web/soap/index.cgi
      BEGIN {$^W = 1;}; $^W = 1;#!/usr/bin/perl -w
      use SOAP::Transport::HTTP;

      SOAP::Transport::HTTP::CGI->dispatch_to(@INC)->handle();


      ;' called at /usr/local/lib/perl5/site_perl/5.005/sun4-solaris/Apache/PerlRun.pm line 115
      Apache::PerlRun::compile('Apache::PerlRun=HASH(0x47b948)', 'SCALAR(0x48ec38)') called at /usr/local/lib/perl5/site_perl/5.005/sun4-solaris/Apache/PerlRun.pm line 291
      Apache::PerlRun::handler('Apache::PerlRun', 'Apache=SCALAR(0x47b930)') called at /www/vwr3/web/soap/index.cgi line 0
      eval {...} called at /www/vwr3/web/soap/index.cgi line 0
      </faultstring></SOAP-ENV:Fault></SOAP-ENV:Body></SOAP-ENV:Envelope>
      SOAP::Deserializer::deserialize: ()
      SOAP::MIMEParser::new: ()
      SOAP::Parser::decode: ()
      SOAP::SOM::new: ()
      SOAP::Lite::DESTROY: ()
      SOAP::Transport::DESTROY: ()
      SOAP::Transport::HTTP::Client::DESTROY: ()
      SOAP::SOM::DESTROY: ()
      SOAP::Deserializer::DESTROY: ()
      SOAP::MIMEParser::DESTROY: ()
      SOAP::Serializer::DESTROY: ()
      SOAP::Data::DESTROY: ()
      SOAP::Data::DESTROY: ()
      SOAP::Data::DESTROY: ()
      SOAP::Data::DESTROY: ()
      SOAP::Data::DESTROY: ()
      SOAP::Parser::DESTROY: ()
      ######################### END OUTPUT #####################

      Does anyone have an idea what could be causing this?


      Client-SSL-Warning: Peer certificate not verified
      How critical is this? Is a self generated cert ok for this?
      I'm not doing certificate baset authentication, I'm just encrypting the
      data channel.



      Status: 500 Internal Server Error
      Obviously this is bad, I just dont know what causes it. Its the same perl
      binary. I dumped out perl's @INC. Its the same on the https side as it is
      on the http side. I'm at a bit of a loss.



      I'm sorry this is long, but I'm trying to include all relevent
      information.

      I'm using
      apache_1.3.20
      mm-1.1.3
      mod_perl-1.26
      mod_ssl-2.8.4-1.3.20
      openssl-0.9.6b

      I compiled apache with --disable-rule=EXPAT.
      SOAP-Lite-0.51 and XML-Parser-2.30 are installed.


      Anyone have any ideas?


      --
      Mental (Mental@...)

      A darkness grows inside me in fading shades of gray
      All the colors of the world are slowly sucked away
      I'm sinking ever deeper to a place that's cold and black
      I can't believe I've lost you and you're never coming back
      --Stabbing Westward

      GPG public key: http://www.neverlight.com/Mental.asc
    Your message has been successfully submitted and would be delivered to recipients shortly.