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

SOAP:Lite differences between IIS 6 and Apache

Expand Messages
  • mcm1303
    I have a server that consists of a dispatcher and a separate module running under IIS. I ran them under IIS and Apache. Apache seems to feed way more
    Message 1 of 1 , Jan 14, 2008
    • 0 Attachment
      I have a server that consists of a dispatcher and a separate module
      running under IIS. I ran them under IIS and Apache. Apache seems to
      feed way more information to the method being called than IIS can.
      For example, My soap envelope calls OTA_HotelResNotifRQ and contains
      a soap:Header and, of course, a soap:Body. The soap:Header is what I
      need for authentication. Using Data::Dumper I can examine @_ in the
      OTA_HotelResNotifRQ subroutine both when run under Apache and IIS,
      Under Apache, @_ is huge and contains info from the SOAP:Header.
      Also I can see some SOAP:SOM blessed objects like _content and
      _context, plus _raw_xml (I made the one line mod to Lite.pm)
      However, when I run it under IIS, I get squat. All I get in @_ is
      the name of the Action Header as the first element and the contents
      of the soap:Body in a complex data structure. I'd be most
      appreciative is someone could tell me a way to at least get the
      soap:Header information.

      Thanks!
      Marlin Mixon

      Details are below

      I'm using SOAP:Lite 0.07_3 with the _raw_xml mod, IIS 6.0 ActiveState
      Perl Version 5.8.8, build 819. Using perl.exe.

      I'm including my test client:
      #!perl -w
      use SOAP::Lite +trace;
      print "Started...\n";
      $soap = SOAP::Lite
      -> proxy('http://www.myserver.com/OTA2Way/LXR.pl')
      -> uri('http://www.opentravel.org/OTA/2003/05')
      -> autotype(0);

      my $head =
      SOAP::Header->name(HTNGHeader => {
      From => {
      Credential => {
      username => "Marlin",
      password => "test-password"
      }
      }
      }
      );

      my $data =
      SOAP::Data->name('OTA_HotelResNotifRQ' =>
      HotelReservations => {
      HotelReservation => {
      UniqueId => '',
      RoomStays => {
      RoomStay => {
      Total => '',
      RoomTypes => {
      RoomType =>
      [IsRoom => 'true', RoomTypeCode=>'st2d', NumberOfUnits=>'1'],

      RoomDescription => [Name => 'Standard 2 Doubles']
      }
      }
      }
      }
      }
      );
      $data->uri("http://www.opentravel.org/OTA/2003/05");
      $data->prefix("soapadope");


      print $soap
      -> OTA_HotelResNotifRQ($head, $data)
      -> result;

      Here is my server for IIS, LXR.pl, containing the dispatch_to:

      #!C:/perl/bin/perl
      BEGIN { push @INC, "D:\\inetpub\\wwwroot\\lxr\\OTA2WAY"; }
      use SOAP::Transport::HTTP;
      use CGI::Carp qw(fatalsToBrowser);
      $soap = SOAP::Transport::HTTP::CGI
      -> dispatch_to('D:/inetpub/wwwroot/lxr/OTA2Way')
      -> handle;

      Here is my module for IIS that resides in OTA/2003/05.pm
      package OTA::2003::05;

      use vars qw(@ISA @EXPORT @EXPORT_OK $VERSION);
      use SOAP::Transport::HTTP;
      require Exporter;

      @ISA = qw(Exporter OTA::2003);
      @EXPORT = qw();
      @EXPORT_OK = qw();
      $VERSION = '0.1';
      sub OTA_HotelResNotifRQ {
      my ($self, @data) = @_;
      my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) =
      gmtime();
      $year += 1900;
      $mon += 1;
      my $nowTimeStamp = sprintf("%4d-%02d-%02dT%02d:%02d:%
      02d.000", $year, $mon, $mday, $hour, $min, $sec);
      my $x = $data;
      open OLOG, ">>D:\\lxrlog\\OTA_server5.log\n";
      print OLOG "$nowTimeStamp GMT - In OTA_HotelResNotifRQ\n";
      print OLOG "self=$self data=$x\n";
      @VAR1 = @_;
      #bless($VAR1[3], 'SOAP::SOM');
      # @array = $VAR1[3]->{'_content'};
      #$rawXML = $VAR1[3]->{'_raw_xml'} . "\n";
      #print OLOG "raw xml = $rawXML\n";

      # print OLOG "serialized = $objstr\n";
      close OLOG;

      my $retval = SOAP::Data->name('OTA_HotelResNotifRS' =>
      [TimeStamp=>$nowTimeStamp, Version=>'0.01'] => { Success => '' } );
      return $retval;
      }
      1;
    Your message has been successfully submitted and would be delivered to recipients shortly.