Ivan Wills > W3C-SOAP-v0.0.6 > W3C::SOAP::WSDL::Parser

Download:
W3C-SOAP-v0.0.6.tar.gz

Dependencies

Annotate this POD

CPAN RT

Open  1
View/Report Bugs
Module Version: v0.0.6   Source   Latest Release: W3C-SOAP-0.07

NAME ^

W3C::SOAP::WSDL::Parser - Module to create Moose objects from a WSDL

VERSION ^

This documentation refers to W3C::SOAP::WSDL::Parser version 0.0.6.

SYNOPSIS ^

   use W3C::SOAP::WSDL::Parser qw/load_wsdl?;

   # quick/simple usage
   # create a SOAP client
   $url = 'http://example.com/soap.wsdl';
   my $client = load_wsdl($url);
   my $result = $client->some_action(...);

   # Create a new object
   my $wsdl = W3C::SOAP::WSDL::Parser->new(
       location => $url,
       module   => 'MyApp::WSDL',
       lib      => './lib',
       template => Template->new(...),
       ns_module_map => {
           'http://example.com/xsd/namespace' => 'MyAPP::XSD::Example',
           'some.other.namespace'             => 'MyApp::XSD::SomeOther',
       },
   );

   # Write the generated WSDL module to disk
   $wsdl->write_modules();
   # would generate files
   #   lib/MyApp/WSDL.pm
   #   lib/MyApp/XSD/Example.pm
   #   lib/MyApp/XSD/SomeOther.pm

DESCRIPTION ^

This module parses a WSDL file so that it can produce a client to talk to the SOAP service.

SUBROUTINES/METHODS ^

EXPORTED SUBROUTINES

load_wsdl ($location)

Helper method that takes the supplied location and creates the dynamic WSDL client object.

CLASS METHODS

new (%args)

Create the new object new accepts the following arguments:

location

This is the location of the WSDL file, it may be a local file or a URL

module

This is the name of the module to be generated, it is required when writing the SOAP client to disk, the dynamic client generator creates a semi random namespace.

lib

The library directory where modules should be stored. only required when calling write_modules

template

The Template Toolkit object used for the generation of on disk modules

ns_module_map

The mapping of XSD namespaces to perl Modules.

OBJECT METHODS

$wsdl-write_modules ()>

Writes out a module that is a SOAP Client to interface with the contained WSDL document, also writes any referenced XSDs.

$wsdl-dynamic_classes ()>

Creates a dynamic SOAP client object to talk to the WSDL this object was created for

$wsdl-get_xsd ()>

Creates the W3C::SOAP::XSD::Parser object that represents the XSDs that are used by the specified WSDL file.

DIAGNOSTICS ^

CONFIGURATION AND ENVIRONMENT ^

DEPENDENCIES ^

INCOMPATIBILITIES ^

BUGS AND LIMITATIONS ^

There are no known bugs in this module.

Please report problems to Ivan Wills (ivan.wills@gmail.com).

Patches are welcome.

AUTHOR ^

Ivan Wills - (ivan.wills@gmail.com)

LICENSE AND COPYRIGHT ^

Copyright (c) 2012 Ivan Wills (14 Mullion Close, Hornsby Heights, NSW Australia 2077). All rights reserved.

This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See perlartistic. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

syntax highlighting: