aspose file tools*
The moose likes Web Services and the fly likes Object[] array to Web Service? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Web Services
Bookmark "Object[] array to Web Service?" Watch "Object[] array to Web Service?" New topic
Author

Object[] array to Web Service?

Stanley Tan
Ranch Hand

Joined: May 17, 2001
Posts: 243
Is it possible to pass an Object[] array of primitive types to a Web service?
Kyle Brown
author
Ranch Hand

Joined: Aug 10, 2001
Posts: 3892
    
    5
If they are primitive types wrappers like Integer then yes, it is possible, but why not just send an int array instead?
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.
Stanley Tan
Ranch Hand

Joined: May 17, 2001
Posts: 243
Hi, thanks for replying. I'm wondering if I could send, for example, a String and an Integer and possibly others variables together as an object array.
So are you saying that this is possible? (Sorry, I haven't gotten around to downloading the JWSDK and trying it out...) Just doing some preliminary research.
Kyle Brown
author
Ranch Hand

Joined: Aug 10, 2001
Posts: 3892
    
    5
Oh, now I see what you're doing. Yes, it is still possible, but I would REALLY avoid that! Just do a standard Serializable Object with a String and an int variable instead! Easier to debug, and what's more the WSDL would even work with a non-Java client.
Kyle
Stanley Tan
Ranch Hand

Joined: May 17, 2001
Posts: 243
Hi Kyle,
Thanks for much for helping me out of your busy schedule. Would like to ask what you mean by "Just do a standard Serializable Object with a String and an int variable instead!".
What I'm trying to do is exactly what you said - have a non-Java client get the data (that's why I'm thinking object array and just let the client parse the array).
Stanley
Kyle Brown
author
Ranch Hand

Joined: Aug 10, 2001
Posts: 3892
    
    5
OK, if you are using a modern SOAP engine that supports generating WSDL from Java (like Apache Axis) then you should be able to take the WSDL generated from a Web Service defined following the JAX-RPC rules and then use that WSDL with a non-Java client. That's one of the cool things about standards -- they make interoperability possible...
Kyle
Sunit Mukherjee
Greenhorn

Joined: Dec 28, 2001
Posts: 18
Here's hoping I get lucky
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Object[] array to Web Service?