axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "R J Scheuerle Jr" <sc...@us.ibm.com>
Subject Re: array test
Date Tue, 04 Dec 2001 15:50:39 GMT
+1 on the following suggested code change.

| This would require a change to the current logic
| to hold off on determining the type until we get to the actual referent
| element.

Can we make changes to the current test/arrays testcase to test this
situation.  (i.e. Can we prevent the
WSD2Java emitter from emitting the intermediate FoodArray/GameArray classes
and just use String[].)

BTW.  Has anyone tested the situation where the elements of the array are
multiply ref'ed ?


Rich Scheuerle
XML & Web Services Development
512-838-5115  (IBM TL 678-5115)


                                                                                         
              
                    "Glen Daniels"                                                       
              
                    <gdaniels@macro       To:     <axis-dev@xml.apache.org>     
                       
                    media.com>            cc:                                         
                 
                                          Subject:     Re: array test                    
              
                    12/04/2001                                                           
              
                    07:42 AM                                                             
              
                    Please respond                                                       
              
                    to axis-dev                                                          
              
                                                                                         
              
                                                                                         
              



Doug is talking about the "real" problem which I described in my message,
not
the syntactic error arising from his typo in the example.  In other words,
right now the logic for processing an element like:

<arg1 href="#id0"/>

is to check for xsi:type (no), then look for metadata (either from
introspecting the method or from the Call object) based on the param name.
If
we use the Call object's metadata, and the type it indicates for that arg
is a
derived Array class (i.e. "myNS:ArrayOfInt"), we complain that we can't
find a
deserializer.

Doug is suggesting that in the case where the id="id0" element has an
xsi:type
of "SOAP:Array", we should respect that in all cases rather than going to
the
metadata (my "solution 1").  This would require a change to the current
logic
to hold off on determining the type until we get to the actual referent
element.  This is probably something that we should do at some point.

We should also be confirming that the metadata (if present) is compatible
with
the xsi:type value - which means that we should also go the "solution 2"
route
at some point, and understand that the "myNS:ArrayOfInt" type is a SOAP
Array.

(Another potential solution to this might be to scan the types in the
metadata
as we're reading it, and walk up the schema type tree to see if it's an
Array,
since Arrays seem to be the special case here, and use "SOAP:Array" instead
of
the derived type if so.  This loses any other semantics on the derived
type,
though.)

--G

----- Original Message -----
From: "Sam Ruby" <rubys@us.ibm.com>
To: <axis-dev@xml.apache.org>
Sent: Tuesday, December 04, 2001 8:12 AM
Subject: Re: array test


> Doug Davis wrote:
> >
> > On your (1) you say throw an error if we don't
> > understand the xsi:type -  just wanted to be clear - in my
> > case I'm seeing the error because we aren't even looking
> > at the xsi:type.  We don't follow the href - if we did then we'd
>  >see a well-known xsi:type and the error would be avoided.
>
> I guess I'm confused.  Below are the "bad" and "good" wire dumps.  The
only
> differences (other than ordering of elements) are the presence or absence
> of trailing slashes in the definitions of ns1, ns2, ns3, and ns4.
>
> So, we today we report that it is an array of things that we don't
> understand.  If we followed the href, we again would say that it was an
> array of things we don't understand.
>
> Bad:
>
>    <?xml version="1.0" encoding="UTF-8"?>
>    <SOAP-ENV:Envelope
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
>    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
>     <SOAP-ENV:Body>
>      <doitResponse>
>       <doitResult href="#id0"/>
>      </doitResponse>
>      <multiRef id="id0" SOAP-ENC:root="0" xsi:type="SOAP-ENC:Array"
SOAP-ENC:arrayType="ns1:foo[3]" xmlns:SOAP-ENC
>    ="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns1="
http://test.com/">
>       <item href="#id1"/>
>       <item href="#id2"/>
>       <item href="#id3"/>
>      </multiRef>
>      <multiRef id="id3" SOAP-ENC:root="0" xsi:type="ns2:foo"
xmlns:ns2="http://test.com/"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/">
>       <i xsi:type="xsd:int">3</i>
>      </multiRef>
>      <multiRef id="id2" SOAP-ENC:root="0" xsi:type="ns3:foo"
xmlns:ns3="http://test.com/"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/">
>       <i xsi:type="xsd:int">2</i>
>      </multiRef>
>      <multiRef id="id1" SOAP-ENC:root="0" xsi:type="ns4:foo"
xmlns:ns4="http://test.com/"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/">
>       <i xsi:type="xsd:int">1</i>
>      </multiRef>
>     </SOAP-ENV:Body>
>    </SOAP-ENV:Envelope>
>
> Good:
>
>    <?xml version="1.0" encoding="UTF-8"?>
>    <SOAP-ENV:Envelope
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
>    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
>     <SOAP-ENV:Body>
>      <doitResponse>
>       <doitResult href="#id0"/>
>      </doitResponse>
>      <multiRef id="id0" SOAP-ENC:root="0" xsi:type="SOAP-ENC:Array"
SOAP-ENC:arrayType="ns1:foo[3]" xmlns:SOAP-ENC
>    ="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns1="
http://test.com">
>       <item href="#id1"/>
>       <item href="#id2"/>
>       <item href="#id3"/>
>      </multiRef>
>      <multiRef id="id1" SOAP-ENC:root="0" xsi:type="ns2:foo"
xmlns:ns2="http://test.com"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/">
>       <i xsi:type="xsd:int">1</i>
>      </multiRef>
>      <multiRef id="id3" SOAP-ENC:root="0" xsi:type="ns3:foo"
xmlns:ns3="http://test.com"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/">
>       <i xsi:type="xsd:int">3</i>
>      </multiRef>
>      <multiRef id="id2" SOAP-ENC:root="0" xsi:type="ns4:foo"
xmlns:ns4="http://test.com"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/">
>       <i xsi:type="xsd:int">2</i>
>      </multiRef>
>     </SOAP-ENV:Body>
>    </SOAP-ENV:Envelope>
>
> - Sam Ruby
>





Mime
View raw message