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

return type

 
Balaji Loganathan
author and deputy
Bartender
Posts: 3150
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
When I invoke my webservice method,It will return a set of data(encoded in XML),
for example
public String getPersonsData() {}

At this moment, the return type is string. On the client side, I convert this result string to xml.This works fine with java and .net.
Now my question is this a right way to return a xml data? Or is there is any elegant way to return a xml data so that both java and .net can consume it?
Please advice.



At this moment
 
Manas Ahlaad
Ranch Hand
Posts: 165
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
general practice would be returning platform specific instances(of classes) so that they will be interpreted using reflection.
on java platform ideal method of return would be
Person[] - person array
Manas
 
Balaji Loganathan
author and deputy
Bartender
Posts: 3150
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Manas Ahlaad:
general practice would be returning platform specific instances(of classes) so that they will be interpreted using reflection.
on java platform ideal method of return would be
Person[] - person array
Manas

thanks for the reply, actaully thats the one I'm using now, and its giving some interoperability error during axis jar versions , VS.NET versions ..blah blah..
still trying to consume them.
 
Balaji Loganathan
author and deputy
Bartender
Posts: 3150
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Manas Ahlaad:

on java platform ideal method of return would be
Person[] - person array
Manas

Just wondering have you ever able to deploy & consume a webservice in ApacheAxis which returns a Person[] with style="document" or "rpc" ??
I'm trying this but not able to successfully consume it.
Getting the error
---
Error: Error while calling web service. Exception has been thrown by the target of an invocation.
Inner Exception: java.lang.NullPointerException
---
No idea where is the problem is ?
Could be nice if you could help me!..
 
Balaji Loganathan
author and deputy
Bartender
Posts: 3150
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes!.. Just got it working after so much hurdle!(2 days)
But now I'm
BYW I used rpc style for this.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic