[Xml-compile] wsdl soap call fails with missing data in response

Mark Overmeer mark at overmeer.net
Fri Jan 21 07:40:00 GMT 2011


* Paul B. Henson (henson at acm.org) [110121 03:03]:
> I think they publish the wsdl somewhere on their site, but I can't find
> it at the moment, so a copy is at:
>     http://www.csupomona.edu/~henson/tmp/cascade-http.wsdl
got it.

> error: data for element or block starting with `success' missing at
> {http://www.hannonhill.com/ws/ns/AssetOperationService}readResponse/readReturn
> 
> Honestly, xml gives me a headache :). I've spent a few hours working
> with it and am at a bit of a loss. I dumped the returned xml, listed
> at the bottom of this message, which to my eyes appears to contain
> "<success>true</success>".

XML is not the problem, but schemas are too verbose to be funny. Have
you tried     $wsdl->operation(...)->explain

> Any thoughts on what's going on? An error I'm making? A problem with
> their wsdl file or soap server?

XML does not only define types but also element order. With type extensions,
the additional elements should be added after the elements defined in the
base-type, but in your case it seems reversed.

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.

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:
> xsi:nil="true" /><assetFactoryContainer xsi:nil="true"
> /><connectorContainer xsi:nil="true" /><contentType xsi:nil="true"
> /><contentTypeContainer xsi:nil="true" /><dataDefinition xsi:nil="true"
> /><dataDefinitionContainer xsi:nil="true" /><databaseTransport

If you use a blunt, non-schema aware XML parser (maybe your python
attempt works that way) it will, of course, produce results.

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.
-- 
Regards,
               MarkOv

------------------------------------------------------------------------
       Mark Overmeer MSc                                MARKOV Solutions
       Mark at Overmeer.net                          solutions at overmeer.net
http://Mark.Overmeer.net                   http://solutions.overmeer.net



More information about the Xml-compile mailing list