axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Glen Daniels" <gdani...@macromedia.com>
Subject Re: array test
Date Tue, 04 Dec 2001 03:13:36 GMT
Hi Doug:

Well, if you fix the code to match the wsdd in terms of the namespace (one has
a slash at the end, the other doesn't), and add a default constructor for foo
(so the deserializer can create one), your non-wsdl test works fine for me...
:)

For the rest of y'all, the problem which Doug's referring to has to do with the
fact that if you have a WSDL description of a service which has an argument of
an array type such as "myNS:ArrayOfInt" (which derives in schema terms from
SOAP:Array), we won't find a serializer registered for that type.  So in this
situation:

<arg1 href="#id0"/>
<multiref id="id0" xsi:type="SOAP:Array">...

we'd be in the midst of deserializing arg1, notice the lack of xsi:type, so try
to find its type from the Call object.  In this case, we imagine the Call has
been initialized from the WSDL, so the type which we come up with is
"myNS:ArrayOfInt", which we don't know what to do with.

There are two solutions for this, as far as I can see.  One is to have the type
system include inheritance - i.e. we figure out that "myNS:ArrayOfInt" is a
subtype of SOAP:Array, and thus get the right Deserializer.  The other is to
revamp the logic in the deserialization system to hold off on determining the
type from the Call until its sure that there's no xsi:type on the referent
element (in this case, since there is an xsi:type of SOAP:Array, things would
work OK if we could get to it).

The latter one is harder, I think, as it involves some fairly major changes to
the system.  The former seems like a better idea to me long run, since it also
might open the door for better/richer type checking.

What do y'all think?  (this is all post-alpha-3 anyway, I'm assuming)

--G

----- Original Message -----
From: "Doug Davis" <dug@us.ibm.com>
To: <axis-dev@xml.apache.org>
Sent: Monday, December 03, 2001 8:47 PM
Subject: array test


> Glen,
>  Here's a testcase showing the array problem I'm having.
> This one doesn't use wsdl but I think it shows the same bug.
> When I run it I get:
> AxisFault
>   faultCode: http://xml.apache.org/axis/:Server.generalException
>   faultString: No deserializer defined for array type http://test.com/:foo
>   faultActor: null
>   faultDetail:
>         stackTrace: org.xml.sax.SAXException: No deserializer defined for
> array
> type http://test.com/:foo
>         at
> org.apache.axis.encoding.ArraySerializer.onStartElement(ArraySerializ
> er.java:168)
>   ...
> This seems like a really trivial testcase that should be
> fixed before alpha 3 (assuming the bug isn't in the testcase
> itself :-)
>
> Just unzip in your web-inf\classes dir and javac *.java
> you can run testClient (no wsdl) or testClient1 (w/wsdl)
> -Dug
>
> (See attached file: array.zip)
>
>


Mime
View raw message