Skip Menu |
 

This queue is for tickets about the XML-Compile-SOAP CPAN distribution.

Report information
The Basics
Id: 63439
Status: resolved
Priority: 0/
Queue: XML-Compile-SOAP

People
Owner: Nobody in particular
Requestors: cpan698301 [...] mstier.de
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 2.19
Fixed in: (no value)



Subject: SOAP-ENV declaration in WSDL definition masks Fault-type definition
XML Compile complains about unknown Envelope Fault type when including the part xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" into the wsdl:definitions tag. This can be corrected by manually applying "$wsdl->importDefinitions('SOAP-ENV.xsd')" where SOAP-ENV.xsd is the official SOAP 1.1 envelope definition xml file. Example of such a problematic wsdl definition tag: <wsdl:definitions xmlns:env="http://www.w3.org/2003/05/soap-envelope" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:enc="http://www.w3.org/2003/05/soap-encoding" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:tns="MyCompany.SubDivision" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" targetNamespace="MyCompany.SubDivision" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
Subject: Re: [rt.cpan.org #63439] SOAP-ENV declaration in WSDL definition masks Fault-type definition
Date: Mon, 29 Nov 2010 16:43:10 +0100
To: "https://www.google.com/accounts/o8/id?id=AItOawkyOHx--RP0sCuxSqimRLgFJ_YPC6QRWZk via RT" <bug-XML-Compile-SOAP [...] rt.cpan.org>
From: Mark Overmeer <solutions [...] overmeer.net>
Download (untitled) / with headers
text/plain 1.1k
* https://www.google.com/accounts/o8/id?id=AItOawkyOHx--RP0sCuxSqimRLgFJ_YPC6QRWZk via RT (bug-XML-Compile-SOAP@rt.cpan.org) [101129 15:05]: Show quoted text
> Mon Nov 29 10:05:24 2010: Request 63439 was acted upon. > Transaction: Ticket created by https://www.google.com/accounts/o8/id?id=AItOawkyOHx--RP0sCuxSqimRLgFJ_YPC6QRWZk > Queue: XML-Compile-SOAP > Subject: SOAP-ENV declaration in WSDL definition masks Fault-type definition > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=63439 > > > XML Compile complains about unknown Envelope Fault type when including > the part xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" into > the wsdl:definitions tag.
It is silly to have SOAP-ENV & friend defined in the WSDL: they are totally unrelated. However, I will need to fix the problem. Please send me the whole WSDL so I can build a test-case. -- Regards, MarkOv ------------------------------------------------------------------------ Mark Overmeer MSc MARKOV Solutions Mark@Overmeer.net solutions@overmeer.net http://Mark.Overmeer.net http://solutions.overmeer.net
From: cpan698301 [...] mstier.de
As desired.
Subject: WSDL.xml
Download WSDL.xml
text/xml 5.2k
<?xml version="1.0" encoding="utf-8"?> <wsdl:definitions xmlns:env="http://www.w3.org/2003/05/soap-envelope" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:enc="http://www.w3.org/2003/05/soap-encoding" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:tns="MyCompany.SubDivision" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" targetNamespace="MyCompany.SubDivision" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"> <wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">some description</wsdl:documentation> <wsdl:types> <xsd:schema elementFormDefault="qualified" targetNamespace="MyCompany.SubDivision"> <xsd:element name="CreateServer"> <xsd:complexType> <xsd:sequence> <xsd:element minOccurs="0" maxOccurs="1" name="strServerFQDN" type="xsd:string" /> <xsd:element minOccurs="0" maxOccurs="1" name="strTechauftragID" type="xsd:string" /> </xsd:sequence> </xsd:complexType> </xsd:element> <xsd:element name="CreateServerResponse"> <xsd:complexType> <xsd:sequence> <xsd:element minOccurs="0" maxOccurs="1" name="CreateServerResult" type="xsd:string" /> </xsd:sequence> </xsd:complexType> </xsd:element> <xsd:element name="DeleteServer"> <xsd:complexType> <xsd:sequence> <xsd:element minOccurs="1" maxOccurs="1" name="strMACAddress" type="xsd:string" /> </xsd:sequence> </xsd:complexType> </xsd:element> <xsd:element name="DeleteServerResponse"> <xsd:complexType> <xsd:sequence> <xsd:element minOccurs="1" maxOccurs="1" name="DeleteServerResult" type="xsd:string" /> </xsd:sequence> </xsd:complexType> </xsd:element> </xsd:schema> </wsdl:types> <wsdl:message name="CreateServerSoapIn"> <wsdl:part name="parameters" element="tns:CreateServer" /> </wsdl:message> <wsdl:message name="CreateServerSoapOut"> <wsdl:part name="parameters" element="tns:CreateServerResponse" /> </wsdl:message> <wsdl:message name="DeleteServerSoapIn"> <wsdl:part name="parameters" element="tns:DeleteServer" /> </wsdl:message> <wsdl:message name="DeleteServerSoapOut"> <wsdl:part name="parameters" element="tns:DeleteServerResponse" /> </wsdl:message> <wsdl:portType name="MyCompany.SubDivisionSoap"> <wsdl:operation name="CreateServer"> <wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">create doc text</wsdl:documentation> <wsdl:input message="tns:CreateServerSoapIn" /> <wsdl:output message="tns:CreateServerSoapOut" /> </wsdl:operation> <wsdl:operation name="DeleteServer"> <wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">delete doc text</wsdl:documentation> <wsdl:input message="tns:DeleteServerSoapIn" /> <wsdl:output message="tns:DeleteServerSoapOut" /> </wsdl:operation> </wsdl:portType> <wsdl:binding name="MyCompany.SubDivisionSoap" type="tns:MyCompany.SubDivisionSoap"> <soap:binding transport="http://schemas.xmlsoap.org/soap/http" /> <wsdl:operation name="CreateServer"> <soap:operation soapAction="MyCompany.SubDivision/CreateServer" style="document" /> <wsdl:input> <soap:body use="literal" /> </wsdl:input> <wsdl:output> <soap:body use="literal" /> </wsdl:output> </wsdl:operation> <wsdl:operation name="DeleteServer"> <soap:operation soapAction="MyCompany.SubDivision/DeleteServer" style="document" /> <wsdl:input> <soap:body use="literal" /> </wsdl:input> <wsdl:output> <soap:body use="literal" /> </wsdl:output> </wsdl:operation> </wsdl:binding> <wsdl:binding name="MyCompany.SubDivisionSoap12" type="tns:MyCompany.SubDivisionSoap"> <soap12:binding transport="http://schemas.xmlsoap.org/soap/http" /> <wsdl:operation name="CreateServer"> <soap12:operation soapAction="MyCompany.SubDivision/CreateServer" style="document" /> <wsdl:input> <soap12:body use="literal" /> </wsdl:input> <wsdl:output> <soap12:body use="literal" /> </wsdl:output> </wsdl:operation> <wsdl:operation name="DeleteServer"> <soap12:operation soapAction="MyCompany.SubDivision/DeleteServer" style="document" /> <wsdl:input> <soap12:body use="literal" /> </wsdl:input> <wsdl:output> <soap12:body use="literal" /> </wsdl:output> </wsdl:operation> </wsdl:binding> <wsdl:service name="MyCompany.SubDivision"> <wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">bindings doc</wsdl:documentation> <wsdl:port name="MyCompany.SubDivisionSoap" binding="tns:MyCompany.SubDivisionSoap"> <soap:address location="http://127.0.0.1/soap/server.php" /> </wsdl:port> <wsdl:port name="MyCompany.SubDivisionSoap12" binding="tns:MyCompany.SubDivisionSoap12"> <soap12:address location="http://127.0.0.1/soap/server.php" /> </wsdl:port> </wsdl:service> </wsdl:definitions>
From: Mark
Hint: the PHP package contains quite some test WSDLs.
Subject: Re: [rt.cpan.org #63439] SOAP-ENV declaration in WSDL definition masks Fault-type definition
Date: Mon, 29 Nov 2010 19:43:18 +0100
To: "https://www.google.com/accounts/o8/id?id=AItOawkyOHx--RP0sCuxSqimRLgFJ_YPC6QRWZk via RT" <bug-XML-Compile-SOAP [...] rt.cpan.org>
From: Mark Overmeer <mark [...] overmeer.net>
Download (untitled) / with headers
text/plain 694b
* https://www.google.com/accounts/o8/id?id=AItOawkyOHx--RP0sCuxSqimRLgFJ_YPC6QRWZk via RT (bug-XML-Compile-SOAP@rt.cpan.org) [101129 16:40]: Show quoted text
> Queue: XML-Compile-SOAP > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=63439 > > > Hint: the PHP package contains quite some test WSDLs.
I have a lot of WSDLs, but it is easier to fight specific bugs. -- Regards, MarkOv ------------------------------------------------------------------------ Mark Overmeer MSc MARKOV Solutions Mark@Overmeer.net solutions@overmeer.net http://Mark.Overmeer.net http://solutions.overmeer.net
Subject: Re: [rt.cpan.org #63439] SOAP-ENV declaration in WSDL definition masks Fault-type definition
Date: Mon, 29 Nov 2010 21:51:26 +0100
To: "https://www.google.com/accounts/o8/id?id=AItOawkyOHx--RP0sCuxSqimRLgFJ_YPC6QRWZk via RT" <bug-XML-Compile-SOAP [...] rt.cpan.org>
From: Mark Overmeer <mark [...] overmeer.net>
Download (untitled) / with headers
text/plain 1.3k
* https://www.google.com/accounts/o8/id?id=AItOawkyOHx--RP0sCuxSqimRLgFJ_YPC6QRWZk via RT (bug-XML-Compile-SOAP@rt.cpan.org) [101129 15:05]: Show quoted text
> Mon Nov 29 10:05:24 2010: Request 63439 was acted upon. > Transaction: Ticket created by https://www.google.com/accounts/o8/id?id=AItOawkyOHx--RP0sCuxSqimRLgFJ_YPC6QRWZk > Queue: XML-Compile-SOAP > Subject: SOAP-ENV declaration in WSDL definition masks Fault-type definition > Broken in: 2.19 > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=63439 > > > XML Compile complains about unknown Envelope Fault type when including > the part xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" into > the wsdl:definitions tag.
It's an unlucky collision with an optimization. In XML::Compile::SOAP11, I try to avoid reinitialization by checking for the SOAP-ENV prefix to be defined. Remove it, and all works. I'll change the code. sub _initSOAP11($) { my ($self, $schemas) = @_ return $self - if exists $schemas->prefixes->{'SOAP-ENV'}; + if $self->{did_init}++; Who can I attribute this change to? -- Regards, MarkOv ------------------------------------------------------------------------ Mark Overmeer MSc MARKOV Solutions Mark@Overmeer.net solutions@overmeer.net http://Mark.Overmeer.net http://solutions.overmeer.net
From: Mark
Download (untitled) / with headers
text/plain 1.2k
On Mon Nov 29 15:51:44 2010, Mark@Overmeer.net wrote: Show quoted text
> * https://www.google.com/accounts/o8/id?id=AItOawkyOHx-- > RP0sCuxSqimRLgFJ_YPC6QRWZk via RT (bug-XML-Compile-SOAP@rt.cpan.org) > [101129 15:05]:
> > Mon Nov 29 10:05:24 2010: Request 63439 was acted upon. > > Transaction: Ticket created by
> https://www.google.com/accounts/o8/id?id=AItOawkyOHx-- > RP0sCuxSqimRLgFJ_YPC6QRWZk
> > Queue: XML-Compile-SOAP > > Subject: SOAP-ENV declaration in WSDL definition masks Fault-
> type definition
> > Broken in: 2.19 > > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=63439 > > > > > XML Compile complains about unknown Envelope Fault type when
> including
> > the part xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
> into
> > the wsdl:definitions tag.
> > It's an unlucky collision with an optimization. In > XML::Compile::SOAP11, > I try to avoid reinitialization by checking for the SOAP-ENV prefix to > be defined. Remove it, and all works. I'll change the code. > > sub _initSOAP11($) > { my ($self, $schemas) = @_ > return $self > - if exists $schemas->prefixes->{'SOAP-ENV'}; > + if $self->{did_init}++; >
Great! Thanks. Show quoted text
> > Who can I attribute this change to?
Don't care.
fix released in 2.20


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.