Sisyphus repositório
Última atualização: 17 outubro 2019 | SRPMs: 17500 | Visitas: 15283244
en ru br
ALT Linux repositórios
S:0.73-alt2
5.0: 0.72-alt3.1
4.1: 0.72-alt1

Group :: Desenvolvimento/Perl
RPM: perl-Apache2-SOAP

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs e FR  Repocop 

Apache2-SOAP-0.72/000075500000000000000000000000001077772733200134625ustar00rootroot00000000000000Apache2-SOAP-0.72/Changes000064400000000000000000000007771077772733200147700ustar00rootroot00000000000000Revision history for Perl extension Apache2::SOAP.

0.72 August 2, 2006
- fix problem with using mod_perl-2 when both mod_perl-1
and mod_perl-2 are installed (reported by Georg Grabler;
fix supplied by Tom Schindl)

0.71 January 9, 2006
- fix Makefile.PL error: Can't use string ("Apache::TestMM")
as a HASH ref while "strict refs" (reported and fixed by
Gordon Lack)

0.70 June 14, 2005
- initial CPAN release as a standalone module (was previously
available within CPAN-Search-Lite)Apache2-SOAP-0.72/MANIFEST000064400000000000000000000003731077772733200146160ustar00rootroot00000000000000lib/Apache2/SOAP.pm
lib/SOAP/Transport/HTTP2.pm
Makefile.PL
MANIFEST This list of files
META.yml Module meta-data (added by MakeMaker)
t/conf/extra.last.conf.in
t/lib/TestSOAP.pm
t/lib/TestSOAP/convert.pm
t/soap/convert.t
t/TEST.PL
README
Changes
Apache2-SOAP-0.72/META.yml000064400000000000000000000012341077772733200147330ustar00rootroot00000000000000# http://module-build.sourceforge.net/META-spec.html
#XXXXXXX This is a prototype!!! It will change in the future!!! XXXXX#
name: Apache2-SOAP
version: 0.72
version_from: lib/Apache2/SOAP.pm
installdirs: site
requires:
mod_perl2: 0
SOAP::Lite: 0
license: perl
abstract: mod_perl-2 SOAP server
authored_by:
- Randy Kobes <r.kobes@uwinnipeg.ca>
provides:
Apache2::SOAP:
file: lib/Apache2/SOAP.pm
version: 0.72
SOAP::Transport::HTTP2:
file: lib/SOAP/Transport/HTTP2.pm
version: 0.72
distribution_type: module
generated_by: ExtUtils::MakeMaker version 6.17
Apache2-SOAP-0.72/Makefile.PL000075500000000000000000000020741077772733200154420ustar00rootroot00000000000000#!/usr/bin/perl -w
use strict;
use ExtUtils::MakeMaker;
# See lib/ExtUtils/MakeMaker.pm for details of how to influence
# the contents of the Makefile that is written.

my $prereqs = {'SOAP::Lite' => 0,
'mod_perl2' => 0,
};
my %opts = (
NAME => 'Apache2::SOAP',
VERSION_FROM => 'lib/Apache2/SOAP.pm', # finds $VERSION
dist => {
SUFFIX => 'gz',
COMPRESS => 'gzip -9f',
},
PL_FILES => {},
PREREQ_PM => $prereqs,
);

my $eu_version = $ExtUtils::MakeMaker::VERSION;
if ($eu_version >= 5.43) {
$opts{ABSTRACT} = q{mod_perl-2 SOAP server};
$opts{AUTHOR} = 'Randy Kobes <r.kobes@uwinnipeg.ca>';
}
if ($eu_version > 6.11 ) {
$opts{NO_META} = 1;
}

eval {require ModPerl::MM;};
if ($@) {
die "ModPerl::MM required";
}

require Apache::TestMM;
import Apache::TestMM qw(test clean);

Apache::TestMM::filter_args();

Apache::TestMM::generate_script('t/TEST');

ModPerl::MM::WriteMakefile(%opts);
Apache2-SOAP-0.72/README000064400000000000000000000020421077772733200143400ustar00rootroot00000000000000DESCRIPTION

This is a replacement for Apache::SOAP (and SOAP::Transport::HTTP)
designed to work with the CPAN version of mod_perl 2. It is intended
as a temporary measure until the SOAP-Lite distribution
implements this functionality. Note that the provided modules
(Apache2::SOAP and SOAP::Transport::HTTP2) do not clash with
any modules of SOAP-Lite.

INSTALLATION

Installation proceeds in the usual fashion:

perl Makefile.PL
make
make test
make install

The following CPAN modules will be required:

SOAP::Lite
mod_perl2

For Win32 (builds 8xx), ppm packages are available from ActiveState's
default repository, http://www.bribes.org/perl/ppm/, or
http://theoryx5.uwinnipeg.ca/ppms/.

USAGE

Usage is the same as Apache::SOAP.

COPYRIGHT

The SOAP-Lite package is Copyright (C) 2000-2001 Paul Kulchenko.
All rights reserved. The changes necessary for use on
mod_perl 2 are provided by Randy Kobes <r.kobes@uwinnipeg.ca>.
This software is distributed under the same terms as Perl itself.
See http://www.perl.com/perl/misc/Artistic.html.

Apache2-SOAP-0.72/lib/000075500000000000000000000000001077772733200142305ustar00rootroot00000000000000Apache2-SOAP-0.72/lib/Apache2/000075500000000000000000000000001077772733200154735ustar00rootroot00000000000000Apache2-SOAP-0.72/lib/Apache2/SOAP.pm000064400000000000000000000072521077772733200166010ustar00rootroot00000000000000# ======================================================================
#
# Copyright (C) 2000-2001 Paul Kulchenko (paulclinger@yahoo.com)
# SOAP::Lite is free software; you can redistribute it
# and/or modify it under the same terms as Perl itself.
#
# $Id: SOAP.pm,v 1.3 2006/08/02 15:55:38 rkobes Exp $
#
# ======================================================================

package Apache2::SOAP;

use strict;
use vars qw(@ISA $VERSION);
use SOAP::Transport::HTTP2;

@ISA = qw(SOAP::Transport::HTTP2::Apache);
#$VERSION = sprintf("%d.%s", map {s/_//g; $_} q$Name: $ =~ /-(\d+)_([\d_]+)/);
$VERSION = 0.72;

my $server = __PACKAGE__->new;

sub handler {
$server->configure(@_);
$server->SUPER::handler(@_);
}

# ======================================================================

1;

__END__

=head1 NAME

Apache2::SOAP - mod_perl-2 SOAP server

=head1 SYNOPSIS

=over 4

=item httpd.conf (Location), directory-based access

<Location /mod_soap>
SetHandler perl-script
PerlResponseHandler Apache2::SOAP
PerlSetVar dispatch_to "/Your/Path/To/Deployed/Modules, Module::Name, Module::method"
PerlSetVar options "compress_threshold => 10000"
</Location>

=item httpd.conf (Files), file-based access

<FilesMatch "\.soap$">
SetHandler perl-script
PerlResponseHandler Apache2::SOAP
PerlSetVar dispatch_to "/Your/Path/To/Deployed/Modules, Module::Name, Module::method"
PerlSetVar options "compress_threshold => 10000"
</FilesMatch>

=item .htaccess, directory-based access

SetHandler perl-script
PerlResponseHandler Apache2::SOAP
PerlSetVar dispatch_to "/Your/Path/To/Deployed/Modules, Module::Name, Module::method"
PerlSetVar options "compress_threshold => 10000"

=back

=head1 DESCRIPTION

This Apache Perl module provides the ability to add support for SOAP (Simple
Object Access Protocol) protocol with easy configuration (either in .conf or
in .htaccess file). This functionality should give you lightweight option
for hosting SOAP services and greatly simplify configuration aspects. This
module inherites functionality from SOAP::Transport::HTTP2::Apache component
of SOAP::Lite module.

=head1 CONFIGURATION

The module can be placed in <Location>, <Directory>, <Files>, <FilesMatch>
directives in main server configuration areas or directly in .htaccess file.

All parameters should be quoted and can be separated with commas or spaces
for lists ("a, b, c") and with 'wide arrows' and commas for hash parameters
("key1 => value1, key2 => value2").

All options that you can find in SOAP::Transport::HTTP2::Apache component
are available for configuration. Here is the description of most important
ones.

=over 4

=item dispatch_to (LIST)

Specifies path to directory that contains Perl modules you'd like to give
access to, or just list of modules (for preloaded modules).

PerlSetVar dispatch_to "/Your/Path/To/Deployed/Modules, Module::Name, Module::method"

=item options (HASH)

Specifies list of options for your module, for example threshold for
compression. Future versions will support more options. See
SOAP::Transport::HTTP2 documentation for other options.

PerlSetVar options "compress_threshold => 10000"

=back

=head1 DEPENDENCIES

SOAP::Lite
mod_perl2

=head1 SEE ALSO

SOAP::Transport::HTTP2::Apache for implementation details,
SOAP::Lite for general information, and
F<examples/server/mod_soap.htaccess> for .htaccess example

=head1 COPYRIGHT

Copyright (C) 2000-2001 Paul Kulchenko. All rights reserved.

This library is free software; you can redistribute it and/or modify
it under the same terms as Perl itself.

=head1 AUTHOR

Paul Kulchenko (paulclinger@yahoo.com)

Changes for mod_perl 2 supplied by
Randy Kobes (r.kobes@uwinnipeg.ca).

=cut
Apache2-SOAP-0.72/lib/SOAP/000075500000000000000000000000001077772733200147725ustar00rootroot00000000000000Apache2-SOAP-0.72/lib/SOAP/Transport/000075500000000000000000000000001077772733200167665ustar00rootroot00000000000000Apache2-SOAP-0.72/lib/SOAP/Transport/HTTP2.pm000064400000000000000000000111551077772733200201700ustar00rootroot00000000000000# ======================================================================
#
# Copyright (C) 2000-2004 Paul Kulchenko (paulclinger@yahoo.com)
# SOAP::Lite is free software; you can redistribute it
# and/or modify it under the same terms as Perl itself.
#
# $Id: HTTP2.pm,v 1.3 2006/08/02 15:55:38 rkobes Exp $
#
# ======================================================================

package SOAP::Transport::HTTP2;

use strict;
use vars qw($VERSION @ISA);
#$VERSION = sprintf("%d.%s", map {s/_//g; $_} q$Name: $ =~ /-(\d+)_([\d_]+)/);
$VERSION = 0.72;

use SOAP::Lite;
use SOAP::Transport::HTTP;

@ISA = qw(SOAP::Transport::HTTP);

# ======================================================================

package SOAP::Transport::HTTP2::Client;

use vars qw(@ISA);
@ISA = qw(SOAP::Transport::HTTP::Client);

# ======================================================================

package SOAP::Transport::HTTP2::Server;

use vars qw(@ISA);
@ISA = qw(SOAP::Transport::HTTP::Server);

# ======================================================================

package SOAP::Transport::HTTP2::CGI;

use vars qw(@ISA);
@ISA = qw(SOAP::Transport::HTTP::CGI);

# ======================================================================

package SOAP::Transport::HTTP2::Daemon;

use vars qw(@ISA);
@ISA = qw(SOAP::Transport::HTTP::Daemon);

# ======================================================================

package SOAP::Transport::HTTP2::Apache;

use vars qw(@ISA);
@ISA = qw(SOAP::Transport::HTTP::Server);

sub DESTROY { SOAP::Trace::objects('()') }

sub new {
my $self = shift;
unless (ref $self) {
my $class = ref($self) || $self;
$self = $class->SUPER::new(@_);
SOAP::Trace::objects('()');
}
MOD_PERL: {
( (exists $ENV{MOD_PERL_API_VERSION}) &&
($ENV{MOD_PERL_API_VERSION} == 2) ) and do {
require Apache2::RequestRec;
require Apache2::RequestUtil;
require Apache2::RequestIO;
require Apache2::Const;
require APR::Table;
Apache2::Const->import(-compile => 'OK');
$self->{'MOD_PERL_VERSION'} = 2;
last MOD_PERL;
};
(eval { require Apache;} ) and do {
require Apache::Constants;
Apache::Constants->import('OK');
$self->{'MOD_PERL_VERSION'} = 1;
last MOD_PERL;
};
die "Unsupported version of mod_perl";
}
return $self;
}

sub handler {
my $self = shift->new;
my $r = shift;
unless ($r) {
$r = ($self->{'MOD_PERL_VERSION'} == 1) ?
Apache->request : Apache2::RequestUtil->request();
}

my $cl = ($self->{'MOD_PERL_VERSION'} == 1) ?
$r->header_in('Content-length') : $r->headers_in->{'Content-length'};
$self->request(HTTP::Request->new(
$r->method() => $r->uri,
HTTP::Headers->new($r->headers_in),
do { my ($c,$buf); while ($r->read($buf,$cl)) { $c.=$buf; } $c; }
));
$self->SUPER::handle;

# we will specify status manually for Apache, because
# if we do it as it has to be done, returning SERVER_ERROR,
# Apache will modify our content_type to 'text/html; ....'
# which is not what we want.
# will emulate normal response, but with custom status code
# which could also be 500.
if ($self->{'MOD_PERL_VERSION'} == 1 ) {
$self->response->headers->scan(sub { $r->header_out(@_) });
$r->send_http_header(join '; ', $self->response->content_type);
$r->print($self->response->content);
return &Apache::Constants::OK;
}
else {
$self->response->headers->scan(sub {
my %h = @_;
for (keys %h) {
$r->headers_out->{$_} = $h{$_};
}
});
$r->content_type(join '; ', $self->response->content_type);
$r->print($self->response->content);
return &Apache2::Const::OK;
}
}

sub configure {
my $self = shift->new;
my $config = shift->dir_config;
foreach (%$config) {
$config->{$_} =~ /=>/
? $self->$_({split /\s*(?:=>|,)\s*/, $config->{$_}})
: ref $self->$_() ? () # hm, nothing can be done here
: $self->$_(split /\s+|\s*,\s*/, $config->{$_})
if $self->can($_);
}
$self;
}

{ sub handle; *handle = \&handler } # just create alias

# ======================================================================
#
# Copyright (C) 2001 Single Source oy (marko.asplund@kronodoc.fi)
# a FastCGI transport class for SOAP::Lite.
#
# ======================================================================

package SOAP::Transport::HTTP2::FCGI;

use vars qw(@ISA);
@ISA = qw(SOAP::Transport::HTTP::FCGI);

# ======================================================================

1;
Apache2-SOAP-0.72/t/000075500000000000000000000000001077772733200137255ustar00rootroot00000000000000Apache2-SOAP-0.72/t/TEST.PL000075500000000000000000000001731077772733200147450ustar00rootroot00000000000000#!perl
use strict;
use warnings FATAL => 'all';
use Apache::TestRunPerl();
use blib;
Apache::TestRunPerl->new->run(@ARGV);
Apache2-SOAP-0.72/t/conf/000075500000000000000000000000001077772733200146525ustar00rootroot00000000000000Apache2-SOAP-0.72/t/conf/extra.last.conf.in000064400000000000000000000002571077772733200202170ustar00rootroot00000000000000<Location /TestSOAP__convert>
SetHandler perl-script
PerlResponseHandler Apache2::SOAP
PerlSetVar dispatch_to "@ServerRoot@/response, TestSOAP::convert"
</Location>

Apache2-SOAP-0.72/t/lib/000075500000000000000000000000001077772733200144735ustar00rootroot00000000000000Apache2-SOAP-0.72/t/lib/TestSOAP.pm000064400000000000000000000013561077772733200164400ustar00rootroot00000000000000package TestSOAP;
use strict;
use warnings;

use base qw(Exporter);
our (@EXPORT_OK);
@EXPORT_OK = qw(make_soap);

sub make_soap {
my ($soap_uri, $soap_proxy) = @_;
unless (eval { require SOAP::Lite }) {
print STDERR "SOAP::Lite is unavailable to make remote call\n";
return;
}

return SOAP::Lite
->uri($soap_uri)
->proxy($soap_proxy,
options => {compress_threshold => 10000})
->on_fault(sub { my($soap, $res) = @_;
print STDERR "SOAP Fault: ",
(ref $res ? $res->faultstring
: $soap->transport->status),
"\n";
return undef;
});
}

1;
Apache2-SOAP-0.72/t/lib/TestSOAP/000075500000000000000000000000001077772733200160755ustar00rootroot00000000000000Apache2-SOAP-0.72/t/lib/TestSOAP/convert.pm000064400000000000000000000003731077772733200201160ustar00rootroot00000000000000package TestSOAP::convert;
use strict;
use warnings;

sub convert {
my ($self, %args) = @_;
my $mode = $args{mode};
my $string = $args{string};
my $response = ($mode eq 'uc') ? uc($string) : lc($string);
return {results => $response};
}

1;
Apache2-SOAP-0.72/t/soap/000075500000000000000000000000001077772733200146675ustar00rootroot00000000000000Apache2-SOAP-0.72/t/soap/convert.t000075500000000000000000000021031077772733200165330ustar00rootroot00000000000000#!/usr/bin/perl
use strict;
use warnings;
use Apache::Test;
use Apache::TestUtil qw(t_cmp);
use Apache::TestRequest qw(GET);
use FindBin;
use lib "$FindBin::Bin/../lib";
use TestSOAP qw(make_soap);

my $config = Apache::Test::config();
my $hostport = Apache::TestRequest::hostport($config) || '';

plan tests => 11;

my $soap_uri = "http://$hostport/TestSOAP/convert";
my $soap_proxy = "http://$hostport/TestSOAP__convert";
my $soap = make_soap($soap_uri, $soap_proxy) or die "SOAP::Lite setup failed";
ok t_cmp(defined $soap, 1, "$soap");
my $string = 'AbCdEfG';

my $out = $soap->convert(mode => 'lc', string => $string);
eval{$out->fault};
ok t_cmp($@, "");
ok t_cmp($out->fault, undef);
my $results = $out->result();
ok t_cmp(defined $results, 1);
ok t_cmp(ref($results), 'HASH');
ok t_cmp($results->{results}, lc($string));

$out = $soap->convert(mode => 'uc', string => $string);
eval{$out->fault};
ok t_cmp($@, "");
ok t_cmp($out->fault, undef);
$results = $out->result();
ok t_cmp(defined $results, 1);
ok t_cmp(ref($results), 'HASH');
ok t_cmp($results->{results}, uc($string));

 
projeto & código: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
mantenedor atual: Michael Shigorin
mantenedor da tradução: Fernando Martini aka fmartini © 2009