[Xml-compile] XML::Compile fails with import url

Tapio.Niva at tieto.com Tapio.Niva at tieto.com
Mon May 10 07:13:25 GMT 2010


Hello,
thanks for help.
After correcting the ampersand error, the WSDL processing proceeded a bit forward, but with following error :
"error: cannot find element or attribute `{http://notification.sdk.nms.ov.hp.com/nms-sdk-notify}incidentNotification'
 at /usr/lib/perl5/site_perl/5.8.5/XML/Compile/Translate.pm line 196"

( the whole XML::Compile output is in attachment )

Something wrong in the wsdl again ?

BR, Tapio

-----Original Message-----
From: Mark Overmeer [mailto:solutions at overmeer.net] 
Sent: 7. toukokuuta 2010 16:45
To: Niva Tapio
Cc: XML-Compile
Subject: Re: [Xml-compile] XML::Compile fails with import url

* Tapio.Niva at tieto.com (Tapio.Niva at tieto.com) [100507 11:08]:
> I tried to compile & use the following WSDL, but failed :

> subscribe.wsdl:2: parser error : EntityRef: expecting ';'
> location="http://sheridan.sysmgmt.local//nms-sdk-notify/subscribe?wsdl&resource
> ^

> Obviously something goes wrong when XML::Compile tries to parse the import and
> include statements, which refer to an url instead of separate file.
> Any ideas how to solve this ?

The error message is not produced in XML::Compile, but reported by
libxml2.  The WSDL file is invalid XML. The URL in "location" is not
escaped correctly: an "&" must be encoded as "&"  As used here,
the libxml2 parser expects to read "&resource;", with a missing ";"

It is a very common mistake in XML to forget to encode "&"
-- 
Regards,
               MarkOv

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

-------------- next part --------------
trace: register prefix wsdl for 'http://schemas.xmlsoap.org/wsdl/'
trace: register prefix soap for 'http://schemas.xmlsoap.org/wsdl/soap/'
trace: register prefix http for 'http://schemas.xmlsoap.org/wsdl/http/'
trace: cache parsed file wsdl.xsd-1265654647-11308
trace: parsing XML from file /usr/lib/perl5/site_perl/5.8.5/XML/Compile/WSDL11/xsd/wsdl.xsd
trace: initialize SOAP11 operations for WSDL11
trace: cache parsed file wsdl-soap.xsd-1265654648-5761
trace: parsing XML from file /usr/lib/perl5/site_perl/5.8.5/XML/Compile/WSDL11/xsd/wsdl-soap.xsd
trace: declare {http://schemas.xmlsoap.org/wsdl/soap/}address
trace: declare {http://schemas.xmlsoap.org/wsdl/soap/}operation
trace: declare {http://schemas.xmlsoap.org/wsdl/soap/}binding
trace: declare {http://schemas.xmlsoap.org/wsdl/soap/}body
trace: declare {http://schemas.xmlsoap.org/wsdl/soap/}header
trace: declare {http://schemas.xmlsoap.org/wsdl/soap/}fault
trace: initialize SOAPHTTP transporter for WSDL11
trace: cache parsed file wsdl-http.xsd-1265654648-2578
trace: parsing XML from file /usr/lib/perl5/site_perl/5.8.5/XML/Compile/WSDL11/xsd/wsdl-http.xsd
trace: declare {http://schemas.xmlsoap.org/wsdl/}definitions
trace: parsing XML from file subscribe.wsdl
trace: using preparsed XML node <{http://schemas.xmlsoap.org/wsdl/}definitions>
trace: register prefix tns for 'http://notification.sdk.nms.ov.hp.com/nms-sdk-notify'
trace: register prefix wsa10 for 'http://www.w3.org/2005/08/addressing'
trace: register prefix wse for 'http://schemas.xmlsoap.org/ws/2004/08/eventing'
trace: register prefix xs for 'http://www.w3.org/2001/XMLSchema'
trace: schema compile READER for {http://schemas.xmlsoap.org/wsdl/}definitions
trace: rewrote key {http://schemas.xmlsoap.org/wsdl/}documentation to wsdl_documentation
trace: rewrote key {http://schemas.xmlsoap.org/wsdl/}documentation to wsdl_documentation
trace: rewrote key {http://schemas.xmlsoap.org/wsdl/}documentation to wsdl_documentation
trace: rewrote key {http://schemas.xmlsoap.org/wsdl/}documentation to wsdl_documentation
trace: rewrote key {http://schemas.xmlsoap.org/wsdl/}import to wsdl_import
trace: rewrote key {http://schemas.xmlsoap.org/wsdl/}documentation to wsdl_documentation
trace: rewrote key {http://schemas.xmlsoap.org/wsdl/}documentation to wsdl_documentation
trace: rewrote key {http://schemas.xmlsoap.org/wsdl/}types to wsdl_types
trace: rewrote key {http://schemas.xmlsoap.org/wsdl/}documentation to wsdl_documentation
trace: rewrote key {http://schemas.xmlsoap.org/wsdl/}documentation to wsdl_documentation
trace: rewrote key {http://schemas.xmlsoap.org/wsdl/}documentation to wsdl_documentation
trace: rewrote key {http://schemas.xmlsoap.org/wsdl/}documentation to wsdl_documentation
trace: rewrote key {http://schemas.xmlsoap.org/wsdl/}part to wsdl_part
trace: rewrote key {http://schemas.xmlsoap.org/wsdl/}part to wsdl_part
trace: rewrote key {http://schemas.xmlsoap.org/wsdl/}message to wsdl_message
trace: rewrote key {http://schemas.xmlsoap.org/wsdl/}documentation to wsdl_documentation
trace: rewrote key {http://schemas.xmlsoap.org/wsdl/}documentation to wsdl_documentation
trace: rewrote key {http://schemas.xmlsoap.org/wsdl/}documentation to wsdl_documentation
trace: rewrote key {http://schemas.xmlsoap.org/wsdl/}documentation to wsdl_documentation
trace: rewrote key {http://schemas.xmlsoap.org/wsdl/}documentation to wsdl_documentation
trace: rewrote key {http://schemas.xmlsoap.org/wsdl/}documentation to wsdl_documentation
trace: rewrote key {http://schemas.xmlsoap.org/wsdl/}input to wsdl_input
trace: rewrote key {http://schemas.xmlsoap.org/wsdl/}documentation to wsdl_documentation
trace: rewrote key {http://schemas.xmlsoap.org/wsdl/}documentation to wsdl_documentation
trace: rewrote key {http://schemas.xmlsoap.org/wsdl/}output to wsdl_output
trace: rewrote key {http://schemas.xmlsoap.org/wsdl/}documentation to wsdl_documentation
trace: rewrote key {http://schemas.xmlsoap.org/wsdl/}documentation to wsdl_documentation
trace: rewrote key {http://schemas.xmlsoap.org/wsdl/}fault to wsdl_fault
trace: rewrote key {http://schemas.xmlsoap.org/wsdl/}output to wsdl_output
trace: rewrote key {http://schemas.xmlsoap.org/wsdl/}request-response-or-one-way-operation to wsdl_request-response-or-one-way-operation
trace: rewrote key {http://schemas.xmlsoap.org/wsdl/}documentation to wsdl_documentation
trace: rewrote key {http://schemas.xmlsoap.org/wsdl/}documentation to wsdl_documentation
trace: rewrote key {http://schemas.xmlsoap.org/wsdl/}output to wsdl_output
trace: rewrote key {http://schemas.xmlsoap.org/wsdl/}documentation to wsdl_documentation
trace: rewrote key {http://schemas.xmlsoap.org/wsdl/}documentation to wsdl_documentation
trace: rewrote key {http://schemas.xmlsoap.org/wsdl/}input to wsdl_input
trace: rewrote key {http://schemas.xmlsoap.org/wsdl/}documentation to wsdl_documentation
trace: rewrote key {http://schemas.xmlsoap.org/wsdl/}documentation to wsdl_documentation
trace: rewrote key {http://schemas.xmlsoap.org/wsdl/}fault to wsdl_fault
trace: rewrote key {http://schemas.xmlsoap.org/wsdl/}input to wsdl_input
trace: rewrote key {http://schemas.xmlsoap.org/wsdl/}solicit-response-or-notification-operation to wsdl_solicit-response-or-notification-operation
trace: rewrote key {http://schemas.xmlsoap.org/wsdl/}request-response-or-one-way-operation to wsdl_request-response-or-one-way-operation
trace: rewrote key {http://schemas.xmlsoap.org/wsdl/}request-response-or-one-way-operation to wsdl_request-response-or-one-way-operation
trace: rewrote key {http://schemas.xmlsoap.org/wsdl/}operation to wsdl_operation
trace: rewrote key {http://schemas.xmlsoap.org/wsdl/}operation to wsdl_operation
trace: rewrote key {http://schemas.xmlsoap.org/wsdl/}portType to wsdl_portType
trace: rewrote key {http://schemas.xmlsoap.org/wsdl/}documentation to wsdl_documentation
trace: rewrote key {http://schemas.xmlsoap.org/wsdl/}documentation to wsdl_documentation
trace: rewrote key {http://schemas.xmlsoap.org/wsdl/}documentation to wsdl_documentation
trace: rewrote key {http://schemas.xmlsoap.org/wsdl/}documentation to wsdl_documentation
trace: rewrote key {http://schemas.xmlsoap.org/wsdl/}documentation to wsdl_documentation
trace: rewrote key {http://schemas.xmlsoap.org/wsdl/}documentation to wsdl_documentation
trace: rewrote key {http://schemas.xmlsoap.org/wsdl/}input to wsdl_input
trace: rewrote key {http://schemas.xmlsoap.org/wsdl/}documentation to wsdl_documentation
trace: rewrote key {http://schemas.xmlsoap.org/wsdl/}documentation to wsdl_documentation
trace: rewrote key {http://schemas.xmlsoap.org/wsdl/}output to wsdl_output
trace: rewrote key {http://schemas.xmlsoap.org/wsdl/}documentation to wsdl_documentation
trace: rewrote key {http://schemas.xmlsoap.org/wsdl/}documentation to wsdl_documentation
trace: rewrote key {http://schemas.xmlsoap.org/wsdl/}fault to wsdl_fault
trace: rewrote key {http://schemas.xmlsoap.org/wsdl/}input to wsdl_input
trace: rewrote key {http://schemas.xmlsoap.org/wsdl/}operation to wsdl_operation
trace: rewrote key {http://schemas.xmlsoap.org/wsdl/}operation to wsdl_operation
trace: rewrote key {http://schemas.xmlsoap.org/wsdl/}binding to wsdl_binding
trace: rewrote key {http://schemas.xmlsoap.org/wsdl/}documentation to wsdl_documentation
trace: rewrote key {http://schemas.xmlsoap.org/wsdl/}documentation to wsdl_documentation
trace: rewrote key {http://schemas.xmlsoap.org/wsdl/}documentation to wsdl_documentation
trace: rewrote key {http://schemas.xmlsoap.org/wsdl/}documentation to wsdl_documentation
trace: rewrote key {http://schemas.xmlsoap.org/wsdl/}port to wsdl_port
trace: rewrote key {http://schemas.xmlsoap.org/wsdl/}port to wsdl_port
trace: rewrote key {http://schemas.xmlsoap.org/wsdl/}service to wsdl_service
trace: rewrote key {http://schemas.xmlsoap.org/wsdl/}anyTopLevelOptionalElement to wsdl_anyTopLevelOptionalElement
trace: rewrote key {http://schemas.xmlsoap.org/wsdl/}anyTopLevelOptionalElement to wsdl_anyTopLevelOptionalElement
trace: using preparsed XML node <{http://schemas.xmlsoap.org/wsdl/}definitions>
trace: cache parsed file soap-encoding.xsd-1265654647-18427
trace: parsing XML from file /usr/lib/perl5/site_perl/5.8.5/XML/Compile/SOAP11/xsd/soap-encoding.xsd
trace: cache parsed file soap-envelope.xsd-1265654648-6032
trace: parsing XML from file /usr/lib/perl5/site_perl/5.8.5/XML/Compile/SOAP11/xsd/soap-envelope.xsd
trace: cache parsed file soap-envelope-patch.xsd-1265654647-796
trace: parsing XML from file /usr/lib/perl5/site_perl/5.8.5/XML/Compile/SOAP11/xsd/soap-envelope-patch.xsd
trace: register prefix SOAP-ENV for 'http://schemas.xmlsoap.org/soap/envelope/'
trace: register prefix SOAP-ENC for 'http://schemas.xmlsoap.org/soap/encoding/'
trace: register prefix xsd for 'http://www.w3.org/2001/XMLSchema'
trace: schema compile WRITER for {http://schemas.xmlsoap.org/soap/envelope/}Fault
trace: schema compile WRITER for {http://schemas.xmlsoap.org/soap/envelope/}Fault
trace: schema compile WRITER for {http://schemas.xmlsoap.org/soap/envelope/}Envelope
trace: schema compile READER for {http://notification.sdk.nms.ov.hp.com/nms-sdk-notify}incidentNotification
error: cannot find element or attribute `{http://notification.sdk.nms.ov.hp.com/nms-sdk-notify}incidentNotification'
 at /usr/lib/perl5/site_perl/5.8.5/XML/Compile/Translate.pm line 196
XML::Compile::Translate::topLevel(XML::Compile::Translate::Reader=HASH(0x1ac3b50), "{http://notification.sdk.nms.ov.hp.com/nms-sdk-notify}incidentNotification", "{http://notification.sdk.nms.ov.hp.com/nms-sdk-notify}incidentNotification") at /usr/lib/perl5/site_perl/5.8.5/XML/Compile/Translate.pm line 104
XML::Compile::Translate::compile(XML::Compile::Translate::Reader=HASH(0x1ac3b50), "{http://notification.sdk.nms.ov.hp.com/nms-sdk-notify}incidentNotification", "sloppy_integers", 0, "check_values", 1, "xsi_type", HASH(0x1ac0e70), [44 more]) at /usr/lib/perl5/site_perl/5.8.5/XML/Compile/Schema.pm line 246
XML::Compile::Schema::compile(XML::Compile::WSDL11=HASH(0x9a3810), "READER", "{http://notification.sdk.nms.ov.hp.com/nms-sdk-notify}incidentNotification", "xsi_type", HASH(0x1ac0e70), "style", "document", "faults", [19 more]) at /usr/lib/perl5/site_perl/5.8.5/XML/Compile/Cache.pm line 318
XML::Compile::Cache::compile(undef, undef, undef, "body", HASH(0xa52080), "kind", "notification-operation", "style", [11 more]) at /usr/lib/perl5/site_perl/5.8.5/XML/Compile/Cache.pm line 177
XML::Compile::Cache::reader(undef, undef, "body", HASH(0xa52080), "kind", "notification-operation", "style", "document", [10 more]) at /usr/lib/perl5/site_perl/5.8.5/XML/Compile/SOAP.pm line 564
XML::Compile::SOAP::_reader(XML::Compile::SOAP11::Client=HASH(0x1961cb0), "{http://notification.sdk.nms.ov.hp.com/nms-sdk-notify}incidentNotification", "body", HASH(0xa52080), "kind", "notification-operation", "style", "document", [10 more]) at /usr/lib/perl5/site_perl/5.8.5/XML/Compile/SOAP.pm line 508
XML::Compile::SOAP::_reader_body_element(XML::Compile::SOAP11::Client=HASH(0x1961cb0), HASH(0x13d91e0), HASH(0x1851530)) at /usr/lib/perl5/site_perl/5.8.5/XML/Compile/SOAP.pm line 490
XML::Compile::SOAP::_reader_body(XML::Compile::SOAP11::Client=HASH(0x1961cb0), HASH(0x13d91e0), SCALAR(0x13d92c0)) at /usr/lib/perl5/site_perl/5.8.5/XML/Compile/SOAP.pm line 356
XML::Compile::SOAP::_receiver(XML::Compile::SOAP11::Client=HASH(0x1961cb0), "body", HASH(0xa52080), "faults", HASH(0x147efb0), "kind", "notification-operation", "style", [5 more]) at /usr/lib/perl5/site_perl/5.8.5/XML/Compile/SOAP11/Operation.pm line 236
XML::Compile::SOAP11::Operation::compileClient(XML::Compile::SOAP11::Operation=HASH(0x1961dc0), "operation", "IncidentNotification", "server", "system:brun325ton at 192.49.164.44") at /usr/lib/perl5/site_perl/5.8.5/XML/Compile/WSDL11.pm line 311
XML::Compile::WSDL11::compileClient(XML::Compile::WSDL11=HASH(0x9a3810), "operation", "IncidentNotification", "server", "system:brun325ton at 192.49.164.44") at ./test_XML_compile.pl line 13


More information about the Xml-compile mailing list