.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.42) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "SOAP::WSDL 3pm" .TH SOAP::WSDL 3pm "2022-10-14" "perl v5.34.0" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" SOAP::WSDL \- SOAP with WSDL support .SH "NOTICE" .IX Header "NOTICE" This module is \fBnot\fR recommended for new application development. Please use XML::Compile::SOAP or SOAP::Lite instead if possible. .PP This module has a large number of known bugs and is not being actively developed. This 3.0 release is intended to update the module to pass tests on newer Perls. This is a service to existing applications already dependent on this module. .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 3 \& my $soap = SOAP::WSDL\->new( \& wsdl => \*(Aqfile://bla.wsdl\*(Aq, \& ); \& \& my $result = $soap\->call(\*(AqMyMethod\*(Aq, %data); .Ve .SH "DESCRIPTION" .IX Header "DESCRIPTION" For creating Perl classes instrumenting a web service with a \s-1WSDL\s0 definition, read SOAP::WSDL::Manual. .PP For using an interpreting (thus slow and somewhat troublesome) \s-1WSDL\s0 based \&\s-1SOAP\s0 client, which mimics SOAP::Lite's \s-1API,\s0 read on. .PP Creating Interface classes is the recommended usage. .PP Did I say you should create interface classes following the steps in SOAP::WSDL::Manual? .PP If you're migrating from earlier versions of \s-1SOAP::WSDL,\s0 you should read the \&\s-1MIGRATING\s0 documentation. .PP The stuff below is for users of the 1.2x \s-1SOAP::WSDL\s0 series. All others, please refer to SOAP::WSDL::Manual .PP \&\s-1SOAP::WSDL\s0 provides easy access to Web Services with \s-1WSDL\s0 descriptions. .PP The \s-1WSDL\s0 is parsed and stored in memory. .PP Your data is serialized according to the rules in the \s-1WSDL.\s0 .PP The only transport mechanisms currently supported are http and https. .SH "METHODS" .IX Header "METHODS" .SS "new" .IX Subsection "new" Constructor. All parameters passed are passed to the corresponding methods. .SS "call" .IX Subsection "call" Performs a \s-1SOAP\s0 call. The result is either an object tree (with outputtree), a hash reference (with outputhash), plain \s-1XML\s0 (with outputxml) or a \s-1SOAP::SOM\s0 object (with neither of the above set). .PP \&\fBcall()\fR can be called in different ways: .IP "\(bu" 4 Old-style idiom .Sp .Vb 1 \& my $result = $soap\->call(\*(Aqmethod\*(Aq, %data); .Ve .Sp Does not support \s-1SOAP\s0 header data. .IP "\(bu" 4 New-style idiom .Sp .Vb 1 \& my $result = $soap\->call(\*(Aqmethod\*(Aq, $body_ref, $header_ref ); .Ve .Sp Does support \s-1SOAP\s0 header data. \f(CW$body_ref\fR and \f(CW$header\fR ref may either be hash refs or SOAP::WSDL::XSD::Typelib::* derived objects. .Sp Result headers are accessible via the result \s-1SOAP::SOM\s0 object. .Sp If outputtree or outputhash are set, you may also use the following to access response header data: .Sp .Vb 1 \& my ($body, $header) = $soap\->call(\*(Aqmethod\*(Aq, $body_ref, $header_ref ); .Ve .SS "wsdlinit" .IX Subsection "wsdlinit" Reads the \s-1WSDL\s0 file and initializes \s-1SOAP::WSDL\s0 for working with it. .PP Is called automatically from \fBcall()\fR if not called directly before. .PP .Vb 3 \& servicename \& portname \& call .Ve .PP You may set servicename and portname by passing them as attributes to wsdlinit: .PP .Vb 4 \& $soap\->wsdlinit( \& servicename => \*(AqMyService\*(Aq, \& portname => \*(AqMyPort\*(Aq, \& ); .Ve .SH "CONFIGURATION METHODS" .IX Header "CONFIGURATION METHODS" .SS "outputtree" .IX Subsection "outputtree" When outputtree is set, \s-1SOAP::WSDL\s0 will return an object tree instead of a \&\s-1SOAP::SOM\s0 object. .PP You have to specify a class_resolver for this to work. See class_resolver .SS "class_resolver" .IX Subsection "class_resolver" Set the class resolver class (or object). .PP Class resolvers must implement the method get_class which has to return the name of the class name for deserializing a \s-1XML\s0 node at the current XPath location. .PP Class resolvers are typically generated by using the generate_typemap method of a SOAP::WSDL::Generator subclass. .PP Example: .PP \&\s-1XML\s0 structure (\s-1SOAP\s0 body content): .PP .Vb 4 \& \& Smith \& John \& .Ve .PP Class resolver .PP .Vb 6 \& package MyResolver; \& my %typemap = ( \& \*(AqPerson\*(Aq => \*(AqMyPersonClass\*(Aq, \& \*(AqPerson/Name\*(Aq => \*(AqSOAP::WSDL::XSD::Typelib::Builtin::string\*(Aq, \& \*(AqPerson/FirstName\*(Aq => \*(AqSOAP::WSDL::XSD::Typelib::Builtin::string\*(Aq, \& ); \& \& sub get_class { return $typemap{ $_[1] } }; \& 1; .Ve .PP You'll need a MyPersonClass module in your search path for this to work \- see SOAP::WSDL::XSD::ComplexType on how to build / generate one. .SS "servicename" .IX Subsection "servicename" .Vb 1 \& $soap\->servicename(\*(AqName\*(Aq); .Ve .PP Sets the service to operate on. If no service is set via servicename, the first service found is used. .PP Returns the soap object, so you can chain calls like .PP .Vb 1 \& $soap\->servicename\->(\*(AqName\*(Aq)\->portname(\*(AqPort\*(Aq); .Ve .SS "portname" .IX Subsection "portname" .Vb 1 \& $soap\->portname(\*(AqName\*(Aq); .Ve .PP Sets the port to operate on. If no port is set via portname, the first port found is used. .PP Returns the soap object, so you can chain calls like .PP .Vb 1 \& $soap\->portname(\*(AqPort\*(Aq)\->call(\*(AqMyMethod\*(Aq, %data); .Ve .SS "no_dispatch" .IX Subsection "no_dispatch" When set, \fBcall()\fR returns the plain request \s-1XML\s0 instead of dispatching the \&\s-1SOAP\s0 call to the \s-1SOAP\s0 service. Handy for testing/debugging. .SH "ACCESS TO SOAP::WSDL's internals" .IX Header "ACCESS TO SOAP::WSDL's internals" .SS "get_client / set_client" .IX Subsection "get_client / set_client" Returns the \s-1SOAP\s0 client implementation used (normally a SOAP::WSDL::Client object). .SH "EXAMPLES" .IX Header "EXAMPLES" See the examples/ directory. .SH "Differences to previous versions" .IX Header "Differences to previous versions" .IP "\(bu" 4 \&\s-1WSDL\s0 handling .Sp \&\s-1SOAP::WSDL 2\s0 is a complete rewrite. While \s-1SOAP::WSDL 1\s0.x attempted to process the \s-1WSDL\s0 file on the fly by using XPath queries, \s-1SOAP:WSDL 2\s0 uses a Expat handler for parsing the \s-1WSDL\s0 and building up a object tree representing it's content. .Sp The object tree has two main functions: It knows how to serialize data passed as hash ref, and how to render the \s-1WSDL\s0 elements found into perl classes. .Sp Yup you're right; there's a builtin code generation facility. Read SOAP::WSDL::Manual for using it. .IP "\(bu" 4 no_dispatch .Sp \&\fBcall()\fR with no_dispatch set to true now returns the complete \s-1SOAP\s0 request envelope, not only the body's content. .IP "\(bu" 4 outputxml .Sp \&\fBcall()\fR with outputxml set to true now returns the complete \s-1SOAP\s0 response envelope, not only the body's content. .IP "\(bu" 4 servicename/portname .Sp Both servicename and portname can only be called \fBafter\fR calling \fBwsdlinit()\fR. .Sp You may pass the servicename and portname as attributes to wsdlinit, though. .SH "Differences to previous versions" .IX Header "Differences to previous versions" The following functionality is no longer supported: .SS "Operation overloading" .IX Subsection "Operation overloading" The \s-1SOAP\s0 standard allows operation overloading \- that is, you may specify \&\s-1SOAP\s0 operations with more than one message. The client/server than can choose which message to send. This \s-1SOAP\s0 feature is usually used similar to the use of methods with different argument lists in \*(C+. .PP Operation overloading is no longer supported. The WS-I Basic profile does not operation overloading. The same functionality as operation overloading can be obtained by using a choice declaration in the \s-1XML\s0 Schema. .SS "readable" .IX Subsection "readable" Readable has no effect any more. If you need readable debug output, copy the \&\s-1SOAP\s0 message to your favorite \s-1XML\s0 editor and run the source format command. Outputting readable \s-1XML\s0 requires lots of programming for little use: The resulting XMl is still quite unreadable. .SS "on_action" .IX Subsection "on_action" Setting on_action is not required any more, the appropriate value is automatically taken from the \s-1WSDL.\s0 on_action is a no-op, and is just here for compatibility issues. .SH "Differences to SOAP::Lite" .IX Header "Differences to SOAP::Lite" .SS "readable" .IX Subsection "readable" readable is a no-op in \s-1SOAP::WSDL.\s0 Actually, the \s-1XML\s0 output from SOAP::Lite is hardly readable, either with readable switched on. .PP If you need readable \s-1XML\s0 messages, I suggest using your favorite \s-1XML\s0 editor for displaying and formatting. .SS "Message style/encoding" .IX Subsection "Message style/encoding" While SOAP::Lite supports rpc/encoded style/encoding only, \s-1SOAP::WSDL\s0 currently supports document/literal style/encoding. .SS "autotype / type information" .IX Subsection "autotype / type information" SOAP::Lite defaults to transmitting \s-1XML\s0 type information by default, where \&\s-1SOAP::WSDL\s0 defaults to leaving it out. .PP \&\fBautotype\fR\|(1) might even be broken in \s-1SOAP::WSDL\s0 \- it's not well-tested, yet. .SS "Output formats" .IX Subsection "Output formats" In contrast to SOAP::Lite, \s-1SOAP::WSDL\s0 supports the following output formats: .IP "\(bu" 4 \&\s-1SOAP::SOM\s0 objects. .Sp This is the default. SOAP::Lite is required for outputting \s-1SOAP::SOM\s0 objects. .IP "\(bu" 4 Object trees. .Sp This is the recommended output format. You need a class resolver (typemap) for outputting object trees. See class_resolver above. .IP "\(bu" 4 Hash refs .Sp This is for convenience: A single hash ref containing the content of the \&\s-1SOAP\s0 body. .IP "\(bu" 4 xml .Sp See below. .SS "outputxml" .IX Subsection "outputxml" SOAP::Lite returns only the content of the \s-1SOAP\s0 body when outputxml is set to true. \s-1SOAP::WSDL\s0 returns the complete \s-1XML\s0 response. .SS "Auto-Dispatching" .IX Subsection "Auto-Dispatching" \&\s-1SOAP::WSDL\s0 does \fBdoes not\fR support auto-dispatching. .PP This is on purpose: You may easily create interface classes by using SOAP::WSDL::Client and implementing something like .PP .Vb 4 \& sub mySoapMethod { \& my $self = shift; \& $soap_wsdl_client\->call( mySoapMethod, @_); \& } .Ve .PP You may even do this in a class factory \- see wsdl2perl for creating such interfaces. .SS "Debugging / Tracing" .IX Subsection "Debugging / Tracing" While SOAP::Lite features a global tracing facility, \s-1SOAP::WSDL\s0 allows one to switch tracing on/of on a per-object base. .PP This has to be done in the \s-1SOAP\s0 client used by \s-1SOAP::WSDL\s0 \- see get_client for an example and SOAP::WSDL::Client for details. .SH "BUGS AND LIMITATIONS" .IX Header "BUGS AND LIMITATIONS" The bug tracker is at . .PP This module is in legacy maintenance mode. Only show stopper bugs are being fixed, until/unless someone wishes to resume active development on it. Scott Walters, \f(CW\*(C`scott@slowass.net\*(C'\fR has obtained co-mainter from the \s-1CPAN\s0 admins for the purpose of applying existing fixes people have submit to the \s-1RT\s0 tracker, and to apply other fixes as needed to get the module to install and run on newer Perls. Non show-stopper bugs reports without fixes will be added to this list of limitations. Of course, fixes for these and other bugs are welcome. Scott does not get email from rt.cpan.org, so please drop an email to him at \f(CW\*(C`scott@slowass.net\*(C'\fR if you open a ticket there. .IP "\(bu" 4 Breaks the idiom \f(CW\*(C`$package\->can("SUPER::method")\*(C'\fR in your code .Sp If you redefine \f(CW\*(C`UNIVERSAL::can()\*(C'\fR, and someone tries to do \f(CW\*(C`$package\->can("SUPER::method")\*(C'\fR, it'll look at your packages \f(CW@ISA\fR, not theirs. This module does precicely that, by way of its dependency on \f(CW\*(C`Class::Std::Fast\*(C'\fR. .IP "\(bu" 4 \&\f(CW$obj\fR == undef does not work in perl 5.8.6 and perl 5.8.7 .Sp Due to some strange behaviour in perl 5.8.6 and perl 5.8.7, stringification overloading is not triggered during comparison with undef. .Sp While this is probably harmless in most cases, it's important to know that you need to do .Sp .Vb 1 \& defined( $obj\->get_value() ) .Ve .Sp to check for undef values in simpleType objects. .IP "\(bu" 4 perl 5.8.0 or higher required .Sp \&\s-1SOAP::WSDL\s0 needs perl 5.8.0 or higher. This is due to a bug in perls before \- see http://aspn.activestate.com/ASPN/Mail/Message/perl5\-porters/929746 for details. .IP "\(bu" 4 Apache \s-1SOAP\s0 datatypes are not supported .Sp You can't use \s-1SOAP::WSDL\s0 with Apache \s-1SOAP\s0 datatypes like map. .IP "\(bu" 4 Incomplete \s-1XML\s0 Schema definitions support .Sp This section describes the limitations of \s-1SOAP::WSDL,\s0 that is the interpreting \&\s-1SOAP\s0 client. For limitations of wsdl2perl generated \&\s-1SOAP\s0 clients, see SOAP::WSDL::Manual::XSD. .Sp \&\s-1XML\s0 Schema attribute definitions are not supported in interpreting mode. .Sp The following \s-1XML\s0 Schema definitions varieties are not supported in interpreting mod: .Sp .Vb 2 \& group \& simpleContent .Ve .Sp The following \s-1XML\s0 Schema definition content model is only partially supported in interpreting mode: .Sp .Vb 1 \& complexContent \- only restriction variety supported .Ve .Sp See SOAP::WSDL::Manual::XSD for details. .IP "\(bu" 4 Serialization of hash refs does not work for ambiguous values .Sp If you have list elements with multiple occurrences allowed, \s-1SOAP::WSDL\s0 has no means of finding out which variant you meant. .Sp Passing in item => [1,2,3] could serialize to .Sp .Vb 2 \& 1 23 \& 12 3 .Ve .Sp Ambiguous data can be avoided by providing data as objects. .IP "\(bu" 4 \&\s-1XML\s0 Schema facets .Sp Almost no \s-1XML\s0 schema facets are implemented. The only facets currently implemented are: .Sp .Vb 2 \& fixed \& default .Ve .Sp The following facets have no influence: .Sp .Vb 8 \& minLength \& maxLength \& minInclusive \& maxInclusive \& minExclusive \& maxExclusive \& pattern \& enumeration .Ve .SH "SEE ALSO" .IX Header "SEE ALSO" .SS "Related projects" .IX Subsection "Related projects" .IP "\(bu" 4 SOAP::Lite .Sp Full featured SOAP-library, little \s-1WSDL\s0 support. Supports rpc-encoded style only. Many protocols supported. .IP "\(bu" 4 XML::Compile::SOAP .Sp Creates parser/generator functions for \s-1SOAP\s0 messages. Includes \s-1SOAP\s0 Client and Server implementations. Can validate \s-1XML\s0 messages. .Sp You might want to give it a try, especially if you need to adhere very closely to the \s-1XML\s0 Schema / \s-1WSDL\s0 specs. .SS "Sources of documentation" .IX Subsection "Sources of documentation" .IP "\(bu" 4 \&\s-1SOAP::WSDL\s0 homepage at sourceforge.net .Sp .IP "\(bu" 4 \&\s-1SOAP::WSDL\s0 forum at CPAN::Forum .Sp .SH "ACKNOWLEDGMENTS" .IX Header "ACKNOWLEDGMENTS" Scott Walters wrote: .PP This code incorporates fixes contributed by \f(CW\*(C`NORDIC@cpan.org\*(C'\fR, \f(CW\*(C`dam@cpan.org\*(C'\fR, \f(CW\*(C`sven.schober@uni\-ulm.de\*(C'\fR, myself, and others. .PP Martin Kutter wrote: .PP There are many people out there who fostered \s-1SOAP::WSDL\s0's development. I would like to thank them all (and apologize to all those I have forgotten). .PP Giovanni S. Fois wrote a improved version of \s-1SOAP::WSDL\s0 (which eventually became v1.23) .PP David Bussenschutt, Damian A. Martinez Gelabert, Dennis S. Hennen, Dan Horne, Peter Orvos, Mark Overmeer, Jon Robens, Isidro Vila Verde and Glenn Wood (in alphabetical order) spotted bugs and/or suggested improvements in the 1.2x releases. .PP \&\s-1JT\s0 Justman and Noah Robin provided early feedback and bug reports for the 2.xx pre-releases. .PP Adam Kennedy checked and suggested improvements on metadata and dependencies in the 2.xx pre-releases. .PP Andreas 'ac0v' Specht constantly asked for better performance. .PP Matt S. Trout encouraged me \*(L"to get a non-dev-release out.\*(R" .PP \&\s-1CPAN\s0 Testers provided most valuable (automated) feedback. Thanks a lot. .PP Numerous people sent me their real-world \s-1WSDL\s0 files and error reports for testing. Thank you. .PP Noah Robin contributed lots of documentation fixes, and the mod_perl server, and eventually joined \s-1SOAP::WSDL\s0's development. Thanks. .PP Mark Overmeer wrote XML::Compile::SOAP \- competition is good for business. .PP Paul Kulchenko and Byrne Reese wrote and maintained SOAP::Lite and thus provided a base (and counterpart) for \s-1SOAP::WSDL.\s0 .SH "LICENSE AND COPYRIGHT" .IX Header "LICENSE AND COPYRIGHT" Copyright 2004\-2008 Martin Kutter. .PP This file is part of SOAP-WSDL. You may distribute/modify it under the same terms as perl itself .SH "AUTHOR" .IX Header "AUTHOR" Scott Walters 2014 .PP Martin Kutter 2004\-2008 .SH "REPOSITORY INFORMATION" .IX Header "REPOSITORY INFORMATION" .Vb 1 \& https://github.com/scrottie/SOAP\-WSDL .Ve