• 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 ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

return type

 
author and deputy
Posts: 3150
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 165
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Posts: 3150
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Posts: 3150
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Posts: 3150
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic