Meaningless Drivel is fun!*
The moose likes Web Services and the fly likes about transfering complex objects using AXIS Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Web Services
Bookmark "about transfering complex objects using AXIS" Watch "about transfering complex objects using AXIS" New topic
Author

about transfering complex objects using AXIS

sam wzm
Greenhorn

Joined: Nov 06, 2004
Posts: 11
Dear friends,

I have a question about how to transfer complex objects between server and client using AXIS technology. as the example5 coming with AXIS, it's easy to transfer a bean containing primitive data. but I want to transfer a bean containing other beans as one of its fields. but I don't know if I transfer such kind of bean or how? also does anyone know if AXIS can transfer java collections and how?

another question is that I don't know why the wsdl file doesn't change after I change the source server java file and deploy it using command line: java org.apache.axis.client.AdminClient deploy.wsdd. but I do find the service is undeployed if I run undeploy command. for example, even if I add an variable of int type in Order file under example5, and recomplie the java file and then redeploy the service. the wsdl is the same as before! it's really wired. also I don't know where the service is deployed. if it's just a wsdl or there should be a java class file in some directory under tomcat?

thank you very much for your great help!
Sam
Pradeep bhatt
Ranch Hand

Joined: Feb 27, 2002
Posts: 8898

for example, even if I add an variable of int type in Order file under example5, and recomplie the java file and then redeploy the service


Are you adding set/get methods for the new variable?


Groovy
sam wzm
Greenhorn

Joined: Nov 06, 2004
Posts: 11
yes, I have added set/get methods, thanks.
Balaji Loganathan
author and deputy
Bartender

Joined: Jul 13, 2001
Posts: 3150
Originally posted by sam wzm:
Dear friends,
I have a question about how to transfer complex objects between server and client using AXIS technology. as the example5 coming with AXIS, it's easy to transfer a bean containing primitive data. but I want to transfer a bean containing other beans as one of its fields. but I don't know if I transfer such kind of bean or how?
Sam

You have use the same example5 as a basis. Define the bean mapping details for all the beans. The best way could be apply JAVA2WSDL on your java interfaces and generate the WSDD. now use this wsdd and deploy the service, then use WSDL2Java to generate the java client and test it. Axis website got a better documentation on this.

Make use of complex types instead of java collection for better interoperability.


Spritle Software Blogs
Balaji Loganathan
author and deputy
Bartender

Joined: Jul 13, 2001
Posts: 3150
Originally posted by sam wzm:

another question is that I don't know why the wsdl file doesn't change after I change the source server java file and deploy it using command line:
Sam


Strange...it happened sometime for me. (i was using servletexec + axis), so i started deploying the service directly by editing the server-config.wsdd file.
sam wzm
Greenhorn

Joined: Nov 06, 2004
Posts: 11


thanks guys!

about the complex objects, I have another problem, please look the new post and give me help if you know.

Thanks again,
Sammy
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: about transfering complex objects using AXIS
 
Similar Threads
about serilize/deserilize complex objects
Benefit of using Apache Axis 1.1?
Complex data type serialization (JWSDP)
How to change the name of the binding element in wsdl file ?
How to change the name of the binding element in wsdl file ?