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

SOAP::Lite and URL rewriting problem

Expand Messages
  • prosaic.harper
    Hi, I am a relative SOAP::Lite newcomer and have written a client/server pair that does some fairly simple things. The application works well inside my company
    Message 1 of 1 , May 11 5:40 PM
    • 0 Attachment
      Hi,

      I am a relative SOAP::Lite newcomer and have written a client/server
      pair that does some fairly simple things. The application works well
      inside my company intranet and does the task I want nicely. The server
      code sits in a Perl 5.8 CGI script under Apache 2 on Linux. The client
      code is also Perl and runs under ActiveState with Windows XP. Now I want
      to run the client from outside the company intranet and communicate with
      the server while it is still inside. This requires communicating through
      the front door of our company Firewall.

      The corporate Firewall system provides a mechanism (probably based on
      the Apache URL rewriting module) for mapping outside access to internal
      URLs. I do not have any control over this and need to work with what is
      there. I am having problem with the SOAP return path. It looks to me
      like the URL rewriting is causing problems with the SOAP communications
      but I do not know how to adjust for it. I get the following sort of
      trace with my first SOAP call (note the 411 Length Required error
      return). I would appreciate some advice on what I am missing.

      The client the following sort of proxy call:

      # Open a connection to SOAP server
      my $postit_connection = SOAP::Lite
      -> uri('http://postit.atc.alcoa.com/Postit')
      ->
      proxy('https://www.alcoadirect.com/welcome.jsp?email=&password=parcel&fu
      nction=postit'
      cookie_jar => HTTP::Cookies->new(ignore_discard => 1)
      );

      The Firewall is mapping the www.alcoadirect.com to the intranet server
      URL which is
      http://parcelpost.atc.alcoa.com:1226/cgi-bin/parcelPostit.cgi where the
      SOAP server script processing takes place. All appears OK so far. But
      then the return path does not work. A typical trace result is below:

      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_parcel_id <opt>
      <comments></comments>
      <customMessage></customMessage>
      <date>Wed%20May%2010%2014%3A19%3A48%202006</date>
      <files>
      <block_size>1572864</block_size>
      <file_name>test2.pl</file_name>
      </files>
      <fromAddress>ATC</fromAddress>
      <fromDottedQuad>132.226.12.26</fromDottedQuad>
      <fromEmail>michael.harper%40ieee.org</fromEmail>
      <fromFax></fromFax>
      <fromName>Mike%20Harper</fromName>
      <fromPhone>724%20337%205414</fromPhone>
      <re>test</re>
      <subjectLine>test</subjectLine>
      <toAddressList>michael.harper%40alcoa.com</toAddressList>
      </opt>
      SOAP::Data::new: ()
      SOAP::Data::new: ()
      SOAP::Data::new: ()
      SOAP::Data::new: ()
      SOAP::Data::new: ()
      SOAP::Transport::HTTP::Client::send_receive:
      HTTP::Request=HASH(0x1f3e198)
      SOAP::Transport::HTTP::Client::send_receive: POST
      https://www.alcoadirect.com/welcome.jsp?email=&passwo
      rd=parcel&function=postit&user=michael.harper@...&porthole=552ca201
      41580533a32d481bfdd6ea7d
      Accept: text/xml
      Accept: multipart/*
      Content-Length: 1192
      Content-Type: text/xml; charset=utf-8
      SOAPAction: "http://postit.atc.alcoa.com/Postit#get_parcel_id"

      <?xml version="1.0" encoding="UTF-8"?><SOAP-ENV:Envelope
      xmlns:xsi="http://www.w3.org/1999/XMLSchema-in
      stance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
      xmlns:SOAP-ENV="http://schemas.xmlso
      ap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/1999/XMLSchema"
      SOAP-ENV:encodingStyle="http://sche
      mas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><namesp1:get_parcel_id
      xmlns:namesp1="http://postit.atc.
      alcoa.com/Postit"><c-gensym3 xsi:type="xsd:string"><opt>
      <comments></comments>
      <customMessage></customMessage>
      <date>Wed%20May%2010%2014%3A19%3A48%202006</date>
      <files>
      <block_size>1572864</block_size>
      <file_name>test2.pl</file_name>
      </files>
      <fromAddress>ATC</fromAddress>
      <fromDottedQuad>132.226.12.26</fromDottedQuad>
      <fromEmail>michael.harper%40ieee.org</fromEmail>
      <fromFax></fromFax>
      <fromName>Mike%20Harper</fromName>
      <fromPhone>724%20337%205414</fromPhone>
      <re>test</re>
      <subjectLine>test</subjectLine>
      <toAddressList>michael.harper%40alcoa.com</toAddressList>
      </opt>
      </c-gensym3></namesp1:get_parcel_id></SOAP-ENV:Body></SOAP-ENV:Envelope>
      SOAP::Transport::HTTP::Client::send_receive:
      HTTP::Response=HASH(0x20d0934)
      SOAP::Transport::HTTP::Client::send_receive: HTTP/1.1 411 Length
      Required
      Connection: close
      Date: Wed, 10 May 2006 18:19:51 GMT
      Server: Apache/2.0.54 (Unix) mod_ssl/2.0.54 OpenSSL/0.9.7g
      Content-Length: 0
      Content-Type: text/plain
      Client-Date: Wed, 10 May 2006 18:19:51 GMT
      Client-Peer: 192.135.121.12:443
      Client-Response-Num: 1
      Client-SSL-Cert-Issuer: /C=US/O=Equifax/OU=Equifax Secure Certificate
      Authority
      Client-SSL-Cert-Subject: /C=US/ST=Pennsylvania/L=Pittsburgh/O=Alcoa
      Inc/OU=Global Information Services/
      CN=*.alcoadirect.com
      Client-SSL-Cipher: DHE-RSA-AES256-SHA
      Client-SSL-Warning: Peer certificate not verified

      411 Length Required at postit.pl line 211
      SOAP::Data::DESTROY: ()
      SOAP::Data::DESTROY: ()
      SOAP::Data::DESTROY: ()
      SOAP::Transport::HTTP::Client::DESTROY: ()
      SOAP::Parser::DESTROY: ()
      SOAP::Transport::DESTROY: ()
      SOAP::Serializer::DESTROY: ()
      SOAP::Data::DESTROY: ()
      SOAP::Data::DESTROY: ()
      SOAP::Deserializer::DESTROY: ()
      SOAP::Lite::DESTROY: ()
    Your message has been successfully submitted and would be delivered to recipients shortly.