NAME

SOAP::WSDL::Manual - accessing WSDL based web services

Intro: Accessing a WSDL-based web service

Quick walk-through for the unpatient

  • Create WSDL bindings

    perl wsdl2perl.pl -b base_dir URL 
  • Look what has been generated

    Check the results of the generator. There should be one MyInterface/SERVICE_NAME.pm file per service.

  • Write script

    use MyInterface::SERVICE_NAME;
    my $service = MyInterface::SERVICE_NAME->new();
    
    my $result = $service->SERVICE_METHOD();
    die $result if not $result;
    
    print $result;

    perldoc MyInterface::SERVICE_NAME should give you some overview about the service's interface structure.

    The results of all calls to your service object's methods (except new) are objects based on SOAP::WSDL's XML schema implementation.

    These objects are false in boolean context, and serialize to XML when printed.

    To access the object's properties use get_NAME / set_NAME getter/setter methods whith NAME corresponding to the XML tag name.

  • Run script

Instrumenting web services with interface classes

SOAP::WSDL (starting from 2.00) instruments WSDL based web services with interface classes. This means that SOAP::WSDL features a code generator which creates one class for every web service you want to access.

Moreover, the data types from the WSDL definitions are also wrapped into classes and returned to the user as objects.

To find out which class a particular XML node should be, SOAP::WSDL uses typemaps. For every Web service, there's also a typemap created.

SEE ALSO

SOAP::WSDL::Manual::Glossary The meaning of all these words

SOAP::WSDL::Client Basic client for SOAP::WSDL based interfaces

SOAP::WSDL an interpreting WSDL based SOAP client

LICENSE

Copyright 2007 Martin Kutter.

This file is part of SOAP-WSDL. You may distribute/modify it under the same terms as perl itself

AUTHOR

Martin Kutter <martin.kutter fen-net.de>