axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Karsten Düsterloh <Karsten.Duester...@gmx.de>
Subject Re: WSDL of java.* types
Date Tue, 14 Jan 2003 08:43:18 GMT
Und Steve Loughran aber hob an zu schreiben:
>>> > public class test
>>> > {
>>> >   public test() {}
>>> >   public void Func(java.lang.Math m) {}
>>> > }

Actually, java.lang.Math was just an example for a whole set of classes
from java.lang.*, java.io.* etc. which will fail to get a wsdl created -
my current "main blocker" is java.lang.Exception.

>>> What do you expect when a perl program calls this? Or a C
>>> application? Or
>>> anything other than Java? Or even a different version of Java
>>> from yours?

At least I expect Axis / java2wsdl to create a valid wsdl.

> has no fields, has a private constructor ( I think), and is not marked
> Serializable.

Exception has no fields, but a public constructor, and is serializable.
Nevertheless, wsdl creation fails.

> Next thought: should any object marked as Serializable be automatically sent
> over the wire. That one is tough... what if I export the endpoint Demo.jws:-
> 
> public class Demo {
>     public javax.swing.CellRendererPane getPane(javax.swing.JFrame frame) {
>         return null;
>     }
> }
> Its kind of tenuous this would work across languages. What you get in Axis
> today is the 'never heard of this' error too:
> 
> WSDLException: faultCode=OTHER_ERROR: Can't find prefix for
> 'http://swing.javax'. Namespace prefixes must be set on the Definition
> object using the addNamespace(...) method.:
>  faultActor: null

Yes, this is the kind of errors I get.

> Only stuff Axis knows of goes over the wire. Which is exactly what is
> documented in the DataMapping bit of the user guide:-
> 
> http://cvs.apache.org/viewcvs.cgi/~checkout~/xml-axis/java/docs/user-guide.h
> tml#DataMapping

Thanks for the pointer, especially the bit about exceptions. I'll dig
deeper into it. (When I first read that some time ago, I hadn't the
problems I have now, so that section seems to have been avoiding me
since ;-) ).

> There is some merit in doing a serializer for any object marked as
> Serializable, but you'd throw away a lot of interop options in the process.

True, but:
java2wsdl throws a warning in the above cases, that (especially for
java.* and javax.*) a xml schema anyType will be created instead. When I
try to create a wrapped wsdl (via -y wrapped), the wsdl contains (for
your example) <element name="in0" type="tns2:JFrame"/> and <element
name="getPaneReturn" type="tns2:CellRendererPane"/> with tns2 undefined
instead of xsd:anyType. Is this a bug?


Karsten
-- 
       Freiheit stirbt        |       Fsayannes SF&F-Bibliothek:
            Mit Sicherheit    |       http://fsayanne.tprac.de/


Mime
View raw message