[Xml-compile] Multiple problems with X::C::WSDL11

Robin V. robinsp at gmail.com
Sun Mar 14 12:32:27 GMT 2010


Diagnosis is really easier with error messages :). I managed to solve
this problem of unnamed fault, it was a foreign piece of wsdl with two
operations recently added that wasn't declaring fault in a conform
way.

Once this problem is corrected, the things seems to go much further as
I have a lot of information messages like (excerpt):

INFO: schema compile WRITER for {http://schemas.xmlsoap.org/soap/envelope/}Fault
INFO: parsing XML from file
C:\strawberry\perl\site\lib\XML\Compile\SOAP11\xsd\soap-encoding.xsd
INFO: cache parsed file soap-encoding.xsd-1265654647-18427
INFO: add stub handler for operation `Subscribe'
INFO: using preparsed XML node <{http://schemas.xmlsoap.org/wsdl/}definitions>
INFO: rewrote key {http://schemas.xmlsoap.org/wsdl/}service to wsdl_service
INFO: rewrote key {http://schemas.xmlsoap.org/wsdl/}part to wsdl_part

But another problem happens, just after these information messages:

INFO: register prefix SOAP-ENC for http://schemas.xmlsoap.org/soap/encoding/
INFO: create writer for {http://schemas.xmlsoap.org/soap/envelope/}Fault
INFO: schema compile WRITER for {http://schemas.xmlsoap.org/soap/envelope/}Fault
INFO: cache parsed scalar with checksum 473ecb31cc1a15c614d561cd1d97d861
INFO: parsing XML from string SCALAR(0x2aad56c)
INFO: schema compile WRITER for SubscriptionAnswerInfo

This error arise:
cannot find type
{http://www.siri.org.uk/siri}ResponseEndpointStructure at
SubscriptionAnswerInfo
 at C:/strawberry/perl/site/lib/XML/Compile/Translate.pm line 290
XML::Compile::Translate::typeByName(XML::Compile::Translate::Writer=HASH(0x3882cfc),
XML::Compile::Iterator=HASH(0x3882f7c),
"{http://www.siri.org.uk/siri}ResponseEndpointStructure") at
C:/strawberry/perl/site/lib/XML/Compile/Translate.pm line 583
XML::Compile::Translate::element(XML::Compile::Translate::Writer=HASH(0x3882cfc),
XML::Compile::Iterator=HASH(0x3882f7c)) at
C:/strawberry/perl/site/lib/XML/Compile/Translate.pm line 247
XML::Compile::Translate::topLevel(XML::Compile::Translate::Writer=HASH(0x3882cfc),
"SubscriptionAnswerInfo", "SubscriptionAnswerInfo") at
C:/strawberry/perl/site/lib/XML/Compile/Translate.pm line 104
XML::Compile::Translate::compile(XML::Compile::Translate::Writer=HASH(0x3882cfc),
"SubscriptionAnswerInfo", "sloppy_integers", 0, "check_values", 1,
"ignore_unused_tags", undef, [36 more]) at
C:/strawberry/perl/site/lib/XML/Compile/Schema.pm line 246
XML::Compile::Schema::compile(XML::Compile::WSDL11=HASH(0x52abac),
"WRITER", "SubscriptionAnswerInfo", "body", HASH(0x38625bc), "kind",
"request-response", "callback", [9 more]) at
C:/strawberry/perl/site/lib/XML/Compile/Cache.pm line 333
XML::Compile::Cache::compile(XML::Compile::WSDL11=HASH(0x52abac),
"WRITER", "SubscriptionAnswerInfo", "style", "rpc", "faults",
HASH(0x3120454), "hooks", [9 more]) at
C:/strawberry/perl/site/lib/XML/Compile/Schema.pm line 293
XML::Compile::Schema::compileType(XML::Compile::WSDL11=HASH(0x52abac),
"WRITER", "{http://www.siri.org.uk/siri}ResponseEndpointStructure",
"body", HASH(0x38625bc), "kind", "request-response", "callback", [11
more]) at C:/strawberry/perl/site/lib/XML/Compile/SOAP.pm line 316
XML::Compile::SOAP::_writer_body_type(XML::Compile::SOAP11::Server=HASH(0x386222c),
HASH(0x310e054), HASH(0x36f9804)) at
C:/strawberry/perl/site/lib/XML/Compile/SOAP.pm line 274
XML::Compile::SOAP::_writer_body(XML::Compile::SOAP11::Server=HASH(0x386222c),
HASH(0x310e054)) at C:/strawberry/perl/site/lib/XML/Compile/SOAP.pm
line 101
XML::Compile::SOAP::_sender(XML::Compile::SOAP11::Server=HASH(0x386222c),
"body", HASH(0x38625bc), "kind", "request-response", "callback",
CODE(0x38622ec), "style", [3 more]) at
C:/strawberry/perl/site/lib/XML/Compile/SOAP11.pm line 148
XML::Compile::SOAP11::_sender(XML::Compile::SOAP11::Server=HASH(0x386222c),
"body", HASH(0x38625bc), "faults", HASH(0x3120454), "kind",
"request-response", "callback", [3 more]) at
C:/strawberry/perl/site/lib/XML/Compile/SOAP11/Operation.pm line 212
XML::Compile::SOAP11::Operation::compileHandler(XML::Compile::SOAP11::Operation=HASH(0x386286c),
"callback", CODE(0x38622ec)) at
C:/strawberry/perl/site/lib/XML/Compile/SOAP/Daemon.pm line 236
XML::Compile::SOAP::Daemon::operationsFromWSDL(XML::Compile::SOAP::HTTPDaemon=HASH(0x353d1a4),
XML::Compile::WSDL11=HASH(0x52abac), "callbacks", HASH(0x385e08c)) at
J:\XXX\test-xml-compile-siri-server.pl line 59

I checked the wsdl and its dependencies, the so-called missing type
{http://www.siri.org.uk/siri}ResponseEndpointStructure is defined in
./v1.3/siri/siri_requests-v1.2.xsd (line 639).
This xsd is included by ./v1.3/siri/siri_common-v1.3.xsd which is
included by ./v1.3/siri.xsd, which in turn is referenced in the wsdl.

To be sure of the correctness of these files, I tried to generate code
from this wsdl with wsimport (java6, the most demanding parser I've
met so far) and everything went fine.

This time, I think I can not go farther. Do you think it could be a
problem with xml::compile and multiple includes?

I'm sending you the corrected wsdl and its dependencies if you have a
moment to look at it.

Robin



More information about the Xml-compile mailing list