#!/usr/local/bin/perl -w

use strict;

use App::Options (
    options => [
        "responder",
    ],
    option => {
        responder => {
            description => "URL that this server is listening on",
            default => "http://localhost/cgi-bin/otasoap",
        },
    },
);

=head1 NAME

otasoap - A CGI program (and Registry program under mod_perl) that responds to OTA messages sent via SOAP

=head1 SYNOPSIS

  # use the "otaclient" program to exercise "otasoap"
  # (make sure you have "client_class" set to "Business::Travel::OTA::Client::SOAP")

  otaclient --ping
  otaclient --ping --client_class=Business::Travel::OTA::Client::SOAP --responder=http://localhost/cgi-bin/otasoap

=head1 DESCRIPTION

The "otasoap" program is a CGI program (and Registry program under mod_perl)
that responds to OTA messages sent via SOAP.

=cut

use Business::Travel::OTA::Server;
use SOAP::Transport::HTTP;

{
    my $module_dir = $INC{"Business/Travel/OTA/Server.pm"};
    $module_dir =~ s!\\!/!g;  # convert to POSIX-compliant path (Win32)
    $module_dir =~ s!/Business/Travel/OTA/Server.pm$!!; # trim the module name to get the dir

    SOAP::Transport::HTTP::CGI   
        ->dispatch_to($module_dir, "Business::Travel::OTA::Server")
        -> handle;
}

=head1 ACKNOWLEDGEMENTS

 * Author:  Stephen Adkins <sadkins@therubicongroup.com>
 * Copyright: (c) 2005 Stephen Adkins (for the purpose of making it Free)
 * License: This is free software. It is licensed under the same terms as Perl itself.

=head1 SEE ALSO

=cut

