• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
  • Mikalai Zaikin

Newbie Soap question: returning multiple values

Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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 <><
Posts: 3892
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
No, tomorrow we rule the world! With this tiny ad:
a bit of art, as a gift, the permaculture playing cards
    Bookmark Topic Watch Topic
  • New Topic