----- Original Message ----- From: "Volkmann, Mark" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, January 13, 2003 12:34 Subject: RE: WSDL of java.* types
>> > In particular, the following class is *not* exportable as a >> web service: >> > >> > public class test >> > { >> > public test() {} >> > public void Func(java.lang.Math m) {} >> > } >> 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? >This isn't a particularly good example because the Math class has no fields. >If it did, what I'd expect is that the Math type would be described as a >WSDL type. Clients written in languages other than Java would run a >WSDL2Java-like tool for their language on the WSDL that would generate code >for representing Math objects in their language. has no fields, has a private constructor ( I think), and is not marked Serializable. Personally, I'd expect any attempt to send an object over the wire that wasnt Serializable to be indicative of confusion, and rightfully rejected, unless the deployment descriptor named a special serializer. This is what happens in Axis today. 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 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 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. -Steve