Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Object[] array to Web Service?

 
Stanley Tan
Ranch Hand
Posts: 243
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is it possible to pass an Object[] array of primitive types to a Web service?
 
Kyle Brown
author
Ranch Hand
Posts: 3892
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If they are primitive types wrappers like Integer then yes, it is possible, but why not just send an int array instead?
Kyle
 
Stanley Tan
Ranch Hand
Posts: 243
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 3892
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 243
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 3892
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Here's hoping I get lucky
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic