NAME

SOAP::WSDL::XSD::Typelib::ComplexType - complexType base class

Subclassing

 package MyComplexType;
 use Class::Std::Storable
 use base qw(SOAP::WSDL::XSD::Typelib::ComplexType);
 
 __PACKAGE__->_factory(
    \@elements_from,
    \%attributes_of,
    \%classes_of 
 );

When subclassing, the following methods are created in the subclass:

new

Constructor. For your convenience, new will accept data for the object's properties in the following forms:

 hash refs
 1) of scalars
 2) of list refs
 3) of hash refs
 4) of objects
 5) mixed stuff of all of the above 

new() will set the data via the set_FOO methods to the object's element properties.

Data passed to new must comply to the object's structure or new() will complain. Objects passed must be of the expected type, or new() will complain, too.

Examples:

 my $obj = MyClass->new({ MyName => $value });  
 
 my $obj = MyClass->new({
     MyName => { 
         DeepName => $value 
     },
     MySecondName => $value,
 });
 
 my $obj = MyClass->new({
     MyName => [
        { DeepName => $value },
        { DeepName => $other_value },
     ],
     MySecondName => $object,
     MyThirdName => [ $object1, $object2 ],
 });

To be correct, SOAP::WSDL::XSD::Typelib::ComplexType will create a START method, not new() - but new() will be created from Class::Std::Storable and behave like stated above.

set_FOO

A mutator method for every element property.

For your convenience, the set_FOO methods will accept all kind of data you can think of (and all combinations of them) as input - with the exception of GLOBS and filehandles.

This means you may set element properties by passing

 a) objects
 b) scalars            
 c) list refs
 d) hash refs
 e) mixed stuff of all of the above 

Examples are similar to the examples provided for new() above.

Bugs and limitations

  • Incomplete API

    Not all variants of XML Schema ComplexType definitions are supported yet.

    Variants known to work are:

     sequence
     all
     complexContent containing sequence/all definitions
     
  • Thread safety

    SOAP::WSDL::XSD::Typelib::Builtin uses Class::Std::Storable which uses Class::Std. Class::Std is not thread safe, so SOAP::WSDL::XSD::Typelib::Builtin is neither.

  • XML Schema facets

    No facets are implemented yet.

AUTHOR

Replace whitespace by @ in e-mail address.

 Martin Kutter E<gt>martin.kutter fen-net.deE<lt>

COPYING

This library is free software, you may distribute/modify it under the same terms as perl itself