Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Continuing with the implementation of fault handling

  • Loading branch information...
commit cdeb47d1ca17a7c9f0dfa0652dfe4654b1750ba2 1 parent 72b2a6f
@ivanwills ivanwills authored
Showing with 13 additions and 0 deletions.
  1. +5 −0 lib/W3C/SOAP/WSDL/Meta/Method.pm
  2. +8 −0 lib/W3C/SOAP/WSDL/Parser.pm
View
5 lib/W3C/SOAP/WSDL/Meta/Method.pm
@@ -48,6 +48,11 @@ has out_attribute => (
isa => 'Str',
predicate => 'has_out_attribute',
);
+has faults => (
+ is => 'rw',
+ isa => 'ArrayRef[HashRef]',
+ predicate => 'has_faults',
+);
has security => (
is => 'rw',
isa => 'Str',
View
8 lib/W3C/SOAP/WSDL/Parser.pm
@@ -170,6 +170,13 @@ sub dynamic_classes {
for my $operation (@{ $port->binding->operations }) {
my $in_element = eval { $operation->port_type->inputs->[0]->message->element };
my $out_element = eval { $operation->port_type->outputs->[0]->message->element };
+ my @faults = eval {
+ map {{
+ class => $_->message->element->module,
+ name => $_->message->element->perl_name,
+ }}
+ @{ $operation->port_type->faults }
+ };
$method{ $operation->perl_name } = W3C::SOAP::WSDL::Meta::Method->wrap(
body => sub { shift->_request($operation->perl_name => @_) },
@@ -180,6 +187,7 @@ sub dynamic_classes {
$in_element ? ( in_attribute => $in_element->perl_name ) : (),
$out_element ? ( out_class => $out_element->module ) : (),
$out_element ? ( out_attribute => $out_element->perl_name ) : (),
+ @faults ? ( faults => \@faults ) : (),
);
if ( $ENV{W3C_SOAP_NAME_STYLE} eq 'both' && $operation->name ne $operation->perl_name ) {
Please sign in to comment.
Something went wrong with that request. Please try again.