File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Web Services and the fly likes Newbie Soap question: returning multiple values Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Java » Web Services
Reply Bookmark "Newbie Soap question: returning multiple values" Watch "Newbie Soap question: returning multiple values" New topic
Author

Newbie Soap question: returning multiple values

Rick Crawford
Ranch Hand

Joined: Aug 17, 2001
Posts: 34
Hello all. I'm hoping someone here can give me some advice.
I've got an assignment that is going to involve sharing a Java application's functionality to a non-Java (VB) client. The Java application is hosted on a webserver running Tomcat. This client will have to access the application across our company's network. I'm thinking that creating a Soap service may be the way to go.
I downloaded the Soap SDK from Apache. I found a simple tutorial that demonstrated how to build an Soap-RPC service with a Java client. I modified the example to actually return data extracted from a database:
First the server:

Next, the client:

It seems to work okay. But I'm not sure where to go from here. My actual implementation will be MUCH more complicated than this. For my use, this server would need to return back a lot of information about a customer than just its name. I need the server to pass back several attributes.. that could be placed in an XML datagram! Would I have to set up a separate 'getter' method for each attribute, and
re-run the service for each?
I really don't know how to even ask this, but I'll try: if your server needs to return more than one value, what are your options? I would
imagine that if I was going Java-to-Java, I might be able to pass back a JavaBean (or some other type of Java container, like a HashMap.) But what do you do if your client is non-Java?
I'm quite confused, and very much appreciate any advice on this!
Rick Crawford <><
Kyle Brown
author
Ranch Hand

Joined: Aug 10, 2001
Posts: 3879
OK, first of all ditch Apache SOAP. Go get Apache Axis.
Build a web service that returns a Java bean with Apache Axis. Then run the Java2WSDL tool on your Java to produce WSDL -- then you can suck in this WSDL in Visual Studio .NET to build the VB client.
That's enormously simplified, but it's the basic way of achieving this.
Kyle


Kyle Brown, Author of Persistence in the Enterprise and Enterprise Java Programming with IBM Websphere, 2nd Edition
See my homepage at http://www.kyle-brown.com/ for other WebSphere information.
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: Newbie Soap question: returning multiple values
 
Similar Threads
Can you please help me out ....
Maximum size of attachments?
Java call SOAP???
execution error in SOAP client-server
SOAP Header Authentication!!!