[Xml-compile] Crash on new
Gary Kennedy
gary at apnic.net
Thu Dec 1 07:42:54 GMT 2011
I have to stop looking now, time to go home, but here's were I'm at so far.
BTW: I should have said the wsdl I'm using is the NetSuite 2011 wsdl, as this may work with a 'proper' wsdl/schema.
https://webservices.netsuite.com/wsdl/v2011_1_0/netsuite.wsdl
When adding the wsdl, it does the wsdl:definitions reader stuff, then stops during the xsd:schema reader stuff.
Ran out of time when I tracked it to the error call at line 198 of XML::Compile::Translate (sub topLevel).
The error it's trying to report is:
cannot find element or attribute `{http://www.w3.org/2001/XMLSchema}schema'
A quick look in Log::Report and it looks like certain conditions are cause the error to have exit called.
I'll hopefully have time to look at this tomorrow.
BTW: the top of the wsdl file is as below, so the element exists (??)
<definitions
xmlns="http://schemas.xmlsoap.org/wsdl/"
xmlns:tns="urn:platform_2011_1.webservices.netsuite.com"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:platformMsgs="urn:messages_2011_1.platform.webservices.netsuite.com"
xmlns:platformFaults="urn:faults_2011_1.platform.webservices.netsuite.com"
targetNamespace="urn:platform_2011_1.webservices.netsuite.com">
<types>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
Hope that helps,
Gary
On 01/12/2011, at 2:19 PM, Gary Kennedy wrote:
> Ok, I'm using XCW as the internals of an interface module.
>
> To save execution time I'm compiling everything when the module gets imported. (Yes, I now know about XML::Compiler::Dumper, but this is all written and time critical so new modules later).
>
> Basically I have:
>
> package Interface;
> use strict;
> use warnings;
> use Log::Report;
> use XML::Compile::WSDL11;
> use XML::Compile::SOAP11;
> use XML::Compile::Transport::SOAPHTTP;
>
> sub import {
> # .. import stuff
> setup();
> }
>
> sub setup {
> my $wsdl;
> try {
> $wsdl = XML::Compile::WSDL11->new($wsdl_file, xsi_type => $typemap);
> $wsdl->importDefinitions($schema_file_list);
> };
> if ($@) { die 'error stuff' };
>
> # .. extra setup
> }
> 1;
>
> And when using this module in a script, it drops you back to the command prompt after/during the ::WSDL11->new call.
>
> It still runs END blocks so it's not technically a crash I suppose, but it's still not nice.
>
> Now, if I comment out the setup() call in the import block, and manually run setup in the script, it all works fine.
>
> I have absolutely no idea why this is happening, any ideas?
>
> Thanks,
> Gary
>
>
> _______________________________________________
> Xml-compile mailing list
> Xml-compile at lists.scsys.co.uk
> http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/xml-compile
More information about the Xml-compile
mailing list