@@ -2,24 +2,56 @@
=== version history of XML::Compile::SOAP::Daemon
TODO:
- . trace incoming and outgoing messages.
+ . trace incoming and outgoing messages server-side
-version 3.06: Fri May 3 10:07:33 CEST 2013
+version 3.10: Wed Nov 26 08:45:03 CET 2014
+
+ Fixes:
+ - please Perl 5.20.1 change of import score in regression test
+ [cpantesters]
+
+version 3.09: Wed May 28 09:26:56 CEST 2014
+
+ Fixes:
+ - ::AnyDaemon warning on use of connection timout (expires)
+ - t/wsa.t use of constants with perl 5.18.2 [cpantesters]
Improvements:
+ - faultNotImplemented called as instance method.
+ - change documentation style.
+ - ::Daemon::CGI support for fcgi, only needs run(nph => 0) [Immo]
+ - request for ?wsdl now case insensitive
+ - improve example/any-daemon script
+
+version 3.08: Wed Jan 8 00:56:28 CET 2014
+
+ Fixes:
+ - depend on new XML::Compile::WSDL11 [cpantesters]
+
+version 3.07: Mon Jan 6 23:19:49 CET 2014
+ Fixes:
+ - ::AnyDaemon fix parameters [Theo Bot]
+ - adapt to changes in XML::Compile::SOAP.
+ rt.cpan.org#91900 [Raffeallo Galli]
+
+ Improvements:
+ - use parent, to replace use base.
+ - ::setWsdlResponse() now can have mime-type parameter
+
+version 3.06: Fri May 3 10:07:33 CEST 2013
+
+ Improvements:
- ::CGI configuration example for Apache VirtualHost
[Dan Lyke]
version 3.05: Thu Aug 16 00:22:31 CEST 2012
Fixes:
-
- various minor improvements to the new ::PSGI backend.
[Piotr Roszatycki]
Improvements:
-
- additional regression test for psgi.
[Piotr Roszatycki].
@@ -35,14 +35,16 @@
"Log::Report" : "0.9",
"Test::More" : "0.54",
"Time::HiRes" : "0",
- "XML::Compile" : "1.26",
+ "XML::Compile" : "1.44",
"XML::Compile::Cache" : "0.991",
- "XML::Compile::SOAP" : "2.29",
- "XML::Compile::SOAP::WSA" : "0.12",
- "XML::Compile::Tester" : "0.9"
+ "XML::Compile::SOAP" : "3.00",
+ "XML::Compile::SOAP12" : "3.01",
+ "XML::Compile::Tester" : "0.90",
+ "XML::Compile::WSA" : "0.90",
+ "XML::Compile::WSDL11" : "3.00"
}
}
},
"release_status" : "stable",
- "version" : "3.06"
+ "version" : "3.10"
}
@@ -21,9 +21,11 @@ requires:
Log::Report: 0.9
Test::More: 0.54
Time::HiRes: 0
- XML::Compile: 1.26
+ XML::Compile: 1.44
XML::Compile::Cache: 0.991
- XML::Compile::SOAP: 2.29
- XML::Compile::SOAP::WSA: 0.12
- XML::Compile::Tester: 0.9
-version: 3.06
+ XML::Compile::SOAP: 3.00
+ XML::Compile::SOAP12: 3.01
+ XML::Compile::Tester: 0.90
+ XML::Compile::WSA: 0.90
+ XML::Compile::WSDL11: 3.00
+version: 3.10
@@ -2,12 +2,15 @@ use ExtUtils::MakeMaker;
use 5.008;
-my $version = '3.06';
+my $version = '3.10';
-my %prereq =
- ( XML::Compile => 1.26
- , XML::Compile::SOAP => 2.29
- , XML::Compile::Tester => 0.90
+my $devel = exists $ENV{MARKOV_DEVEL};
+
+my %prereq =
+ ( XML::Compile => 1.44
+ , XML::Compile::SOAP => '3.00'
+ , XML::Compile::WSDL11 => '3.00'
+ , XML::Compile::Tester => '0.90'
, XML::Compile::Cache => 0.991
, Log::Report => 0.90
@@ -30,10 +33,16 @@ my %prereq =
);
# only update WSA if installed
-eval "require XML::Compile::SOAP::WSA";
-unless($@)
-{ my $v = $XML::Compile::SOAP::WSA::VERSION || '';
- $prereq{'XML::Compile::SOAP::WSA'} = 0.12;
+eval "require XML::Compile::WSA";
+unless($@ || $devel)
+{ my $v = $XML::Compile::WSA::VERSION || '';
+ $prereq{'XML::Compile::WSA'} = '0.90';
+}
+
+eval "require XML::Compile::SOAP12";
+unless($@ || $devel)
+{ my $v = $XML::Compile::SOAP12::VERSION || '';
+ $prereq{'XML::Compile::SOAP12'} = '3.01';
}
WriteMakefile
@@ -1,5 +1,5 @@
-=== README for XML-Compile-SOAP-Daemon version 3.06
-= Generated on Fri May 3 10:07:39 2013 by OODoc 2.01
+=== README for XML-Compile-SOAP-Daemon version 3.10
+= Generated on Wed Nov 26 08:45:24 2014 by OODoc 2.01
There are various ways to install this module:
@@ -9,16 +9,16 @@ There are various ways to install this module:
(2) if you use Windows, have a look at http://ppm.activestate.com/
(3) if you have downloaded this module manually (as root/administrator)
- gzip -d XML-Compile-SOAP-Daemon-3.06.tar.gz
- tar -xf XML-Compile-SOAP-Daemon-3.06.tar
- cd XML-Compile-SOAP-Daemon-3.06
+ gzip -d XML-Compile-SOAP-Daemon-3.10.tar.gz
+ tar -xf XML-Compile-SOAP-Daemon-3.10.tar
+ cd XML-Compile-SOAP-Daemon-3.10
perl Makefile.PL
make # optional
make test # optional
make install
For usage, see the included manual-pages or
- http://search.cpan.org/dist/XML-Compile-SOAP-Daemon-3.06/
+ http://search.cpan.org/dist/XML-Compile-SOAP-Daemon-3.10/
Please report problems to
http://rt.cpan.org/Dist/Display.html?Queue=XML-Compile-SOAP-Daemon
@@ -6,7 +6,7 @@ use strict;
my $VERSION = "0.01";
-use Log::Report 'otm'; #, mode => 3;
+use Log::Report 'my-domain';
use XML::Compile::SOAP::Daemon::AnyDaemon;
use XML::Compile::WSDL11;
@@ -38,19 +38,38 @@ sub error_unauthorized($);
##
my $mode = 2;
-#my $port = '4444/SSLEAY';
-my $port = '4444';
-my $host = '127.0.0.1';
my ($live, $test) = (0, 0);
+my %runopt =
+ ( port => '4444'
+ # $port => '4444/SSLEAY'
+ , host => '127.0.0.1'
+ , name => basename($2)
+ , max_childs => 1
+ );
+
+my %newopt =
+ ( pidfile => undef
+ , user => undef
+ , group => undef
+ , workdir => undef
+ );
+
GetOptions
'v+' => \$mode # -v -vv -vvv
, 'verbose=i' => \$mode # --verbose=2 (0..3)
- , 'port|p=i' => \$port # --port=444
- , 'host|h=s' => \$host # --host=localhost
- , 'mode=s' => \$mode # --mode=DEBUG (DEBUG,ASSERT,VERBOSE,NORMAL)
- , 'live!' => \$live
- , 'test!' => \$test
+ , 'mode=s' => \$mode # --mode=DEBUG (DEBUG,ASSERT,VERBOSE,NORMAL)
+ , 'live!' => \$live
+ , 'test!' => \$test
+
+ , 'port|p=i' => \$runopt{port} # --port=444
+ , 'host|h=s' => \$runopt{host} # --host=localhost
+ , 'childs|c=i' => \$runopt{max_childs}
+
+ , 'pidfile=s' => \$newopt{pidfile}
+ , 'user|u=s' => \$newopt{user}
+ , 'group|g=s' => \$newopt{group}
+ , 'workdir|d=s' => \$newopt{workdir}
or error "Deamon is not started";
error __x"No filenames expected on the command-line"
@@ -72,7 +91,7 @@ my $my_serv =
# in preparation, use standard Perl output in $mode
dispatcher PERL => 'default', mode => $mode;
-my $daemon = XML::Compile::SOAP::Daemon::AnyDaemon->new;
+my $daemon = XML::Compile::SOAP::Daemon::AnyDaemon->new(%newopt);
my $wsdl = XML::Compile::WSDL11->new($wsdl_fn);
$wsdl->importDefinitions(\@schemas);
@@ -82,7 +101,7 @@ $wsdl->prefixFor($my_err_ns); # count it
my %callbacks =
( getInfo => \&getInfo
- , ...
+#, ...
);
$daemon->operationsFromWSDL
@@ -99,19 +118,13 @@ dispatcher SYSLOG => 'syslog', mode => $mode;
dispatcher close => 'default'; # close errors to stdout
# start the database connection, when the DB-type does survive forks.
-# otherwise, you need to
-
+# otherwise, you can open it via run(child_init)
# now start the daemon to handle requests
info __x"starting daemon in {envir} environment"
, envir => ($live ? 'live' : 'test');
-$daemon->run
- ( name => basename($0)
- , host => $host
- , port => $port
- , max_childs => 1
- );
+$daemon->run(%runopt);
info "Daemon stopped";
exit 0;
@@ -129,6 +142,9 @@ sub getInfo($$$)
return error_unauthorized 'someone'
if failed_authorization;
+ # produce the $data of the answer. See $operation->explain()
+ my $data;
+
# change "response" into the name of the message part in the WSDL,
# often "parameters"
+{ response => $data };
@@ -1,4 +1,4 @@
-# Copyrights 2007-2013 by [Mark Overmeer].
+# Copyrights 2007-2014 by [Mark Overmeer].
# For other contributors see ChangeLog.
# See the manual pages for details on the licensing terms.
# Pod stripped from pm file by OODoc 2.01.
@@ -9,7 +9,7 @@
package MyExampleCalls;
use vars '$VERSION';
-$VERSION = '3.06';
+$VERSION = '3.10';
use base qw/Exporter/;
@@ -1,4 +1,4 @@
-# Copyrights 2007-2013 by [Mark Overmeer].
+# Copyrights 2007-2014 by [Mark Overmeer].
# For other contributors see ChangeLog.
# See the manual pages for details on the licensing terms.
# Pod stripped from pm file by OODoc 2.01.
@@ -7,7 +7,7 @@ use strict;
package MyExampleData;
use vars '$VERSION';
-$VERSION = '3.06';
+$VERSION = '3.10';
use base 'Exporter';
@@ -1,4 +1,4 @@
-# Copyrights 2007-2013 by [Mark Overmeer].
+# Copyrights 2007-2014 by [Mark Overmeer].
# For other contributors see ChangeLog.
# See the manual pages for details on the licensing terms.
# Pod stripped from pm file by OODoc 2.01.
@@ -7,11 +7,11 @@ use strict;
package XML::Compile::SOAP::Daemon::AnyDaemon;
use vars '$VERSION';
-$VERSION = '3.06';
+$VERSION = '3.10';
# Any::Daemon at least version 0.13
-use base 'XML::Compile::SOAP::Daemon', 'Any::Daemon';
+use parent 'XML::Compile::SOAP::Daemon', 'Any::Daemon';
use Log::Report 'xml-compile-soap-daemon';
@@ -29,16 +29,17 @@ sub new($%)
(bless $self, $class)->init(\%args); # $ISA[0] branch only
}
-sub setWsdlResponse($)
-{ my ($self, $fn) = @_;
+sub setWsdlResponse($;$)
+{ my ($self, $fn, $ft) = @_;
trace "setting wsdl response to $fn";
- lwp_wsdl_response $fn;
+ lwp_wsdl_response $fn, $ft;
}
#-----------------------
sub _run($)
{ my ($self, $args) = @_;
+
my $name = $args->{server_name} || 'soap server';
lwp_add_header
'X-Any-Daemon-Version' => $Any::Daemon::VERSION
@@ -63,10 +64,10 @@ sub _run($)
lwp_socket_init $socket;
$self->{XCSDA_conn_opts} =
- { client_timeout => ($args->{client_timeout} || 30)
- , client_maxreq => ($args->{client_maxreq} || 100)
- , client_reqbonus => ($args->{client_reqbonus} || 0)
- , postprocess => $args->{postprocess}
+ +{ expires => ($args->{client_timeout} || 30)
+ , maxmsgs => ($args->{client_maxreq} || 100)
+ , reqbonus => ($args->{client_reqbonus} || 0)
+ , postprocess => $args->{postprocess}
};
my $child_init = $args->{child_init} || sub {};
@@ -96,7 +97,7 @@ sub handle_connection($)
eval {
lwp_handle_connection $connection
, %$conn_opts
- , expires => time() + $conn_opts->{client_timeout}
+ , expires => time() + $conn_opts->{expires}
, handler => sub {$self->process(@_)}
};
info __x"connection ended with force; {error}", error => $@
@@ -58,24 +58,24 @@ Framework) and POST (standard HTTP) for any message. It can be used
for any SOAP1.1 and SOAP1.2 mixture. Although SOAP1.2 itself is
not implemented yet.
-See L<documentation in base class|XML::Compile::SOAP::Daemon/"DESCRIPTION">.
+Extends L<"DESCRIPTION" in XML::Compile::SOAP::Daemon|XML::Compile::SOAP::Daemon/"DESCRIPTION">.
=head1 METHODS
-See L<documentation in base class|XML::Compile::SOAP::Daemon/"METHODS">.
+Extends L<"METHODS" in XML::Compile::SOAP::Daemon|XML::Compile::SOAP::Daemon/"METHODS">.
=head2 Constructors
-See L<documentation in base class|XML::Compile::SOAP::Daemon/"Constructors">.
+Extends L<"Constructors" in XML::Compile::SOAP::Daemon|XML::Compile::SOAP::Daemon/"Constructors">.
=over 4
-=item XML::Compile::SOAP::Daemon::AnyDaemon-E<gt>B<new>(OPTIONS)
+=item XML::Compile::SOAP::Daemon::AnyDaemon-E<gt>B<new>(%options)
Create the server handler, which extends some class which implements
a Net::Server daemon.
-As OPTIONS, you can pass everything accepted by Any::Daemon subroutine new,
+As %options, you can pass everything accepted by Any::Daemon subroutine new,
like C<pid_file>, C<user>, C<group>, and C<workdir>,
-Option --Defined in --Default
@@ -103,35 +103,35 @@ like C<pid_file>, C<user>, C<group>, and C<workdir>,
=head2 Attributes
-See L<documentation in base class|XML::Compile::SOAP::Daemon/"Attributes">.
+Extends L<"Attributes" in XML::Compile::SOAP::Daemon|XML::Compile::SOAP::Daemon/"Attributes">.
=over 4
=item $obj-E<gt>B<addSoapAction>(HASH|PAIRS)
-See L<XML::Compile::SOAP::Daemon/"Attributes">
+Inherited, see L<XML::Compile::SOAP::Daemon/"Attributes">
-=item $obj-E<gt>B<addWsaTable>(('INPUT'|'OUTPUT'), [HASH|PAIRS])
+=item $obj-E<gt>B<addWsaTable>( <'INPUT'|'OUTPUT'>, [HASH|PAIRS] )
-See L<XML::Compile::SOAP::Daemon/"Attributes">
+Inherited, see L<XML::Compile::SOAP::Daemon/"Attributes">
=item $obj-E<gt>B<outputCharset>()
-See L<XML::Compile::SOAP::Daemon/"Attributes">
+Inherited, see L<XML::Compile::SOAP::Daemon/"Attributes">
=back
=head2 Running the server
-See L<documentation in base class|XML::Compile::SOAP::Daemon/"Running the server">.
+Extends L<"Running the server" in XML::Compile::SOAP::Daemon|XML::Compile::SOAP::Daemon/"Running the server">.
=over 4
-=item $obj-E<gt>B<process>(CLIENT, XMLIN, REQUEST, ACTION)
+=item $obj-E<gt>B<process>($client, $xmlin, $request, $action)
-See L<XML::Compile::SOAP::Daemon/"Running the server">
+Inherited, see L<XML::Compile::SOAP::Daemon/"Running the server">
-=item $obj-E<gt>B<run>(OPTIONS)
+=item $obj-E<gt>B<run>(%options)
-Option --Default
background <true>
@@ -204,67 +204,67 @@ IO::Socket::IP)
=head2 Preparations
-See L<documentation in base class|XML::Compile::SOAP::Daemon/"Preparations">.
+Extends L<"Preparations" in XML::Compile::SOAP::Daemon|XML::Compile::SOAP::Daemon/"Preparations">.
=over 4
-=item $obj-E<gt>B<addHandler>(NAME, SOAP, CODE)
+=item $obj-E<gt>B<addHandler>($name, $soap, CODE)
-See L<XML::Compile::SOAP::Daemon/"Preparations">
+Inherited, see L<XML::Compile::SOAP::Daemon/"Preparations">
-=item $obj-E<gt>B<operationsFromWSDL>(WSDL, OPTIONS)
+=item $obj-E<gt>B<operationsFromWSDL>($wsdl, %options)
-See L<XML::Compile::SOAP::Daemon/"Preparations">
+Inherited, see L<XML::Compile::SOAP::Daemon/"Preparations">
-=item $obj-E<gt>B<setWsdlResponse>(FILENAME)
+=item $obj-E<gt>B<setWsdlResponse>( $filename, [$filetype] )
-See L<XML::Compile::SOAP::Daemon/"Preparations">
+Inherited, see L<XML::Compile::SOAP::Daemon/"Preparations">
=back
=head2 Helpers
-See L<documentation in base class|XML::Compile::SOAP::Daemon/"Helpers">.
+Extends L<"Helpers" in XML::Compile::SOAP::Daemon|XML::Compile::SOAP::Daemon/"Helpers">.
=over 4
-=item $obj-E<gt>B<faultInvalidXML>(ERROR)
+=item $obj-E<gt>B<faultInvalidXML>($error)
-See L<XML::Compile::SOAP::Daemon/"Helpers">
+Inherited, see L<XML::Compile::SOAP::Daemon/"Helpers">
-=item $obj-E<gt>B<faultNotSoapMessage>(NODETYPE)
+=item $obj-E<gt>B<faultNotSoapMessage>($nodetype)
-See L<XML::Compile::SOAP::Daemon/"Helpers">
+Inherited, see L<XML::Compile::SOAP::Daemon/"Helpers">
-=item $obj-E<gt>B<faultUnsupportedSoapVersion>(ENV_NS)
+=item $obj-E<gt>B<faultUnsupportedSoapVersion>($env_ns)
-See L<XML::Compile::SOAP::Daemon/"Helpers">
+Inherited, see L<XML::Compile::SOAP::Daemon/"Helpers">
-=item $obj-E<gt>B<handlers>(('SOAP11'|'SOAP12'|SOAP))
+=item $obj-E<gt>B<handlers>( <'SOAP11'|'SOAP12'|$soap> )
-See L<XML::Compile::SOAP::Daemon/"Helpers">
+Inherited, see L<XML::Compile::SOAP::Daemon/"Helpers">
-=item $obj-E<gt>B<printIndex>([FILEHANDLE])
+=item $obj-E<gt>B<printIndex>( [$fh] )
-See L<XML::Compile::SOAP::Daemon/"Helpers">
+Inherited, see L<XML::Compile::SOAP::Daemon/"Helpers">
=item $obj-E<gt>B<soapVersions>()
-See L<XML::Compile::SOAP::Daemon/"Helpers">
+Inherited, see L<XML::Compile::SOAP::Daemon/"Helpers">
=back
=head1 DETAILS
-See L<documentation in base class|XML::Compile::SOAP::Daemon/"DETAILS">.
+Extends L<"DETAILS" in XML::Compile::SOAP::Daemon|XML::Compile::SOAP::Daemon/"DETAILS">.
=head2 Operation handlers
-See L<documentation in base class|XML::Compile::SOAP::Daemon/"Operation handlers">.
+Extends L<"Operation handlers" in XML::Compile::SOAP::Daemon|XML::Compile::SOAP::Daemon/"Operation handlers">.
=head2 Returning errors
-See L<documentation in base class|XML::Compile::SOAP::Daemon/"Returning errors">.
+Extends L<"Returning errors" in XML::Compile::SOAP::Daemon|XML::Compile::SOAP::Daemon/"Returning errors">.
=head2 AnyDaemon with SSL
@@ -320,12 +320,13 @@ Assuming that the certificates are in 'certs/', the program looks like this:
=head1 SEE ALSO
-This module is part of XML-Compile-SOAP-Daemon distribution version 3.06,
-built on May 03, 2013. Website: F<http://perl.overmeer.net/xml-compile/>
+This module is part of XML-Compile-SOAP-Daemon distribution version 3.10,
+built on November 26, 2014. Website: F<http://perl.overmeer.net/xml-compile/>
Other distributions in this suite:
L<XML::Compile>,
L<XML::Compile::SOAP>,
+L<XML::Compile::WSDL11>,
L<XML::Compile::SOAP12>,
L<XML::Compile::SOAP::Daemon>,
L<XML::Compile::SOAP::WSA>,
@@ -336,20 +337,18 @@ L<XML::Compile::Tester>,
L<XML::Compile::Cache>,
L<XML::Compile::Dumper>,
L<XML::Compile::RPC>,
-L<XML::Rewrite>,
-L<XML::eXistDB>,
+L<XML::Rewrite>
and
L<XML::LibXML::Simple>.
Please post questions or ideas to the mailinglist at
-F<http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/xml-compile>
-
+F<http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/xml-compile> .
For live contact with other developers, visit the C<#xml-compile> channel
on C<irc.perl.org>.
=head1 LICENSE
-Copyrights 2007-2013 by [Mark Overmeer]. For other contributors see ChangeLog.
+Copyrights 2007-2014 by [Mark Overmeer]. For other contributors see ChangeLog.
This program is free software; you can redistribute it and/or modify it
under the same terms as Perl itself.
@@ -1,4 +1,4 @@
-# Copyrights 2007-2013 by [Mark Overmeer].
+# Copyrights 2007-2014 by [Mark Overmeer].
# For other contributors see ChangeLog.
# See the manual pages for details on the licensing terms.
# Pod stripped from pm file by OODoc 2.01.
@@ -7,11 +7,9 @@ use strict;
package XML::Compile::SOAP::Daemon::CGI;
use vars '$VERSION';
-$VERSION = '3.06';
+$VERSION = '3.10';
-use base 'XML::Compile::SOAP::Daemon';
-
-our @ISA;
+use parent 'XML::Compile::SOAP::Daemon';
use Log::Report 'xml-compile-soap-daemon';
use CGI 3.53, ':cgi';
@@ -27,7 +25,6 @@ use constant
#--------------------
-
sub runCgiRequest(@) {shift->run(@_)}
@@ -37,11 +34,12 @@ sub _run($;$)
my $q = $test_cgi || $args->{query} || CGI->new;
my $method = $ENV{REQUEST_METHOD} || 'POST';
+ my $qs = $ENV{QUERY_STRING} || '';
my $ct = $ENV{CONTENT_TYPE} || 'text/plain';
$ct =~ s/\;\s.*//;
return $self->sendWsdl($q)
- if $method eq 'GET' && url =~ m/ \? WSDL $ /x;
+ if $method eq 'GET' && uc($qs) eq 'WSDL';
my ($rc, $msg, $err, $mime, $bytes);
if($method ne 'POST' && $method ne 'M-POST')
@@ -77,7 +75,7 @@ sub _run($;$)
( -status => "$rc $msg"
, -type => $mime
, -charset => 'utf-8'
- , -nph => 1
+ , -nph => ($args->{nph} ? 1 : 0)
);
if(my $pp = $args->{postprocess})
@@ -89,14 +87,15 @@ sub _run($;$)
print $bytes;
}
-sub setWsdlResponse($)
-{ my ($self, $fn) = @_;
+sub setWsdlResponse($;$)
+{ my ($self, $fn, $ft) = @_;
$fn or return;
local *WSDL;
open WSDL, '<:raw', $fn
or fault __x"cannot read WSDL from {file}", file => $fn;
local $/;
$self->{wsdl_data} = <WSDL>;
+ $self->{wsdl_type} = $ft || 'application/wsdl+xml';
close WSDL;
}
@@ -105,7 +104,7 @@ sub sendWsdl($)
print $q->header
( -status => RC_OK.' WSDL specification'
- , -type => 'application/wsdl+xml'
+ , -type => $self->{wsdl_type}
, -charset => 'utf-8'
, -nph => 1
@@ -35,19 +35,19 @@ This abstraction level of the object (code in this pm file) is not
concerned with parsing or composing XML, but only worries about the
HTTP transport specifics of SOAP messages.
-See L<documentation in base class|XML::Compile::SOAP::Daemon/"DESCRIPTION">.
+Extends L<"DESCRIPTION" in XML::Compile::SOAP::Daemon|XML::Compile::SOAP::Daemon/"DESCRIPTION">.
=head1 METHODS
-See L<documentation in base class|XML::Compile::SOAP::Daemon/"METHODS">.
+Extends L<"METHODS" in XML::Compile::SOAP::Daemon|XML::Compile::SOAP::Daemon/"METHODS">.
=head2 Constructors
-See L<documentation in base class|XML::Compile::SOAP::Daemon/"Constructors">.
+Extends L<"Constructors" in XML::Compile::SOAP::Daemon|XML::Compile::SOAP::Daemon/"Constructors">.
=over 4
-=item XML::Compile::SOAP::Daemon::CGI-E<gt>B<new>(OPTIONS)
+=item XML::Compile::SOAP::Daemon::CGI-E<gt>B<new>(%options)
-Option --Defined in --Default
accept_slow_select XML::Compile::SOAP::Daemon <true>
@@ -74,40 +74,51 @@ See L<documentation in base class|XML::Compile::SOAP::Daemon/"Constructors">.
=head2 Attributes
-See L<documentation in base class|XML::Compile::SOAP::Daemon/"Attributes">.
+Extends L<"Attributes" in XML::Compile::SOAP::Daemon|XML::Compile::SOAP::Daemon/"Attributes">.
=over 4
=item $obj-E<gt>B<addSoapAction>(HASH|PAIRS)
-See L<XML::Compile::SOAP::Daemon/"Attributes">
+Inherited, see L<XML::Compile::SOAP::Daemon/"Attributes">
-=item $obj-E<gt>B<addWsaTable>(('INPUT'|'OUTPUT'), [HASH|PAIRS])
+=item $obj-E<gt>B<addWsaTable>( <'INPUT'|'OUTPUT'>, [HASH|PAIRS] )
-See L<XML::Compile::SOAP::Daemon/"Attributes">
+Inherited, see L<XML::Compile::SOAP::Daemon/"Attributes">
=item $obj-E<gt>B<outputCharset>()
-See L<XML::Compile::SOAP::Daemon/"Attributes">
+Inherited, see L<XML::Compile::SOAP::Daemon/"Attributes">
=back
=head2 Running the server
-See L<documentation in base class|XML::Compile::SOAP::Daemon/"Running the server">.
+Extends L<"Running the server" in XML::Compile::SOAP::Daemon|XML::Compile::SOAP::Daemon/"Running the server">.
=over 4
-=item $obj-E<gt>B<process>(OPTIONS)
+=item $obj-E<gt>B<process>(%options)
Process the content of a single message. Not to be called directly.
-=item $obj-E<gt>B<run>(OPTIONS)
+ -Option--Default
+ nph <true>
+
+=over 2
+
+=item nph => BOOLEAN
+
+For FCGI, you probably need to set this to a false value.
+
+=back
+
+=item $obj-E<gt>B<run>(%options)
Used by L<runCgiRequest()|XML::Compile::SOAP::Daemon::CGI/"Running the server"> to process a connection. Not to be called
directly.
-=item $obj-E<gt>B<runCgiRequest>(OPTIONS)
+=item $obj-E<gt>B<runCgiRequest>(%options)
-Option --Default
postprocess undef
@@ -117,7 +128,7 @@ directly.
=item postprocess => CODE
-When defined, the CODE will get called with a HASH (containing OPTIONS
+When defined, the CODE will get called with a HASH (containing %options
and other compile information), a HASH of headers (which you may change),
the HTTP return code, and a reference to the message body (which may be
changed as well).
@@ -134,67 +145,67 @@ Content-Length will be added to the headers after the call.
=head2 Preparations
-See L<documentation in base class|XML::Compile::SOAP::Daemon/"Preparations">.
+Extends L<"Preparations" in XML::Compile::SOAP::Daemon|XML::Compile::SOAP::Daemon/"Preparations">.
=over 4
-=item $obj-E<gt>B<addHandler>(NAME, SOAP, CODE)
+=item $obj-E<gt>B<addHandler>($name, $soap, CODE)
-See L<XML::Compile::SOAP::Daemon/"Preparations">
+Inherited, see L<XML::Compile::SOAP::Daemon/"Preparations">
-=item $obj-E<gt>B<operationsFromWSDL>(WSDL, OPTIONS)
+=item $obj-E<gt>B<operationsFromWSDL>($wsdl, %options)
-See L<XML::Compile::SOAP::Daemon/"Preparations">
+Inherited, see L<XML::Compile::SOAP::Daemon/"Preparations">
-=item $obj-E<gt>B<setWsdlResponse>(FILENAME)
+=item $obj-E<gt>B<setWsdlResponse>( $filename, [$filetype] )
-See L<XML::Compile::SOAP::Daemon/"Preparations">
+Inherited, see L<XML::Compile::SOAP::Daemon/"Preparations">
=back
=head2 Helpers
-See L<documentation in base class|XML::Compile::SOAP::Daemon/"Helpers">.
+Extends L<"Helpers" in XML::Compile::SOAP::Daemon|XML::Compile::SOAP::Daemon/"Helpers">.
=over 4
-=item $obj-E<gt>B<faultInvalidXML>(ERROR)
+=item $obj-E<gt>B<faultInvalidXML>($error)
-See L<XML::Compile::SOAP::Daemon/"Helpers">
+Inherited, see L<XML::Compile::SOAP::Daemon/"Helpers">
-=item $obj-E<gt>B<faultNotSoapMessage>(NODETYPE)
+=item $obj-E<gt>B<faultNotSoapMessage>($nodetype)
-See L<XML::Compile::SOAP::Daemon/"Helpers">
+Inherited, see L<XML::Compile::SOAP::Daemon/"Helpers">
-=item $obj-E<gt>B<faultUnsupportedSoapVersion>(ENV_NS)
+=item $obj-E<gt>B<faultUnsupportedSoapVersion>($env_ns)
-See L<XML::Compile::SOAP::Daemon/"Helpers">
+Inherited, see L<XML::Compile::SOAP::Daemon/"Helpers">
-=item $obj-E<gt>B<handlers>(('SOAP11'|'SOAP12'|SOAP))
+=item $obj-E<gt>B<handlers>( <'SOAP11'|'SOAP12'|$soap> )
-See L<XML::Compile::SOAP::Daemon/"Helpers">
+Inherited, see L<XML::Compile::SOAP::Daemon/"Helpers">
-=item $obj-E<gt>B<printIndex>([FILEHANDLE])
+=item $obj-E<gt>B<printIndex>( [$fh] )
-See L<XML::Compile::SOAP::Daemon/"Helpers">
+Inherited, see L<XML::Compile::SOAP::Daemon/"Helpers">
=item $obj-E<gt>B<soapVersions>()
-See L<XML::Compile::SOAP::Daemon/"Helpers">
+Inherited, see L<XML::Compile::SOAP::Daemon/"Helpers">
=back
=head1 DETAILS
-See L<documentation in base class|XML::Compile::SOAP::Daemon/"DETAILS">.
+Extends L<"DETAILS" in XML::Compile::SOAP::Daemon|XML::Compile::SOAP::Daemon/"DETAILS">.
=head2 Operation handlers
-See L<documentation in base class|XML::Compile::SOAP::Daemon/"Operation handlers">.
+Extends L<"Operation handlers" in XML::Compile::SOAP::Daemon|XML::Compile::SOAP::Daemon/"Operation handlers">.
=head2 Returning errors
-See L<documentation in base class|XML::Compile::SOAP::Daemon/"Returning errors">.
+Extends L<"Returning errors" in XML::Compile::SOAP::Daemon|XML::Compile::SOAP::Daemon/"Returning errors">.
=head2 How to use the CGI module
@@ -219,12 +230,13 @@ Your virtual host may need something like this:
=head1 SEE ALSO
-This module is part of XML-Compile-SOAP-Daemon distribution version 3.06,
-built on May 03, 2013. Website: F<http://perl.overmeer.net/xml-compile/>
+This module is part of XML-Compile-SOAP-Daemon distribution version 3.10,
+built on November 26, 2014. Website: F<http://perl.overmeer.net/xml-compile/>
Other distributions in this suite:
L<XML::Compile>,
L<XML::Compile::SOAP>,
+L<XML::Compile::WSDL11>,
L<XML::Compile::SOAP12>,
L<XML::Compile::SOAP::Daemon>,
L<XML::Compile::SOAP::WSA>,
@@ -235,20 +247,18 @@ L<XML::Compile::Tester>,
L<XML::Compile::Cache>,
L<XML::Compile::Dumper>,
L<XML::Compile::RPC>,
-L<XML::Rewrite>,
-L<XML::eXistDB>,
+L<XML::Rewrite>
and
L<XML::LibXML::Simple>.
Please post questions or ideas to the mailinglist at
-F<http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/xml-compile>
-
+F<http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/xml-compile> .
For live contact with other developers, visit the C<#xml-compile> channel
on C<irc.perl.org>.
=head1 LICENSE
-Copyrights 2007-2013 by [Mark Overmeer]. For other contributors see ChangeLog.
+Copyrights 2007-2014 by [Mark Overmeer]. For other contributors see ChangeLog.
This program is free software; you can redistribute it and/or modify it
under the same terms as Perl itself.
@@ -1,4 +1,4 @@
-# Copyrights 2007-2013 by [Mark Overmeer].
+# Copyrights 2007-2014 by [Mark Overmeer].
# For other contributors see ChangeLog.
# See the manual pages for details on the licensing terms.
# Pod stripped from pm file by OODoc 2.01.
@@ -7,9 +7,9 @@ use strict;
package XML::Compile::SOAP::Daemon::LWPutil;
use vars '$VERSION';
-$VERSION = '3.06';
+$VERSION = '3.10';
-use base 'Exporter';
+use parent 'Exporter';
our @EXPORT = qw(
@@ -51,10 +51,10 @@ sub lwp_add_header($$@) { push @default_headers, @_ }
my $wsdl_response;
-sub lwp_wsdl_response(;$)
+sub lwp_wsdl_response(;$$)
{ @_ or return $wsdl_response;
- my $file = shift;
+ my ($file, $ft) = @_;
$file && !ref $file
or return $wsdl_response = $file;
@@ -65,10 +65,11 @@ sub lwp_wsdl_response(;$)
my $spec = <SRC>;
close SRC;
+ $ft ||= 'application/wsdl+xml';
$wsdl_response = HTTP::Response->new
( RC_OK, "WSDL specification"
, [ @default_headers
- , "Content-Type" => 'application/wsdl+xml; charset="utf-8"'
+ , "Content-Type" => "$ft; charset=utf-8"
]
, $spec
);
@@ -110,7 +111,7 @@ sub lwp_run_request($$;$$)
return $wsdl_response
if $wsdl_response
&& $request->method eq 'GET'
- && $request->uri->path_query =~ m! \? WSDL $ !x;
+ && uc($request->uri->query || '') eq 'WSDL';
if($request->method !~ m/^(?:M-)?POST/ )
{ return lwp_make_response $request
@@ -148,7 +149,7 @@ sub lwp_make_response($$$$;$)
my $s;
if(UNIVERSAL::isa($body, 'XML::LibXML::Document'))
{ $s = $body->toString($status == RC_OK ? 0 : 1);
- $response->header('Content-Type' => 'text/xml; charset="utf-8"');
+ $response->header('Content-Type' => 'text/xml; charset=utf-8');
}
else
{ $s = "[$status] $body";
@@ -20,39 +20,39 @@ XML::Compile::SOAP::Daemon::LWPutil - LWP helper routines
=over 4
-=item B<lwp_action_from_header>(REQUEST)
+=item B<lwp_action_from_header>($request)
Collect the soap action URI from the request, with C<undef> on failure.
Officially, the "SOAPAction" has no other purpose than the ability to
route messages over HTTP: it should not be linked to the portname of
the message (although it often can).
-=item B<lwp_add_header>(FIELD, CONTENT, ...)
+=item B<lwp_add_header>($field, $content, ...)
-=item B<lwp_handle_connection>(CONNECTION, OPTIONS)
+=item B<lwp_handle_connection>($connection, %options)
-=item B<lwp_http11_connection>(DAEMON, SOCKET)
+=item B<lwp_http11_connection>($daemon, $socket)
-Initialize a HTTP/1.1 connect on the client SOCKET.
+Initialize a HTTP/1.1 connect on the client $socket.
-=item B<lwp_make_response>(REQUEST, RC, MSG, BODY, [POSTPROC])
+=item B<lwp_make_response>( $request, $rc, $msg, $body, [$postproc] )
-=item B<lwp_run_request>(REQUEST, HANDLER, [CONNECTION, POSTPROC])
+=item B<lwp_run_request>( $request, $handler, [$connection, $postproc] )
-Handle one REQUEST (HTTP::Request object), which was received from
-the CLIENT (string). When the request has been received, the HANDLER
+Handle one $request (HTTP::Request object), which was received from
+the CLIENT (string). When the request has been received, the $handler
is called. Returns the status, the status as text message, and the
output as XML::LibXML::Document.
-=item B<lwp_socket_init>(SOCKET)
+=item B<lwp_socket_init>($socket)
-Initialize LWP usage based on a created SOCKET.
+Initialize LWP usage based on a created $socket.
-=item B<lwp_wsdl_response>([WSDLFILE|RESPONSE])
+=item B<lwp_wsdl_response>( [$wsdlfile|$response] )
Set the result of WSDL query responses, either to a response which
-is created internally containing WSDLFILE, or to an already complete
-RESPONSE object (HTTP::Response). The response object is returned.
+is created internally containing $wsdlfile, or to an already complete
+$response object (HTTP::Response). The response object is returned.
=back
@@ -81,12 +81,13 @@ encoded into a byte string.
=head1 SEE ALSO
-This module is part of XML-Compile-SOAP-Daemon distribution version 3.06,
-built on May 03, 2013. Website: F<http://perl.overmeer.net/xml-compile/>
+This module is part of XML-Compile-SOAP-Daemon distribution version 3.10,
+built on November 26, 2014. Website: F<http://perl.overmeer.net/xml-compile/>
Other distributions in this suite:
L<XML::Compile>,
L<XML::Compile::SOAP>,
+L<XML::Compile::WSDL11>,
L<XML::Compile::SOAP12>,
L<XML::Compile::SOAP::Daemon>,
L<XML::Compile::SOAP::WSA>,
@@ -97,20 +98,18 @@ L<XML::Compile::Tester>,
L<XML::Compile::Cache>,
L<XML::Compile::Dumper>,
L<XML::Compile::RPC>,
-L<XML::Rewrite>,
-L<XML::eXistDB>,
+L<XML::Rewrite>
and
L<XML::LibXML::Simple>.
Please post questions or ideas to the mailinglist at
-F<http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/xml-compile>
-
+F<http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/xml-compile> .
For live contact with other developers, visit the C<#xml-compile> channel
on C<irc.perl.org>.
=head1 LICENSE
-Copyrights 2007-2013 by [Mark Overmeer]. For other contributors see ChangeLog.
+Copyrights 2007-2014 by [Mark Overmeer]. For other contributors see ChangeLog.
This program is free software; you can redistribute it and/or modify it
under the same terms as Perl itself.
@@ -1,4 +1,4 @@
-# Copyrights 2007-2013 by [Mark Overmeer].
+# Copyrights 2007-2014 by [Mark Overmeer].
# For other contributors see ChangeLog.
# See the manual pages for details on the licensing terms.
# Pod stripped from pm file by OODoc 2.01.
@@ -7,12 +7,12 @@ use strict;
package XML::Compile::SOAP::Daemon::NetServer;
use vars '$VERSION';
-$VERSION = '3.06';
+$VERSION = '3.10';
# The selected type of netserver gets added to the @ISA during new(),
# so there are two base-classes!
-use base 'XML::Compile::SOAP::Daemon';
+use parent 'XML::Compile::SOAP::Daemon';
our @ISA;
use Log::Report 'xml-compile-soap-daemon';
@@ -113,10 +113,10 @@ sub post_bind_hook()
lwp_socket_init $_ for @{$prop->{sock}};
}
-sub setWsdlResponse($)
-{ my ($self, $fn) = @_;
+sub setWsdlResponse($;$)
+{ my ($self, $fn, $ft) = @_;
trace "setting wsdl response to $fn";
- lwp_wsdl_response $fn;
+ lwp_wsdl_response $fn, $ft;
}
# Overrule Net::Server's log() to translate it into Log::Report calls
@@ -53,19 +53,19 @@ Framework) and POST (standard HTTP) for any message. It can be used
for any SOAP1.1 and SOAP1.2 mixture. Although SOAP1.2 itself is
not implemented yet.
-See L<documentation in base class|XML::Compile::SOAP::Daemon/"DESCRIPTION">.
+Extends L<"DESCRIPTION" in XML::Compile::SOAP::Daemon|XML::Compile::SOAP::Daemon/"DESCRIPTION">.
=head1 METHODS
-See L<documentation in base class|XML::Compile::SOAP::Daemon/"METHODS">.
+Extends L<"METHODS" in XML::Compile::SOAP::Daemon|XML::Compile::SOAP::Daemon/"METHODS">.
=head2 Constructors
-See L<documentation in base class|XML::Compile::SOAP::Daemon/"Constructors">.
+Extends L<"Constructors" in XML::Compile::SOAP::Daemon|XML::Compile::SOAP::Daemon/"Constructors">.
=over 4
-=item XML::Compile::SOAP::Daemon::NetServer-E<gt>B<new>(OPTIONS)
+=item XML::Compile::SOAP::Daemon::NetServer-E<gt>B<new>(%options)
Create the server handler, which extends some class which implements
a Net::Server daemon. Any daemon configuration parameter should
@@ -105,37 +105,37 @@ CLASS name.
=head2 Attributes
-See L<documentation in base class|XML::Compile::SOAP::Daemon/"Attributes">.
+Extends L<"Attributes" in XML::Compile::SOAP::Daemon|XML::Compile::SOAP::Daemon/"Attributes">.
=over 4
=item $obj-E<gt>B<addSoapAction>(HASH|PAIRS)
-See L<XML::Compile::SOAP::Daemon/"Attributes">
+Inherited, see L<XML::Compile::SOAP::Daemon/"Attributes">
-=item $obj-E<gt>B<addWsaTable>(('INPUT'|'OUTPUT'), [HASH|PAIRS])
+=item $obj-E<gt>B<addWsaTable>( <'INPUT'|'OUTPUT'>, [HASH|PAIRS] )
-See L<XML::Compile::SOAP::Daemon/"Attributes">
+Inherited, see L<XML::Compile::SOAP::Daemon/"Attributes">
=item $obj-E<gt>B<outputCharset>()
-See L<XML::Compile::SOAP::Daemon/"Attributes">
+Inherited, see L<XML::Compile::SOAP::Daemon/"Attributes">
=back
=head2 Running the server
-See L<documentation in base class|XML::Compile::SOAP::Daemon/"Running the server">.
+Extends L<"Running the server" in XML::Compile::SOAP::Daemon|XML::Compile::SOAP::Daemon/"Running the server">.
=over 4
-=item $obj-E<gt>B<process>(CLIENT, XMLIN, REQUEST, ACTION)
+=item $obj-E<gt>B<process>($client, $xmlin, $request, $action)
-See L<XML::Compile::SOAP::Daemon/"Running the server">
+Inherited, see L<XML::Compile::SOAP::Daemon/"Running the server">
-=item $obj-E<gt>B<run>(OPTIONS)
+=item $obj-E<gt>B<run>(%options)
-See Net::Server subroutine run, but the OPTIONS are passed as list, not
+See Net::Server subroutine run, but the %options are passed as list, not
as HASH. You may pass any option to which accepted by the Net::Server
extension you are using.
@@ -155,67 +155,67 @@ L<XML::Compile::SOAP::Daemon::LWPutil|XML::Compile::SOAP::Daemon::LWPutil> manua
=head2 Preparations
-See L<documentation in base class|XML::Compile::SOAP::Daemon/"Preparations">.
+Extends L<"Preparations" in XML::Compile::SOAP::Daemon|XML::Compile::SOAP::Daemon/"Preparations">.
=over 4
-=item $obj-E<gt>B<addHandler>(NAME, SOAP, CODE)
+=item $obj-E<gt>B<addHandler>($name, $soap, CODE)
-See L<XML::Compile::SOAP::Daemon/"Preparations">
+Inherited, see L<XML::Compile::SOAP::Daemon/"Preparations">
-=item $obj-E<gt>B<operationsFromWSDL>(WSDL, OPTIONS)
+=item $obj-E<gt>B<operationsFromWSDL>($wsdl, %options)
-See L<XML::Compile::SOAP::Daemon/"Preparations">
+Inherited, see L<XML::Compile::SOAP::Daemon/"Preparations">
-=item $obj-E<gt>B<setWsdlResponse>(FILENAME)
+=item $obj-E<gt>B<setWsdlResponse>( $filename, [$filetype] )
-See L<XML::Compile::SOAP::Daemon/"Preparations">
+Inherited, see L<XML::Compile::SOAP::Daemon/"Preparations">
=back
=head2 Helpers
-See L<documentation in base class|XML::Compile::SOAP::Daemon/"Helpers">.
+Extends L<"Helpers" in XML::Compile::SOAP::Daemon|XML::Compile::SOAP::Daemon/"Helpers">.
=over 4
-=item $obj-E<gt>B<faultInvalidXML>(ERROR)
+=item $obj-E<gt>B<faultInvalidXML>($error)
-See L<XML::Compile::SOAP::Daemon/"Helpers">
+Inherited, see L<XML::Compile::SOAP::Daemon/"Helpers">
-=item $obj-E<gt>B<faultNotSoapMessage>(NODETYPE)
+=item $obj-E<gt>B<faultNotSoapMessage>($nodetype)
-See L<XML::Compile::SOAP::Daemon/"Helpers">
+Inherited, see L<XML::Compile::SOAP::Daemon/"Helpers">
-=item $obj-E<gt>B<faultUnsupportedSoapVersion>(ENV_NS)
+=item $obj-E<gt>B<faultUnsupportedSoapVersion>($env_ns)
-See L<XML::Compile::SOAP::Daemon/"Helpers">
+Inherited, see L<XML::Compile::SOAP::Daemon/"Helpers">
-=item $obj-E<gt>B<handlers>(('SOAP11'|'SOAP12'|SOAP))
+=item $obj-E<gt>B<handlers>( <'SOAP11'|'SOAP12'|$soap> )
-See L<XML::Compile::SOAP::Daemon/"Helpers">
+Inherited, see L<XML::Compile::SOAP::Daemon/"Helpers">
-=item $obj-E<gt>B<printIndex>([FILEHANDLE])
+=item $obj-E<gt>B<printIndex>( [$fh] )
-See L<XML::Compile::SOAP::Daemon/"Helpers">
+Inherited, see L<XML::Compile::SOAP::Daemon/"Helpers">
=item $obj-E<gt>B<soapVersions>()
-See L<XML::Compile::SOAP::Daemon/"Helpers">
+Inherited, see L<XML::Compile::SOAP::Daemon/"Helpers">
=back
=head1 DETAILS
-See L<documentation in base class|XML::Compile::SOAP::Daemon/"DETAILS">.
+Extends L<"DETAILS" in XML::Compile::SOAP::Daemon|XML::Compile::SOAP::Daemon/"DETAILS">.
=head2 Operation handlers
-See L<documentation in base class|XML::Compile::SOAP::Daemon/"Operation handlers">.
+Extends L<"Operation handlers" in XML::Compile::SOAP::Daemon|XML::Compile::SOAP::Daemon/"Operation handlers">.
=head2 Returning errors
-See L<documentation in base class|XML::Compile::SOAP::Daemon/"Returning errors">.
+Extends L<"Returning errors" in XML::Compile::SOAP::Daemon|XML::Compile::SOAP::Daemon/"Returning errors">.
=head2 Configuration options
@@ -273,12 +273,13 @@ it: before the daemon is initiated. See Log::Report subroutine dispatcher.
=head1 SEE ALSO
-This module is part of XML-Compile-SOAP-Daemon distribution version 3.06,
-built on May 03, 2013. Website: F<http://perl.overmeer.net/xml-compile/>
+This module is part of XML-Compile-SOAP-Daemon distribution version 3.10,
+built on November 26, 2014. Website: F<http://perl.overmeer.net/xml-compile/>
Other distributions in this suite:
L<XML::Compile>,
L<XML::Compile::SOAP>,
+L<XML::Compile::WSDL11>,
L<XML::Compile::SOAP12>,
L<XML::Compile::SOAP::Daemon>,
L<XML::Compile::SOAP::WSA>,
@@ -289,20 +290,18 @@ L<XML::Compile::Tester>,
L<XML::Compile::Cache>,
L<XML::Compile::Dumper>,
L<XML::Compile::RPC>,
-L<XML::Rewrite>,
-L<XML::eXistDB>,
+L<XML::Rewrite>
and
L<XML::LibXML::Simple>.
Please post questions or ideas to the mailinglist at
-F<http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/xml-compile>
-
+F<http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/xml-compile> .
For live contact with other developers, visit the C<#xml-compile> channel
on C<irc.perl.org>.
=head1 LICENSE
-Copyrights 2007-2013 by [Mark Overmeer]. For other contributors see ChangeLog.
+Copyrights 2007-2014 by [Mark Overmeer]. For other contributors see ChangeLog.
This program is free software; you can redistribute it and/or modify it
under the same terms as Perl itself.
@@ -1,4 +1,4 @@
-# Copyrights 2007-2013 by [Mark Overmeer].
+# Copyrights 2007-2014 by [Mark Overmeer].
# For other contributors see ChangeLog.
# See the manual pages for details on the licensing terms.
# Pod stripped from pm file by OODoc 2.01.
@@ -7,9 +7,9 @@ use strict;
package XML::Compile::SOAP::Daemon::PSGI;
use vars '$VERSION';
-$VERSION = '3.06';
+$VERSION = '3.10';
-use base 'XML::Compile::SOAP::Daemon', 'Plack::Component';
+use parent 'XML::Compile::SOAP::Daemon', 'Plack::Component';
use Log::Report 'xml-compile-soap-daemon';
use Encode;
@@ -125,13 +125,14 @@ sub _call($;$)
$res;
}
-sub setWsdlResponse($)
-{ my ($self, $fn) = @_;
+sub setWsdlResponse($;$)
+{ my ($self, $fn, $ft) = @_;
local *WSDL;
open WSDL, '<:raw', $fn
or fault __x"cannot read WSDL from {file}", file => $fn;
local $/;
$self->{wsdl_data} = <WSDL>;
+ $self->{wsdl_type} = $ft || 'application/wsdl+xml';
close WSDL;
}
@@ -140,7 +141,7 @@ sub sendWsdl($)
my $res = $req->new_response(RC_OK,
{ Warning => '199 WSDL specification'
- , Content_Type => 'application/wsdl+xml; charset=utf-8'
+ , Content_Type => $self->{wsdl_type}.'; charset=utf-8'
, Content_Length => length($self->{wsdl_data})
}, $self->{wsdl_data});
@@ -36,19 +36,19 @@ This abstraction level of the object (code in this pm file) is not
concerned with parsing or composing XML, but only worries about the
HTTP transport specifics of SOAP messages.
-See L<documentation in base class|XML::Compile::SOAP::Daemon/"DESCRIPTION">.
+Extends L<"DESCRIPTION" in XML::Compile::SOAP::Daemon|XML::Compile::SOAP::Daemon/"DESCRIPTION">.
=head1 METHODS
-See L<documentation in base class|XML::Compile::SOAP::Daemon/"METHODS">.
+Extends L<"METHODS" in XML::Compile::SOAP::Daemon|XML::Compile::SOAP::Daemon/"METHODS">.
=head2 Constructors
-See L<documentation in base class|XML::Compile::SOAP::Daemon/"Constructors">.
+Extends L<"Constructors" in XML::Compile::SOAP::Daemon|XML::Compile::SOAP::Daemon/"Constructors">.
=over 4
-=item XML::Compile::SOAP::Daemon::PSGI-E<gt>B<new>(OPTIONS)
+=item XML::Compile::SOAP::Daemon::PSGI-E<gt>B<new>(%options)
-Option --Defined in --Default
accept_slow_select XML::Compile::SOAP::Daemon <true>
@@ -87,39 +87,39 @@ before processing SOAP message.
=head2 Attributes
-See L<documentation in base class|XML::Compile::SOAP::Daemon/"Attributes">.
+Extends L<"Attributes" in XML::Compile::SOAP::Daemon|XML::Compile::SOAP::Daemon/"Attributes">.
=over 4
=item $obj-E<gt>B<addSoapAction>(HASH|PAIRS)
-See L<XML::Compile::SOAP::Daemon/"Attributes">
+Inherited, see L<XML::Compile::SOAP::Daemon/"Attributes">
-=item $obj-E<gt>B<addWsaTable>(('INPUT'|'OUTPUT'), [HASH|PAIRS])
+=item $obj-E<gt>B<addWsaTable>( <'INPUT'|'OUTPUT'>, [HASH|PAIRS] )
-See L<XML::Compile::SOAP::Daemon/"Attributes">
+Inherited, see L<XML::Compile::SOAP::Daemon/"Attributes">
=item $obj-E<gt>B<outputCharset>()
-See L<XML::Compile::SOAP::Daemon/"Attributes">
+Inherited, see L<XML::Compile::SOAP::Daemon/"Attributes">
=back
=head2 Running the server
-See L<documentation in base class|XML::Compile::SOAP::Daemon/"Running the server">.
+Extends L<"Running the server" in XML::Compile::SOAP::Daemon|XML::Compile::SOAP::Daemon/"Running the server">.
=over 4
-=item $obj-E<gt>B<call>(ENV)
+=item $obj-E<gt>B<call>($env)
Process the content of a single message. Not to be called directly.
-=item $obj-E<gt>B<process>(CLIENT, XMLIN, REQUEST, ACTION)
+=item $obj-E<gt>B<process>($client, $xmlin, $request, $action)
-See L<XML::Compile::SOAP::Daemon/"Running the server">
+Inherited, see L<XML::Compile::SOAP::Daemon/"Running the server">
-=item $obj-E<gt>B<run>(OPTIONS)
+=item $obj-E<gt>B<run>(%options)
The same as B<to_app> but accepts additional B<preprocess> and
B<postprocess> options.
@@ -132,67 +132,67 @@ Converts the server into a PSGI C<$app>.
=head2 Preparations
-See L<documentation in base class|XML::Compile::SOAP::Daemon/"Preparations">.
+Extends L<"Preparations" in XML::Compile::SOAP::Daemon|XML::Compile::SOAP::Daemon/"Preparations">.
=over 4
-=item $obj-E<gt>B<addHandler>(NAME, SOAP, CODE)
+=item $obj-E<gt>B<addHandler>($name, $soap, CODE)
-See L<XML::Compile::SOAP::Daemon/"Preparations">
+Inherited, see L<XML::Compile::SOAP::Daemon/"Preparations">
-=item $obj-E<gt>B<operationsFromWSDL>(WSDL, OPTIONS)
+=item $obj-E<gt>B<operationsFromWSDL>($wsdl, %options)
-See L<XML::Compile::SOAP::Daemon/"Preparations">
+Inherited, see L<XML::Compile::SOAP::Daemon/"Preparations">
-=item $obj-E<gt>B<setWsdlResponse>(FILENAME)
+=item $obj-E<gt>B<setWsdlResponse>( $filename, [$filetype] )
-See L<XML::Compile::SOAP::Daemon/"Preparations">
+Inherited, see L<XML::Compile::SOAP::Daemon/"Preparations">
=back
=head2 Helpers
-See L<documentation in base class|XML::Compile::SOAP::Daemon/"Helpers">.
+Extends L<"Helpers" in XML::Compile::SOAP::Daemon|XML::Compile::SOAP::Daemon/"Helpers">.
=over 4
-=item $obj-E<gt>B<faultInvalidXML>(ERROR)
+=item $obj-E<gt>B<faultInvalidXML>($error)
-See L<XML::Compile::SOAP::Daemon/"Helpers">
+Inherited, see L<XML::Compile::SOAP::Daemon/"Helpers">
-=item $obj-E<gt>B<faultNotSoapMessage>(NODETYPE)
+=item $obj-E<gt>B<faultNotSoapMessage>($nodetype)
-See L<XML::Compile::SOAP::Daemon/"Helpers">
+Inherited, see L<XML::Compile::SOAP::Daemon/"Helpers">
-=item $obj-E<gt>B<faultUnsupportedSoapVersion>(ENV_NS)
+=item $obj-E<gt>B<faultUnsupportedSoapVersion>($env_ns)
-See L<XML::Compile::SOAP::Daemon/"Helpers">
+Inherited, see L<XML::Compile::SOAP::Daemon/"Helpers">
-=item $obj-E<gt>B<handlers>(('SOAP11'|'SOAP12'|SOAP))
+=item $obj-E<gt>B<handlers>( <'SOAP11'|'SOAP12'|$soap> )
-See L<XML::Compile::SOAP::Daemon/"Helpers">
+Inherited, see L<XML::Compile::SOAP::Daemon/"Helpers">
-=item $obj-E<gt>B<printIndex>([FILEHANDLE])
+=item $obj-E<gt>B<printIndex>( [$fh] )
-See L<XML::Compile::SOAP::Daemon/"Helpers">
+Inherited, see L<XML::Compile::SOAP::Daemon/"Helpers">
=item $obj-E<gt>B<soapVersions>()
-See L<XML::Compile::SOAP::Daemon/"Helpers">
+Inherited, see L<XML::Compile::SOAP::Daemon/"Helpers">
=back
=head1 DETAILS
-See L<documentation in base class|XML::Compile::SOAP::Daemon/"DETAILS">.
+Extends L<"DETAILS" in XML::Compile::SOAP::Daemon|XML::Compile::SOAP::Daemon/"DETAILS">.
=head2 Operation handlers
-See L<documentation in base class|XML::Compile::SOAP::Daemon/"Operation handlers">.
+Extends L<"Operation handlers" in XML::Compile::SOAP::Daemon|XML::Compile::SOAP::Daemon/"Operation handlers">.
=head2 Returning errors
-See L<documentation in base class|XML::Compile::SOAP::Daemon/"Returning errors">.
+Extends L<"Returning errors" in XML::Compile::SOAP::Daemon|XML::Compile::SOAP::Daemon/"Returning errors">.
=head2 How to use the PSGI module
@@ -205,12 +205,13 @@ find a README describing the process.
=head1 SEE ALSO
-This module is part of XML-Compile-SOAP-Daemon distribution version 3.06,
-built on May 03, 2013. Website: F<http://perl.overmeer.net/xml-compile/>
+This module is part of XML-Compile-SOAP-Daemon distribution version 3.10,
+built on November 26, 2014. Website: F<http://perl.overmeer.net/xml-compile/>
Other distributions in this suite:
L<XML::Compile>,
L<XML::Compile::SOAP>,
+L<XML::Compile::WSDL11>,
L<XML::Compile::SOAP12>,
L<XML::Compile::SOAP::Daemon>,
L<XML::Compile::SOAP::WSA>,
@@ -221,20 +222,18 @@ L<XML::Compile::Tester>,
L<XML::Compile::Cache>,
L<XML::Compile::Dumper>,
L<XML::Compile::RPC>,
-L<XML::Rewrite>,
-L<XML::eXistDB>,
+L<XML::Rewrite>
and
L<XML::LibXML::Simple>.
Please post questions or ideas to the mailinglist at
-F<http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/xml-compile>
-
+F<http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/xml-compile> .
For live contact with other developers, visit the C<#xml-compile> channel
on C<irc.perl.org>.
=head1 LICENSE
-Copyrights 2007-2013 by [Mark Overmeer]. For other contributors see ChangeLog.
+Copyrights 2007-2014 by [Mark Overmeer]. For other contributors see ChangeLog.
This program is free software; you can redistribute it and/or modify it
under the same terms as Perl itself.
@@ -1,4 +1,4 @@
-# Copyrights 2007-2013 by [Mark Overmeer].
+# Copyrights 2007-2014 by [Mark Overmeer].
# For other contributors see ChangeLog.
# See the manual pages for details on the licensing terms.
# Pod stripped from pm file by OODoc 2.01.
@@ -7,9 +7,8 @@ use strict;
package XML::Compile::SOAP::Daemon;
use vars '$VERSION';
-$VERSION = '3.06';
+$VERSION = '3.10';
-our @ISA; # filled-in at new().
use Log::Report 'xml-compile-soap-daemon';
@@ -51,7 +50,7 @@ sub init($)
error __x"new(support_soap} removed in 2.00";
}
- my @classes = XML::Compile::SOAP::Operation->registered;
+ my @classes = XML::Compile::SOAP->registered;
@classes # explicit load required since 2.00
or warning "No protocol modules loaded. Need XML::Compile::SOAP11?";
@@ -60,6 +59,7 @@ sub init($)
$self;
}
+#-----------
sub outputCharset() {shift->{output_charset}}
@@ -89,17 +89,15 @@ sub addSoapAction(@)
$t;
}
+#------------------
sub run(@)
{ my ($self, %args) = @_;
- eval {
notice __x"WSA module loaded, but not used"
if XML::Compile::SOAP::WSA->can('new') && !keys %{$self->{wsa_input}};
$self->{wsa_input_rev} = +{ reverse %{$self->{wsa_input}} };
$self->_run(\%args);
- };
- error $@ if $@;
}
@@ -129,7 +127,7 @@ sub process($)
or return $self->faultNotSoapMessage(type_of_node $xmlin);
my $envns = $xmlin->namespaceURI || '';
- my $proto = XML::Compile::SOAP::Operation->fromEnvelope($envns)
+ my $proto = XML::Compile::SOAP->fromEnvelope($envns)
or return $self->faultUnsupportedSoapVersion($envns);
# proto is a XML::Compile::SOAP*::Operation
my $server = $proto->serverClass;
@@ -185,15 +183,18 @@ sub process($)
$self->soapVersions;
return (RC_SEE_OTHER, 'SOAP protocol not in use'
- , $server->faultTryOtherProtocol($bodyel, \@other))
+ , $server->faultTryOtherProtocol($bodyel, \@other))
if @other;
# we do not have the names of the request body elements here :(
my @ports = sort keys %$handlers;
- ( RC_NOT_FOUND, 'message not recognized'
- , $server->faultMessageNotRecognized($bodyel, $soapaction, \@ports));
+
+ ( RC_NOT_FOUND, 'message not recognized'
+ , $server->faultMessageNotRecognized($bodyel, $soapaction, \@ports)
+ );
}
+#------------------
sub operationsFromWSDL($@)
{ my ($self, $wsdl, %args) = @_;
@@ -210,7 +211,7 @@ sub operationsFromWSDL($@)
foreach my $op (@ops)
{ my $name = $op->name;
- warning "multiple operations with name {name}", name => $name
+ warning __x"multiple operations with name `{name}'", name => $name
if $names{$name}++;
my $code;
@@ -224,9 +225,8 @@ sub operationsFromWSDL($@)
}
else
{ trace __x"add stub handler for operation `{name}'", name => $name;
- my $server = $op->serverClass;
my $handler = $default_cb
- || sub { $server->faultNotImplemented($name) };
+ || sub { $_[0]->faultNotImplemented($name) };
$code = $op->compileHandler(callback => $handler);
}
@@ -262,11 +262,12 @@ sub addHandler($$$)
}
-sub setWsdlResponse($)
-{ my ($self, $filename) = @_;
+sub setWsdlResponse($;$)
+{ my ($self, $filename, $type) = @_;
panic "not implemented by backend {pkg}", pkg => (ref $self || $self);
}
+#------------------
sub handlers($)
{ my ($self, $soap) = @_;
@@ -314,5 +315,6 @@ sub faultUnsupportedSoapVersion($)
, __x("The soap version `{envns}' is not supported", envns => $envns));
}
+#------------------
1;
@@ -24,6 +24,7 @@ XML::Compile::SOAP::Daemon - SOAP accepting server (base class)
$daemon->operationsFromWSDL($wsdl, callbacks => ...);
$daemon->setWsdlResponse($wsdl_fn);
+ $daemon->setWsdlResponse($wsdl_fn, $soap11->mediaType);
# operation definitions added manually
my $soap11 = XML::Compile::SOAP11::Server->new(schemas => $wsdl->schemas);
@@ -83,7 +84,7 @@ the time.
=over 4
-=item XML::Compile::SOAP::Daemon-E<gt>B<new>(OPTIONS)
+=item XML::Compile::SOAP::Daemon-E<gt>B<new>(%options)
-Option --Default
accept_slow_select <true>
@@ -147,7 +148,7 @@ when XML::Compile::SOAP::WSA is loaded.
Map SOAPAction headers only operations. You do not need to map
explicitly when the info can be derived from the WSDL.
-=item $obj-E<gt>B<addWsaTable>(('INPUT'|'OUTPUT'), [HASH|PAIRS])
+=item $obj-E<gt>B<addWsaTable>( <'INPUT'|'OUTPUT'>, [HASH|PAIRS] )
Map operation name onto respectively server-input or server-output
messages, used for C<wsa:Action> fields in the header. Usually, these
@@ -164,15 +165,15 @@ The character-set to be used for output documents.
=over 4
-=item $obj-E<gt>B<process>(CLIENT, XMLIN, REQUEST, ACTION)
+=item $obj-E<gt>B<process>($client, $xmlin, $request, $action)
This method is called to process a single request.
-The XMLIN is a SOAP-structured message (an XML::LibXML::Element,
-XML::LibXML::Document, or XML as string), was received from the CLIENT
+The $xmlin is a SOAP-structured message (an XML::LibXML::Element,
+XML::LibXML::Document, or XML as string), was received from the $client
(some extension specific object).
-The full REQUEST is passed in, however its format depends on the
-kind of server. The ACTION parameter relates to the soapAction header
+The full $request is passed in, however its format depends on the
+kind of server. The $action parameter relates to the soapAction header
field which may be available in some form.
Returned is an XML document (XML::LibXML::Document) as answer or a
@@ -186,7 +187,7 @@ See L<operationsFromWSDL()|XML::Compile::SOAP::Daemon/"Preparations"> and L<addH
routines can be specified. See L<new()|XML::Compile::SOAP::Daemon/"Constructors"> for a description of the options
which control how the callback routine is chosen.
-=item $obj-E<gt>B<run>(OPTIONS)
+=item $obj-E<gt>B<run>(%options)
How the daemon is run depends much on the extension being used. See the
C<::NetServer> and C<::CGI> manual-page.
@@ -197,23 +198,23 @@ C<::NetServer> and C<::CGI> manual-page.
=over 4
-=item $obj-E<gt>B<addHandler>(NAME, SOAP, CODE)
+=item $obj-E<gt>B<addHandler>($name, $soap, CODE)
-The SOAP value is C<SOAP11>, C<SOAP12>, or a SOAP server object or and
-SOAP Operation object. The CODE reference is called with the incoming
+The $soap value is C<SOAP11>, C<SOAP12>, or a $soap server object or and
+$soap Operation object. The CODE reference is called with the incoming
document (an XML::LibXML::Document) of the received input message.
In case the handler does not understand the message, it should
return undef. Otherwise, it must return a correct answer message as
XML::LibXML::Document.
-=item $obj-E<gt>B<operationsFromWSDL>(WSDL, OPTIONS)
+=item $obj-E<gt>B<operationsFromWSDL>($wsdl, %options)
-Compile the operations found in the WSDL object (an
-L<XML::Compile::WSDL11|XML::Compile::WSDL11>). You can add the operations from many different
+Compile the operations found in the $wsdl object (an
+XML::Compile::WSDL11). You can add the operations from many different
WSDLs into one server, simply by calling this method repeatedly.
-You can also specify OPTIONS for L<XML::Compile::WSDL11::operations()|XML::Compile::WSDL11/"Introspection">.
+You can also specify %options for XML::Compile::WSDL11 subroutine operations.
Those parameters may be needed to distinguish between the test-server
and the live-server, provided protocol support and such.
@@ -226,7 +227,7 @@ and the live-server, provided protocol support and such.
=item callbacks => HASH
-The keys are the port names, as defined in the WSDL. The values are CODE
+The keys are the port names, as defined in the $wsdl. The values are CODE
references which are called in case a message is received which is
addressing the port (this is a guess). See L</Operation handlers>
@@ -240,39 +241,41 @@ be returned. See L</Operation handlers>
Load the selected operations only (L<XML::Compile::SOAP::Operation|XML::Compile::SOAP::Operation> objects)
If not specified, all operations will be taken which are selected with
-the C<service>, C<port>, and C<binding> OPTIONS for
-L<XML::Compile::WSDL11::operations()|XML::Compile::WSDL11/"Introspection">.
+the C<service>, C<port>, and C<binding> %options for
+XML::Compile::WSDL11 subroutine operations.
=back
example:
- $wsdl->operationsFromWSDL($wsdl, service => 'MyService',
+ $daemon->operationsFromWSDL($wsdl, service => 'MyService',
binding => 'MyService-soap11', callbacks => {get => \$f11});
- $wsdl->operationsFromWSDL($wsdl, service => 'MyService-test',
+ $daemonwsdl->operationsFromWSDL($wsdl, service => 'MyService-test',
binding => 'MyService-soap12', callbacks => {get => \$f12});
-=item $obj-E<gt>B<setWsdlResponse>(FILENAME)
+=item $obj-E<gt>B<setWsdlResponse>( $filename, [$filetype] )
-Many existing SOAP servers will reponse to GET queries which end on "?WSDL"
+Many existing SOAP servers will response to GET queries which end on "?WSDL"
by sending the WSDL in use by the service.
+The default $filetype is C<application/wsdl+xml>. You may need C<text/xml>
+
=back
=head2 Helpers
=over 4
-=item $obj-E<gt>B<faultInvalidXML>(ERROR)
+=item $obj-E<gt>B<faultInvalidXML>($error)
-=item $obj-E<gt>B<faultNotSoapMessage>(NODETYPE)
+=item $obj-E<gt>B<faultNotSoapMessage>($nodetype)
-=item $obj-E<gt>B<faultUnsupportedSoapVersion>(ENV_NS)
+=item $obj-E<gt>B<faultUnsupportedSoapVersion>($env_ns)
Produces a text message, because we do not know how to produce
an error in a SOAP which we do not understand.
-=item $obj-E<gt>B<handlers>(('SOAP11'|'SOAP12'|SOAP))
+=item $obj-E<gt>B<handlers>( <'SOAP11'|'SOAP12'|$soap> )
Returns all the handler names for a certain soap version.
@@ -284,7 +287,7 @@ example:
}
}
-=item $obj-E<gt>B<printIndex>([FILEHANDLE])
+=item $obj-E<gt>B<printIndex>( [$fh] )
Print a table which shows the messages that the server can handle,
by default to STDOUT.
@@ -354,7 +357,7 @@ like this:
Fault codes are "prefix:error-name", XML::Compile finds the right prefix
based on the URI. If your error namespace is not mentioned in the WSDL or
-other loaded schemas, you should use L<XML::Compile::WSDL11::prefixes()|XML::Compile::Cache/"Prefix management">
+other loaded schemas, you should use XML::Compile::WSDL11 subroutine prefixes
first.
SOAP uses error codes in the SOAPENV namespace. It shows whether errors
@@ -435,12 +438,13 @@ faultstring values from the fault message.
=head1 SEE ALSO
-This module is part of XML-Compile-SOAP-Daemon distribution version 3.06,
-built on May 03, 2013. Website: F<http://perl.overmeer.net/xml-compile/>
+This module is part of XML-Compile-SOAP-Daemon distribution version 3.10,
+built on November 26, 2014. Website: F<http://perl.overmeer.net/xml-compile/>
Other distributions in this suite:
L<XML::Compile>,
L<XML::Compile::SOAP>,
+L<XML::Compile::WSDL11>,
L<XML::Compile::SOAP12>,
L<XML::Compile::SOAP::Daemon>,
L<XML::Compile::SOAP::WSA>,
@@ -451,20 +455,18 @@ L<XML::Compile::Tester>,
L<XML::Compile::Cache>,
L<XML::Compile::Dumper>,
L<XML::Compile::RPC>,
-L<XML::Rewrite>,
-L<XML::eXistDB>,
+L<XML::Rewrite>
and
L<XML::LibXML::Simple>.
Please post questions or ideas to the mailinglist at
-F<http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/xml-compile>
-
+F<http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/xml-compile> .
For live contact with other developers, visit the C<#xml-compile> channel
on C<irc.perl.org>.
=head1 LICENSE
-Copyrights 2007-2013 by [Mark Overmeer]. For other contributors see ChangeLog.
+Copyrights 2007-2014 by [Mark Overmeer]. For other contributors see ChangeLog.
This program is free software; you can redistribute it and/or modify it
under the same terms as Perl itself.
@@ -1,11 +1,11 @@
-# Copyrights 2007-2013 by [Mark Overmeer].
+# Copyrights 2007-2014 by [Mark Overmeer].
# For other contributors see ChangeLog.
# See the manual pages for details on the licensing terms.
# Pod stripped from pm file by OODoc 2.01.
package XML::Compile::SOAP::HTTPDaemon;
use vars '$VERSION';
-$VERSION = '3.06';
+$VERSION = '3.10';
use XML::Compile::SOAP::Daemon::NetServer;
@@ -207,7 +207,7 @@ compare_answer($ans7, <<__EXPECTED, 'message not found');
404
message not recognized
text/xml
-charset="utf-8"
+charset=utf-8
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
@@ -1,4 +1,4 @@
-#!/usr/bin/perl
+#!/usr/bin/env perl
# Check whether the wsaAction is used for message selection.
# file.
@@ -17,23 +17,20 @@ use XML::Compile::Transport::SOAPHTTP;
use XML::Compile::Tester;
use Test::More;
-BEGIN
-{ eval "require Net::Server";
- my $has_net_server = $@ ? 0 : 1;
+eval "require Net::Server";
+my $has_net_server = $@ ? 0 : 1;
- eval "require LWP";
- my $has_lwp = $@ ? 0 : 1;
+eval "require LWP";
+my $has_lwp = $@ ? 0 : 1;
- plan skip_all => "Net::Server and LWP are need"
- unless $has_net_server && $has_lwp;
+plan skip_all => "Net::Server and LWP are need"
+ unless $has_net_server && $has_lwp;
- eval "require XML::Compile::SOAP::WSA";
- $@ && plan skip_all => "XML::Compile::SOAP::WSA not installed";
+eval "require XML::Compile::SOAP::WSA";
+$@ && plan skip_all => "XML::Compile::SOAP::WSA not installed";
- eval "require XML::Compile::SOAP::WSA::Util";
- XML::Compile::SOAP::WSA::Util->import(qw/WSDL11WSAW WSA10/);
-
-}
+eval "require XML::Compile::WSA::Util";
+XML::Compile::WSA::Util->import(qw/WSDL11WSAW WSA10/);
plan tests => 10;
require_ok('XML::Compile::SOAP::Daemon::NetServer');
@@ -45,9 +42,9 @@ my $SchemaNS = SCHEMA2001;
my $ressvc = "http://greath.example.com/2004/schemas/resSvc";
my $types = "urn:anything";
-my $wsaw = WSDL11WSAW;
+my $wsaw = &WSDL11WSAW;
my $xsd = SCHEMA2001;
-my $wsans = WSA10;
+my $wsans = &WSA10;
my $xml_wsdl = <<__WSDL;
<?xml version="1.0"?>
@@ -115,6 +112,8 @@ $daemon->operationsFromWSDL($wsdl
, callbacks =>
{ opCheckAvailability => sub () {
my ($server, $data) = @_;
+#use Data::Dumper;
+#print STDERR Dumper \@_;
is($data->{body}, 'ping');
#warn "CALLOP ", Dumper $data;
+{body => 'yes', wsa_MessageID => 'the reply'}