Skip Menu |
 

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

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

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

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



Subject: response with complex array type fails to parse
Download (untitled) / with headers
text/plain 636b
No error, I just get an undefined answer. Response from PHP SoapServer: <?xml version="1.0" encoding="UTF-8"?> <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="MyCompany.SubDivision"><SOAP-ENV:Body><ns1:DeleteServerResponse><ns1:status>0</ns1:status><ns1:errmessage>no error</ns1:errmessage><ns1:content><ns1:Description><ns1:some_id>3</ns1:some_id></ns1:Description><ns1:Description><ns1:some_id>1</ns1:some_id></ns1:Description><ns1:Description><ns1:some_id>456</ns1:some_id></ns1:Description></ns1:content></ns1:DeleteServerResponse></SOAP-ENV:Body></SOAP-ENV:Envelope> WSDL is attached.
Subject: WSDL_arraytest.xml
<?xml version="1.0" encoding="utf-8"?> <wsdl:definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:tns="MyCompany.SubDivision" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" targetNamespace="MyCompany.SubDivision" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"> <wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">some description</wsdl:documentation> <wsdl:types> <xsd:schema elementFormDefault="qualified" targetNamespace="MyCompany.SubDivision"> <xsd:complexType name="Description"> <xsd:sequence> <xsd:element minOccurs="1" maxOccurs="1" name="some_id" type="xsd:integer" /> </xsd:sequence> </xsd:complexType> <xsd:complexType name="ArrayOfDescription"> <xsd:complexContent mixed="false"> <xsd:restriction base="SOAP-ENC:Array"> <xsd:attribute ref="SOAP-ENC:arrayType" wsdl:arrayType="tns:Description[]" /> </xsd:restriction> </xsd:complexContent> </xsd:complexType> <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="status" type="xsd:integer" /> <xsd:element minOccurs="1" maxOccurs="1" name="errmessage" type="xsd:string" /> <xsd:element minOccurs="1" maxOccurs="1" name="content" type="tns:ArrayOfDescription" /> </xsd:sequence> </xsd:complexType> </xsd:element> </xsd:schema> </wsdl:types> <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="DeleteServer"> <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="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:service name="MyCompany.SubDivision"> <wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">URIs get invalidated after some time. You need to re-load this WSDL then. Do not try to obtain them manually because they are attached to session handling.</wsdl:documentation> <wsdl:port name="MyCompany.SubDivisionSoap" binding="tns:MyCompany.SubDivisionSoap"> <soap:address location="http://127.0.0.1/soap/server_arraytest.php" /> </wsdl:port> </wsdl:service> </wsdl:definitions>
Download (untitled) / with headers
text/plain 278b
sorry, missed it. The bug may be present, but your description is unclear and I do not have an environment where I can test your example. It would be easiest if you try to debug it with by adding a few print statements to XML/Compile/SOAP11/Encoding.pm SOAP-RPC is a bad idea.
Download (untitled) / with headers
text/plain 493b
Show quoted text
> The bug may be present, but your description is unclear and I do not > have an environment where I can test your example. It would be easiest > if you try to debug it with by adding a few print statements to > XML/Compile/SOAP11/Encoding.pm
Would it help, too, to set up the corresponding service port? Show quoted text
> SOAP-RPC is a bad idea.
Why is that? Do you recommended alternative? Would be very helpful because we are planning some (rpc like?) platform-independent API based on web/ip protocols.
Subject: Re: [rt.cpan.org #63494] response with complex array type fails to parse
Date: Fri, 24 Dec 2010 17:24:58 +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.5k
* https://www.google.com/accounts/o8/id?id=AItOawkyOHx--RP0sCuxSqimRLgFJ_YPC6QRWZk via RT (bug-XML-Compile-SOAP@rt.cpan.org) [101224 11:43]: Show quoted text
> Queue: XML-Compile-SOAP > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=63494 > >
> > The bug may be present, but your description is unclear and I do not > > have an environment where I can test your example. It would be easiest > > if you try to debug it with by adding a few print statements to > > XML/Compile/SOAP11/Encoding.pm
> > Would it help, too, to set up the corresponding service port?
Yes, a server/port combination with the real server behind it would help. I'll try to fix it. Show quoted text
> > SOAP-RPC is a bad idea.
> > Why is that? Do you recommended alternative? Would be very helpful > because we are planning some (rpc like?) platform-independent API based > on web/ip protocols.
RPC is not well-defined; it passes data without a pre-defined nice structure. The receiving program can only hope that the structure is about the same as last time... At the same time, there is very solid way of passing data via SOAP in document style. Of course, people have to take a few minutes to describe their data-structures in schema's, but it is well spent. -- Regards, MarkOv ------------------------------------------------------------------------ Mark Overmeer MSc MARKOV Solutions Mark@Overmeer.net solutions@overmeer.net http://Mark.Overmeer.net http://solutions.overmeer.net
Download (untitled) / with headers
text/plain 250b
Show quoted text
> > Would it help, too, to set up the corresponding service port?
> > Yes, a server/port combination with the real server behind it > would help. I'll try to fix it.
Ok, here it is: http://pub.mstier.de/soaptest/server_arraytest.php?WSDL Thanks!
Subject: Re: [rt.cpan.org #63494] response with complex array type fails to parse
Date: Tue, 28 Dec 2010 21:40:03 +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 913b
* https://www.google.com/accounts/o8/id?id=AItOawkyOHx--RP0sCuxSqimRLgFJ_YPC6QRWZk via RT (bug-XML-Compile-SOAP@rt.cpan.org) [101228 12:40]: Show quoted text
> Queue: XML-Compile-SOAP > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=63494 > >
> > > Would it help, too, to set up the corresponding service port?
> > > > Yes, a server/port combination with the real server behind it > > would help. I'll try to fix it.
> > Ok, here it is: > > http://pub.mstier.de/soaptest/server_arraytest.php?WSDL
I get a "forbidden" Please sent the correct address via a direct mail, not via public RT. -- MarkOv ------------------------------------------------------------------------ drs Mark A.C.J. Overmeer MARKOV Solutions Mark@Overmeer.net solutions@overmeer.net http://Mark.Overmeer.net http://solutions.overmeer.net
Subject: Re: [rt.cpan.org #63494] response with complex array type fails to parse
Date: Sun, 2 Jan 2011 01:17:32 +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.8k
* https://www.google.com/accounts/o8/id?id=AItOawkyOHx--RP0sCuxSqimRLgFJ_YPC6QRWZk via RT (bug-XML-Compile-SOAP@rt.cpan.org) [101224 11:43]: Show quoted text
> Queue: XML-Compile-SOAP > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=63494 > >
>> SOAP-RPC is a bad idea.
Actually, the WSDL is neither document style SOAP (as it tells it is) nor SOAP-RPC... it is somewhere inbetween. I am not sure whether this SOAP-ENC use in document style SOAP is permitted. At least you are the first to complain about it ;-) Are you able to influence the WSDL? Then consider the following: . change the target namespace in something which is URI compliant . change the status and some_id type into "int" (not "integer", which can be 18 digits). . change "some_id" into "some-id", XML style. . change the "content" definition into <xsd:element ref="tns:content" /> ... <xsd:element name="content"> <xsd:sequence> <xsd:element name="Description" type="tns:description" minOccurs="0" maxOccurs="unbounded" /> </xsd:sequence> </xsd:element> <xsd:complexType name="description"> <xsd:sequence> <xsd:element name="some_id" type="xsd:int" /> </xsd:sequence> </xsd:complexType> It is just a few lines longer, but really document style. I will need to fix the implementation if I am sure that this SOAP-ENC mixing with docstyle is permitted by the docs. But I hate it. Attached is a cowardous work-around. -- Regards, MarkOv ------------------------------------------------------------------------ Mark Overmeer MSc MARKOV Solutions drs Mark A.C.J. Overmeer MARKOV Solutions Mark@Overmeer.net solutions@overmeer.net http://Mark.Overmeer.net http://solutions.overmeer.net
Download a.pl
text/x-perl 814b

Message body is not shown because sender requested not to inline it.

Subject: Re: [rt.cpan.org #63494] response with complex array type fails to parse
Date: Tue, 4 Jan 2011 15:21:13 +0100
To: bug-XML-Compile-SOAP [...] rt.cpan.org
From: "Mark" <mark-bkwrds3u [...] mstier.de>
Download (untitled) / with headers
text/plain 2.5k
Hmm, ok, I read http://www.eherenow.com/soapfight.htm and start to understand. I intended to use WSDL to describe call parameters, but the better solution seems to use document/literal plus some XML schema definition for the body. Do you agree? Best regards, Mark On Sun, January 2, 2011 01:17, Mark Overmeer via RT wrote: Show quoted text
> <URL: http://rt.cpan.org/Ticket/Display.html?id=63494 > > > * > https://www.google.com/accounts/o8/id?id=AItOawkyOHx--RP0sCuxSqimRLgFJ_YPC6QRWZk > via RT (bug-XML-Compile-SOAP@rt.cpan.org) [101224 11:43]:
>> Queue: XML-Compile-SOAP >> Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=63494 > >>
>>> SOAP-RPC is a bad idea.
> > Actually, the WSDL is neither document style SOAP (as it tells it is) > nor SOAP-RPC... it is somewhere inbetween. I am not sure whether this > SOAP-ENC use in document style SOAP is permitted. At least you are the > first to complain about it ;-) > > Are you able to influence the WSDL? Then consider the following: > . change the target namespace in something which is URI compliant > . change the status and some_id type into "int" (not "integer", > which can be 18 digits). > . change "some_id" into "some-id", XML style. > . change the "content" definition into > > <xsd:element ref="tns:content" /> > ... > <xsd:element name="content"> > <xsd:sequence> > <xsd:element name="Description" type="tns:description" > minOccurs="0" maxOccurs="unbounded" /> > </xsd:sequence> > </xsd:element> > > <xsd:complexType name="description"> > <xsd:sequence> > <xsd:element name="some_id" type="xsd:int" /> > </xsd:sequence> > </xsd:complexType> > > It is just a few lines longer, but really document style. > > I will need to fix the implementation if I am sure that this > SOAP-ENC mixing with docstyle is permitted by the docs. But I > hate it. Attached is a cowardous work-around. > -- > Regards, > MarkOv > > ------------------------------------------------------------------------ > Mark Overmeer MSc MARKOV Solutions > drs Mark A.C.J. Overmeer MARKOV Solutions > Mark@Overmeer.net solutions@overmeer.net > http://Mark.Overmeer.net http://solutions.overmeer.net > > >
-- The keywords "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in RFC-2119 [http://www.ietf.org/rfc/rfc2119.txt].
Subject: Re: [rt.cpan.org #63494] response with complex array type fails to parse
Date: Tue, 4 Jan 2011 15:33:24 +0100
To: Mark via RT <bug-XML-Compile-SOAP [...] rt.cpan.org>
From: Mark Overmeer <secretaris [...] nluug.nl>
Download (untitled) / with headers
text/plain 877b
* Mark via RT (bug-XML-Compile-SOAP@rt.cpan.org) [110104 14:21]: Show quoted text
> Queue: XML-Compile-SOAP > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=63494 > > > I intended to use WSDL to describe call parameters, but the better > solution seems to use document/literal plus some XML schema definition for > the body. Do you agree?
Yes. Well, your WSDL is already document/literal. My example can be used as base for the rewrite. That's not complex. Add soapAction or wsaw (see ::WSA) definitions to your WSDL when there are many ports. -- 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 349b
http://ws-i.org/Profiles/BasicProfile-2_0%28WGD%29.html I followed the recommendation from 4.3.3 and re-expressed the arrays in my WSDL according to it. It works now. BTW: the SOAP style I'm trying to use is called "document/literal wrapped" on http://www.ibm.com/developerworks/webservices/library/ws-whichwsdl/ Thanks for the great support!
no error


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.