axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "John Delaney" <>
Subject Re: How does java2wsdl work?
Date Wed, 25 Jan 2006 02:02:13 GMT
If you have java at both ends there is no problem with using axis to
send your own class. You just have to go through all of the rigamarole
in defining the interface and the serializers at both ends. Once you
have got the hang of that, it is a breeze.


>>> 01/25/06 12:54 PM >>>
Axis is not a distributed object protocol.

Axis (or any web services framework) is not an appropriate system to use
your goal is to send a Java *class* over the network. Axis communicates
using SOAP. SOAP is an XML messaging protocol. Its purpose is to send
messages (i.e., data) between two nodes. It does not send objects.

java2wsdl is a tool that examines the public interface of a Java class,
from that generates a WSDL description for the class. The WSDL
will contain an operation for each public method in the class, and it
generate an XML Schema definition of a set of data elements that
to the method parameters and return values. Any attributes or methods in
class that are not public will not be mapped to the WSDL.

Don't think of it as a "not nice, but workable" situation. If you want a
distributed object system for transferring objects between two Java
applications, use RMI or CORBA. The reason people use SOAP is so that
need to communicate with many different languages -- some of which
object-oriented (e.g., COBOL).


On 1/24/06, Bas A. Schulte <> wrote:
> Hi all,
> I'm trying to send an existing java class (not my app, don't have the
> source, beyond a decompiled version to see what's in it) over the
> wire using Axis on both ends, with very little success.
> What I'm wondering about: how does java2wsdl work in terms of
> establishing what attributes a given class has? It appears to derive
> this from the methods of the class, not by looking at the (private)
> attributes, would that be how it works?
> My problem is that the class has an array (boolean[]) for which there
> is no getter/setter, hence it does not show up in the wsdl. It
> doesn't get transferred over the wire and thus the instance on the
> server end doesn't have this array set properly, causing some methods
> to toss a null pointer exception :(
> I'll have to solve it by creating a similar class, construct one in
> the client and send that over the wire instead. Not nice, but
> Just can't seem to figure out how a) the wsdl gets created and b)
> serialization takes place.
> Cheers,
> Bas.

View raw message