import SOAP-WSDL 2.00.01 from CPAN
git-cpan-module: SOAP-WSDL git-cpan-version: 2.00.01 git-cpan-authorid: MKUTTER git-cpan-file: authors/id/M/MK/MKUTTER/SOAP-WSDL-2.00.01.tar.gz
This commit is contained in:
1 parent
0cbf981665
commit
745ce925c1
111 files changed
+1106
-673
No files matched your search
@@ -15,8 +15,8 @@
|
||||
@parts = map {
|
||||
my $part = $_;
|
||||
(grep {
|
||||
my ($ns, $lname) = $def->expand( $_ );
|
||||
($lname eq $part->get_name)
|
||||
# my ($ns, $lname) = $def->expand( $_ );
|
||||
($_ eq $part->get_name)
|
||||
} @body_part_from
|
||||
)
|
||||
? do {
|
||||
|
||||
@@ -11,10 +11,11 @@
|
||||
my $def = $stash->{ definitions };
|
||||
my $type_prefix = $stash->{ type_prefix };
|
||||
my $element_prefix = $stash->{ element_prefix };
|
||||
my ($ns, $lname) = $def->expand( $item->get_part() );
|
||||
#my ($ns, $lname) = $def->expand( $item->get_part() );
|
||||
my $part_name = $item->get_part();
|
||||
my ($part) = grep {
|
||||
$_->get_name eq $lname
|
||||
&& $_->get_targetNamespace eq $ns } @{ $message->get_part( ) };
|
||||
$_->get_name eq $part_name
|
||||
} @{ $message->get_part( ) };
|
||||
my $part_class = do {
|
||||
my $name;
|
||||
($name = $part->get_element)
|
||||
|
||||
@@ -7,4 +7,3 @@
|
||||
port_op.get_documentation %]
|
||||
|
||||
$interface->[% operation.get_name %]([% INCLUDE Interface/POD/Message.tt %] );
|
||||
|
||||
@@ -36,7 +36,7 @@ sub START {
|
||||
}
|
||||
|
||||
sub handle {
|
||||
$transport_of{ ${ shift @_ } }->handle(@_);
|
||||
$transport_of{ ${ $_[0] } }->handle(@_[1..$#_]);
|
||||
}
|
||||
|
||||
1;
|
||||
@@ -102,4 +102,4 @@ implementing the SOAP Service methods listed below.
|
||||
|
||||
Generated by SOAP::WSDL on [% PERL %]print scalar localtime() [% END %]
|
||||
|
||||
=pod
|
||||
=cut
|
||||
@@ -3,15 +3,48 @@
|
||||
|
||||
[% head3 %] [% operation.get_name %]
|
||||
|
||||
[% type = definitions.find_portType( binding.expand( binding.get_type ) );
|
||||
port_op = type.find_operation( definitions.get_targetNamespace, operation.get_name );
|
||||
port_op.get_documentation %]
|
||||
[% type = definitions.find_portType( binding.expand( binding.get_type ) );
|
||||
port_op = '';
|
||||
FOREACH port_op = type.get_operation();
|
||||
IF (port_op.get_name == operation.get_name);
|
||||
LAST;
|
||||
END;
|
||||
END;
|
||||
|
||||
input_message_name = port_op.first_input.get_message();
|
||||
output_message_name = port_op.first_output.get_message();
|
||||
|
||||
input_message = definitions.find_message(port_op.first_input.expand(input_message_name));
|
||||
output_message = definitions.find_message(port_op.first_output.expand(output_message_name));
|
||||
|
||||
input_parts = input_message.get_part();
|
||||
output_parts = output_message.get_part();
|
||||
|
||||
# port_op.get_documentation
|
||||
%]
|
||||
|
||||
sub [% operation.get_name %] {
|
||||
my ($self, $body, $header) = @_;
|
||||
# body is a ??? object - sorry, POD not implemented yet
|
||||
# header is a ??? object - sorry, POD not implemented yet
|
||||
|
||||
[%
|
||||
IF (input_parts.size() > 1); -%]
|
||||
# body is a list ref of the following objects:
|
||||
# [
|
||||
# sorry - POD support not implemented yet
|
||||
# ]
|
||||
[% ELSE;
|
||||
input_element = definitions.first_types.find_element(input_parts.0.expand(input_parts.0.get_element));
|
||||
IF (input_element);
|
||||
class = XSD.create_xsd_name( input_element );
|
||||
ELSE;
|
||||
input_type = definitions.first_types.find_type(input_parts.0.expand(input_parts.0.get_type));
|
||||
class = XSD.create_xsd_name( input_type );
|
||||
END;
|
||||
-%]
|
||||
# body is a [% class %] object
|
||||
[%-
|
||||
END;
|
||||
%]
|
||||
# header is a ??? object - sorry, POD support not implemented yet
|
||||
# do something with body and header...
|
||||
|
||||
return [% INCLUDE Server/POD/Message.tt %]
|
||||
|
||||
@@ -15,7 +15,10 @@ get_/set_ methods:
|
||||
|
||||
=over
|
||||
|
||||
[% FOREACH element = complexType.get_attribute -%]
|
||||
[% FOREACH element = complexType.get_attribute;
|
||||
WHILE element.get_ref;
|
||||
element = definitions.first_types.find_attribute(element.expand( element.get_ref ));
|
||||
END; -%]
|
||||
=item * [% element.get_name %]
|
||||
|
||||
[%- IF (element.get_annotation && element.get_annotation.0.get_documentation) %]
|
||||
|
||||
@@ -3,18 +3,27 @@ package [% XSD.create_xmlattr_name(complexType) %];
|
||||
use base qw(SOAP::WSDL::XSD::Typelib::AttributeSet);
|
||||
|
||||
{ # BLOCK to scope variables
|
||||
[% FOREACH element = complexType.get_attribute %]
|
||||
[% FOREACH element = complexType.get_attribute;
|
||||
WHILE element.get_ref;
|
||||
element = definitions.first_types.find_attribute(element.expand( element.get_ref ));
|
||||
END; %]
|
||||
my %[% element.get_name %]_of :ATTR(:get<[% element.get_name %]>);
|
||||
[%- END %]
|
||||
|
||||
__PACKAGE__->_factory(
|
||||
[ qw(
|
||||
[%- FOREACH element = complexType.get_attribute %]
|
||||
[%- FOREACH element = complexType.get_attribute;
|
||||
WHILE element.get_ref;
|
||||
element = definitions.first_types.find_attribute(element.expand( element.get_ref ));
|
||||
END; %]
|
||||
[% element.get_name -%]
|
||||
[% END %]
|
||||
) ],
|
||||
{
|
||||
[% FOREACH element = complexType.get_attribute -%]
|
||||
[% FOREACH element = complexType.get_attribute;
|
||||
WHILE element.get_ref;
|
||||
element = definitions.first_types.find_attribute(element.expand( element.get_ref ));
|
||||
END; %]
|
||||
[% element.get_name %] => \%[% element.get_name %]_of,
|
||||
[% END -%]
|
||||
},
|
||||
@@ -26,10 +35,11 @@ __PACKAGE__->_factory(
|
||||
[% element.get_name %] => '[% XSD.create_xsd_name(element_type) %]',
|
||||
[%
|
||||
ELSIF (ref = element.get_ref);
|
||||
attribute = definitions.first_types.find_attribute( complexType.expand(ref) );
|
||||
# element_type = definitions.get_types.0.find_type(complexType.expand( attribute.get_type ));
|
||||
WHILE element.get_ref;
|
||||
element = definitions.first_types.find_attribute(element.expand( element.get_ref ));
|
||||
END;
|
||||
%]
|
||||
[% attribute.get_name %] => '[% XSD.create_xsd_name(attribute) %]',
|
||||
[% element.get_name %] => '[% XSD.create_xsd_name(element) %]',
|
||||
[% ELSIF (element.first_simpleType);
|
||||
THROW NOT_IMPLEMENTED , "Attributes with atomic simpleType definition are not implemented yet";
|
||||
atomic_types.${ element.get_name } = element.first_simpleType;
|
||||
|
||||
@@ -8,7 +8,10 @@ use warnings;
|
||||
sub get_xmlns { '[% element.get_targetNamespace %]' }
|
||||
|
||||
__PACKAGE__->__set_name('[% element.get_name %]');
|
||||
__PACKAGE__->__set_nillable([% element.get_nillable %]);
|
||||
__PACKAGE__->__set_nillable([% IF (element.get_nillable);
|
||||
IF (element.get_nillable != 'false'); %]1[% ELSE %]0[% END;
|
||||
END;
|
||||
%]);
|
||||
__PACKAGE__->__set_minOccurs([% element.get_minOccurs %]);
|
||||
__PACKAGE__->__set_maxOccurs([% element.get_maxOccurs %]);
|
||||
__PACKAGE__->__set_ref([% IF element.get_ref; %]'[% element.get_ref %]'[% END %]);
|
||||
|
||||
Reference in new issue
Block a user