[Xml-compile] wsdl soap call fails with missing data in response
Paul B. Henson
henson at acm.org
Mon Jan 24 21:48:59 GMT 2011
On Thu, Jan 20, 2011 at 11:40:00PM -0800, Mark Overmeer wrote:
> I have tried to find the rule back in the schema spec at
> http://www.w3.org/TR/xmlschema11-1
> but it is unreadable to me. Maybe you can find the rule back.
The closest I found was in section "3.4.2.1 Common Mapping Rules for
Complex Type Definitions", where it says
A sequence whose members are Assertions drawn from the following
sources, in order:
1 The {assertions} of the {base type definition}.
2 Assertions corresponding to all the <assert> element
information items among the [children] of <complexType>,
<restriction> and <extension>, if any, in document order.
but I'm not even sure if that's about the same stuff 8-/.
> When I look at the response message, it seems that the authors of the
> schema do not understand that there is a difference between implicit
> and explicit "undef". It makes me sad:
I must confess I don't either :(.
> With XML::Compile you could put a hook which invokes which use
> XML::LibXML::Simple or XML::Simple to parse trees which are
> non-conforming. See XML::Compile::Translate::Reader section "hooks
> executed as replacement" for an example (use $wsdl->addHook) Probably
> all messages will have the same problem, so need to be tricked.
Hmm, I tried:
-----
sub nonvalidating_xml {
my ($xml, $args, $path, $type, $r) = @_;
print "($xml, $args, $path, $type, $r)\n";
($type => XMLin($xml));
}
$wsdl->addHook(type => 'readReturn', replace => &nonvalidating_xml);
-----
which resulted in:
-----
Use of uninitialized value in concatenation (.) or string at ./test.pl
line 17.
Use of uninitialized value in concatenation (.) or string at ./test.pl
line 17.
Use of uninitialized value in concatenation (.) or string at ./test.pl
line 17.
Use of uninitialized value in concatenation (.) or string at ./test.pl
line 17.
Use of uninitialized value in concatenation (.) or string at ./test.pl
line 17.
(, , , , )
data source test.xml not found in ./
-----
Then for fun I tried an inline sub:
-----
$wsdl->addHook(type => 'readReturn', replace => sub { my ($xml, $args, $path, $type, $r) = @_;
print "($xml, $args, $path, $type, $r)\n";
($type => XMLin($xml)); });
-----
Which I didn't think would make a difference, but with this I just get
the original error:
-----
error: data for element or block starting with `success' missing at
{http://www.hannonhill.com/ws/ns/AssetOperationService}readResponse/readReturn
-----
Thanks for the help. I don't usually feel this clueless <sigh>.
--
Paul B. Henson | (909) 979-6361 | http://www.csupomona.edu/~henson/
Operating Systems and Network Analyst | henson at csupomona.edu
California State Polytechnic University | Pomona CA 91768
More information about the Xml-compile
mailing list