I need one simple application where the Java server program will send the array of objects (user details as mentioned above) to the Client program which is in VB. I did an example that works fine with single parameters, returning SOAP service from Java to VB, but not the object kind of thing!
Please provide me sample codes for both server program and client program
too...I am using Microsoft SOAP toolkit in VB and Apache SOAP in server
First, make sure you're using the latest versions of Apache SOAP (2.3.1) and MS SOAP Toolkit (3.0).
You can pass a simple structure of primitive types pretty easily. You need to define a user-defined type for your userDetail structure and then define a VB class for that type (kind of like a VB bean). Then you define a WSML file that tells MS SOAP how to map your user-defined type to your VB class. If you want to pass a more complex structure containing nested beans, you have to use the MS SOAP low-level API. See this tutorial for an example of using the low-level API. You'll need to create the ISoapTypeMapper_read and ISoapTypeMapper_write classes, which manage the process of reading and writing nested structures from the SOAP envelope using the DOM parsing functionality and the low level API.
Some of the other Java SOAP implementations have designed their complex object containers to be compatible with .NET, including Systinet WASP, The Mind Electric GLUE, IONA XMLbus, and BEA WebLogic Workshop. If you're willing to use one of these products, you can just use the auto-generated structures and it should work.
I recommend that you take a look at the WASP documentation on .NET integration. It includes a set of XML Schemas for Java collections that will interoperate with .NET.
This was first published in July 2002