You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by "Veprinsky, Michael" <Mi...@dig.com> on 2006/07/01 02:24:58 UTC

Building client and server in axis

Is there a way to use same classes (both interface and beans) in both client and server?
I am using Axis 1.3
For instance, if I start with Java and build a service Service.java (basic java class), I can build WSDL from this class and generate client bindings off of this WSDL (Service I can deploy with a wsdd). Client binding will generate new interface for service looking almost 100% like original class and I can technically overwrite one with the other but that's not the point. Is there a way to use Axis to generate bindings around existing classes? Same with beans, especially if beans in a package different from package where the Service is (and I want to keep it like that). WSDL2Java generates beans with type information and with bean serializer property. If I nuke that portion of class definition deserialization fails, even though generated bindings do provide QName for each class (the do not provide TypeDesc and I guess that's what matters at the end of the day).

Any ideas?

PS I know that I can edit generated source and that I can put beans into the same package as service and then namespace will probably properly resolve. As well as I know that I can probably replace generated Service.java with original one and everything will work. That's not the question, the question is whether Axis itself supports this through some generation options or maybe some other way I am missing. There got to be some standard and convenient way to have same javabean on client and server.