Subject: | missing handling <element ref="..."> |
I sent you this by e-mail directly, but didn't get a response. Trying it
again:
--- 8< ---
I try to use your SOAP::WDSL module, but stumble on a problem. Maybe you
can help me, I'm not a SOAP module specialist (yet)
My WSDL file contains a <element ref="abc:type">
but when do a call(), this descends in the definition, failing on the above element. Looking at SOAP::WDSL::encode(), around line 300, I miss the treatment of the "ref" parameter. Am I right?
I have added this code to encode(), and this may be correct, maybe not.
For now, it looks to me that it is working... I'll keep you informed.
+ if(my $ref = $part->findvalue('@ref')->value)
+ { my $xpath = $self->_wsdl_xpath;
+ my ($ns, $elem) = $ref =~ m/(?:(.*?)\:)?(.*)/;
+ $ns ||= 'tns';
+ my $wsdl_ns = $self->_wsdl_wsdlns;
+ my $path= qq(/${wsdl_ns}definitions/${wsdl_ns}types/)
+ .qq($schemaNS:schema/$schemaNS:element[\@name='$elem']);
+
+ my $real = $self->_wsdl_xpath->find($path)->shift;
+ return $self->encode($real, $data);
+ }
# TBD: Caching hook ?