XML-Compile-WSDL11-3.08/0000755000175000001440000000000014112100572015112 5ustar00markovusers00000000000000XML-Compile-WSDL11-3.08/lib/0000755000175000001440000000000014112100572015660 5ustar00markovusers00000000000000XML-Compile-WSDL11-3.08/lib/XML/0000755000175000001440000000000014112100572016320 5ustar00markovusers00000000000000XML-Compile-WSDL11-3.08/lib/XML/Compile/0000755000175000001440000000000014112100572017710 5ustar00markovusers00000000000000XML-Compile-WSDL11-3.08/lib/XML/Compile/WSDL11/0000755000175000001440000000000014112100572020623 5ustar00markovusers00000000000000XML-Compile-WSDL11-3.08/lib/XML/Compile/WSDL11/xsd/0000755000175000001440000000000014112100572021421 5ustar00markovusers00000000000000XML-Compile-WSDL11-3.08/lib/XML/Compile/WSDL11/xsd/wsdl.xsd0000644000175000001440000002605414112100555023122 0ustar00markovusers00000000000000 This type is extended by component types to allow them to be documented This type is extended by component types to allow attributes from other namespaces to be added. This type is extended by component types to allow elements from other namespaces to be added. Any top level optional element allowed to appear more then once - any child of definitions element except wsdl:types. Any extensibility element is allowed in any place. XML-Compile-WSDL11-3.08/lib/XML/Compile/WSDL11/xsd/wsdl-http.xsd0000644000175000001440000000502214112100555024067 0ustar00markovusers00000000000000 XML-Compile-WSDL11-3.08/lib/XML/Compile/WSDL11/xsd/wsdl-mime.xsd0000644000175000001440000000530414112100555024042 0ustar00markovusers00000000000000 XML-Compile-WSDL11-3.08/lib/XML/Compile/WSDL11.pod0000644000175000001440000005543714112100570021343 0ustar00markovusers00000000000000=encoding utf8 =head1 NAME XML::Compile::WSDL11 - create SOAP messages defined by WSDL 1.1 =head1 INHERITANCE XML::Compile::WSDL11 is a XML::Compile::Cache is a XML::Compile::Schema is a XML::Compile =head1 SYNOPSIS # preparation use XML::Compile::WSDL11; # use WSDL version 1.1 use XML::Compile::SOAP11; # use SOAP version 1.1 use XML::Compile::Transport::SOAPHTTP; # you want some trace? use Log::Report mode => 'DEBUG'; # or 'VERBOSE' # collect one or more wsdls and xsds in one object my $wsdl = XML::Compile::WSDL11->new($wsdlfile , server_type => 'BEA' ); $wsdl->addWSDL(...more WSDL files...); $wsdl->importDefinitions(...more schemas...); # during initiation, for each used call my $call = $wsdl->compileClient('GetStockPrice', ...); # at "run-time", call as often as you want (fast) my $answer = $call->(%request); # capture useful trace information my ($answer, $trace) = $call->(%request); if($trace->errors) { $trace->printError; } # no need to administer the operations by hand: alternative $wsdl->compileCalls; # at initiation my $answer = $wsdl->call(GetStockPrice => %request); # investigate the %request structure (server input) print $wsdl->explain('GetStockPrice', PERL => 'INPUT', recurse => 1); # investigate the $answer structure (server output) print $wsdl->explain('GetStockPrice', PERL => 'OUTPUT'); # when you like, get all operation definitions my @all_ops = $wsdl->operations; # Install XML::Compile::SOAP::Daemon my $server = XML::Compile::SOAP::HTTPDaemon->new; $server->operationsFromWSDL($wsdl); undef $wsdl; # not needed any further # For debug info, start your script with: use Log::Report mode => 'DEBUG'; =head1 DESCRIPTION This module understands WSDL version 1.1. An WSDL file defines a set of messages to be send and received over (SOAP) connections. This involves encoding of the message to be send into XML, sending the message to the server, collect the answer, and finally decoding the XML to Perl. As end-user, you do not have to worry about the complex details of the messages and the way to exchange them: it's all simple Perl for you. Also, faults are handled automatically. The only complication you have to worry about is to shape a nested HASH structure to the sending message structure. L may help you. When the definitions are spread over multiple files you will need to use L (wsdl) or L (additional schema's) explicitly. Usually, interreferences between those files are broken. Often they reference over networks (you should never trust). So, on purpose you B the files you need from local disk! (of course, it is simple to find one-liners as work-arounds, but I will not tell you how! See L) Extends L<"DESCRIPTION" in XML::Compile::Cache|XML::Compile::Cache/"DESCRIPTION">. =head1 METHODS Extends L<"METHODS" in XML::Compile::Cache|XML::Compile::Cache/"METHODS">. =head2 Constructors Extends L<"Constructors" in XML::Compile::Cache|XML::Compile::Cache/"Constructors">. =over 4 =item XML::Compile::WSDL11-EB( [$xml], %options ) The $xml is the WSDL file, which is anything accepted by L. -Option --Defined in --Default allow_undeclared XML::Compile::Cache any_element XML::Compile::Cache 'ATTEMPT' block_namespace XML::Compile::Schema [] hook XML::Compile::Schema undef hooks XML::Compile::Schema [] ignore_unused_tags XML::Compile::Schema key_rewrite XML::Compile::Schema [] opts_readers XML::Compile::Cache [] opts_rw XML::Compile::Cache [] opts_writers XML::Compile::Cache [] parser_options XML::Compile prefixes XML::Compile::Cache schema_dirs XML::Compile undef server_type undef typemap XML::Compile::Cache {} xsi_type XML::Compile::Cache {} =over 2 =item allow_undeclared => BOOLEAN =item any_element => CODE|'TAKE_ALL'|'SKIP_ALL'|'ATTEMPT'|'SLOPPY' =item block_namespace => NAMESPACE|TYPE|HASH|CODE|ARRAY =item hook => $hook|ARRAY =item hooks => ARRAY =item ignore_unused_tags => BOOLEAN|REGEXP =item key_rewrite => HASH|CODE|ARRAY =item opts_readers => HASH|ARRAY-of-PAIRS =item opts_rw => HASH|ARRAY-of-PAIRS =item opts_writers => HASH|ARRAY-of-PAIRS =item parser_options => HASH|ARRAY =item prefixes => HASH|ARRAY-of-PAIRS =item schema_dirs => $directory|ARRAY-OF-directories =item server_type => NAME [3.01] When you specify the implementation of the server, we can work around some of the known bugs and limitation. Read L section "Supported servers" for supported servers. =item typemap => HASH|ARRAY =item xsi_type => HASH|ARRAY =back =back =head2 Accessors Extends L<"Accessors" in XML::Compile::Cache|XML::Compile::Cache/"Accessors">. =over 4 =item $obj-EB($hook|LIST|undef) Inherited, see L =item $obj-EB( $hook, [$hook, ...] ) Inherited, see L =item $obj-EB($predef|CODE|HASH, ...) Inherited, see L =item $obj-EB(@directories|$filename) =item XML::Compile::WSDL11-EB(@directories|$filename) Inherited, see L =item $obj-EB($xml, %options) Inherited, see L =item $obj-EB(PAIR) Inherited, see L =item $obj-EB(PAIRS) Inherited, see L =item $obj-EB( [HASH|ARRAY|LIST] ) Inherited, see L =item $obj-EB( [BOOLEAN] ) Inherited, see L =item $obj-EB('ATTEMPT'|'SLOPPY'|'SKIP_ALL'|'TAKE_ALL'|CODE) Inherited, see L =item $obj-EB($ns|$type|HASH|CODE|ARRAY) Inherited, see L =item $obj-EB( [<'READER'|'WRITER'>] ) Inherited, see L =item $obj-EB( [HASH|ARRAY|PAIRS] ) Inherited, see L =item $obj-EB( $schema, [$schema, ...] ) Inherited, see L =back =head2 Prefix management Extends L<"Prefix management" in XML::Compile::Cache|XML::Compile::Cache/"Prefix management">. =over 4 =item $obj-EB(BASE, NAMESPACE) Inherited, see L =item $obj-EB( [PAIRS|ARRAY|HASH] ) Inherited, see L =item $obj-EB($node) Inherited, see L =item $obj-EB($prefix) Inherited, see L =item $obj-EB($uri) Inherited, see L =item $obj-EB( $type|<$ns,$local> ) Inherited, see L =item $obj-EB( [$params] ) Inherited, see L =back =head2 Compilers Extends L<"Compilers" in XML::Compile::Cache|XML::Compile::Cache/"Compilers">. =over 4 =item $obj-EB( ['READERS'|'WRITERS'|'RW'], %options ) Inherited, see L =item $obj-EB($opname, $data) [2.20] Call the $opname (operation name) with $data (HASH or LIST of parameters). This only works when you have called L beforehand, always during the initiation phase of the program. example: # at initiation time (compile once) $wsdl->compileCalls; # at runtime (run often) my $answer = $wsdl->call($operation, $request); =item $obj-EB( <'READER'|'WRITER'>, $type, %options ) Inherited, see L =item $obj-EB( [ <'READERS'|'WRITERS'|'RW'|'CALLS'>, [$ns] ] ) [2.20] With explicit C or without any parameter, it will call L. Otherwise, see L. =item $obj-EB($operation|$opname, %options) [2.37] The call to the $operation object (which extends L) gets compiled and cached so it can be used with L. [2.38] Alteratively to an $operation object, you may also specify an operation by name. -Option--Default alias undef =over 2 =item alias => NAME [3.03] When defined, the compiled operation will be stored with the alias name in stead of the operation name. This may make your code more readible or solve naming conflicts. =back example: my $op = $wsdl->operation(name => 'getInfo'); $wsdl->compileCall($op); # as often as you need it my ($answer, $trace) = $wsdl->call('getInfo')->(%request); =item $obj-EB(%options) [2.20] Compile a handler for each of the available operations. The %options are passed to each call of L, but will be overruled by more specific declared options. Additionally, %options can contain C, C, and C to limit the set of involved calls. See L for details on these options. You may declare additional specific compilation options with the L method. -Option --Default long_names false =over 2 =item long_names => BOOLEAN [3.03] Prepend the service name to the operation name to produce an alias (see L) for the compiled call. If the service name is 'X' and the operation name is 'Y', then the alias becomes 'X#Y'. You will need this if you have multiple operations with the same name in your WSDL (-collection). =back example: my $trans = XML::Compile::Transport::SOAPHTTP ->new(timeout => 500, address => $wsdl->endPoint); $wsdl->compileCalls(transport => $trans); # alternatives for simple cases $wsdl->compileAll('CALLS'); $wsdl->compileAll; my $answer = $wsdl->call($myop, $request); =item $obj-EB( <'READER'|'WRITER'>, $type, %options ) Inherited, see L =item $obj-EB($node|REF-XML|XML-STRING|$filename|$fh|$known) =item XML::Compile::WSDL11-EB($node|REF-XML|XML-STRING|$filename|$fh|$known) Inherited, see L =item $obj-EB(%options) =item XML::Compile::WSDL11-EB(%options) Inherited, see L =item $obj-EB($type|$name, %options) Inherited, see L =item $obj-EB