[xgws-user] Support to response arrays?
Aleksander Slominski
aslom_at_cs.indiana.edu
Fri, 10 Nov 2006 09:47:22 -0500
Andre P. wrote:
> Hey there Alek! That was me again asking, and you again answering!
> hehehe, THANKS!
> You figured that out, it's really SOAPEnc (take a look in another
> snippet of the wsdl:)
>
> - <#> <s:complexType name ="*ResultElementArray*">
> - <#> <s:complexContent>
> - <#> <s:restriction base ="*soapenc:Array*">
> <s:attribute ref="*soapenc:arrayType *"
> wsdl:arrayType="*typens: *ZipQueryResult*[]*" />
> </s:restriction>
> </s:complexContent>
> </s:complexType>
>
> This (SOAPEnc) actually doesn't conforme with the WS-I especs, right?
i think that is correct - and soapenc is hard for interoperability ....
> (R2110: In a DESCRIPTION, declarations MUST NOT extend or restrict the
> soapenc:Array type).
> I really don't know why people still develops WS that do not conform
> with the WS-I ! hehehe
:-)
best,
alek
>
> Thanks for you help and explanations!
>
> Andre
>
> On 11/9/06, * Aleksander Slominski* <aslom_at_cs.indiana.edu
> <mailto:aslom_at_cs.indiana.edu>> wrote:
>
> Andre P. wrote:
> > Hello list!
> >
> > May I, using XSUL (the Dynamic Invoker), handle SOAP responses that
> > come into arrays, for example:
> >
> > ######## The WSDL (snippet):
> >
> > <s:complexType name="ZipQuery">
> > <s:all>
> > <s:element name="ZipCode" type="s:int" />
> > </s:all>
> > </s:complexType>
> >
> > <s:complexType name="ZipQueryResult">
> > <s:all>
> > <s:element name="ZipCode" type="s:int" />
> > <s:element name="Settlement" type="s:string" />
> > <s:element name="SettlementType" type="s:string" />
> > <s:element name="City" type="s:string" />
> > <s:element name="State" type="s:string" />
> > </s:all>
> > </s:complexType>
> >
> > ######## The response comes like these:
> >
> > <responseZipCode>
> > <place n1:type="SOAP-ENC:Array"
> n2:arrayType="ns1:ZipQueryResult[0]"
> > xmlns:n1=" http://www.w3.org/2001/XMLSchema-instance"
> > xmlns:n2="http://schemas.xmlsoap.org/soap/encoding/" />
> > </responseZipCode>
> >
> >
> > The big question is, how can I get/extract the ZipCode, Settlement,
> > City, etc from the response array (ZipQueryResult[0]).
> this is not array - something must be missing in your schema as
> ZipQueryResult is just a struct moreover it looks a bit like SOAPEnc -
> those are not really supported as they are hard ot impossible to
> describe i nXML Schemas. fo doc literal/array you
> should use sequence of ZipQueryResult with minOccurs 0 and unbounded
> maxOccurs - typical example
>
> <complexType name='ArrayOfZipQueryResult'>
> <sequence>
> <element name='item' type='typens:ZipQueryResult'
> maxOccurs='unbounded'/>
> </sequence>
> </complexType>
>
> best,
>
> alek
>
> --
> The best way to predict the future is to invent it - Alan Kay
>
>
--
The best way to predict the future is to invent it - Alan Kay