Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within Web Services
Search Coderanch
Advance search
Google search
Register / Login
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:
Tim Cooke
Campbell Ritchie
Jeanne Boyarsky
Ron McLeod
Liutauras Vilda
Sheriffs:
Rob Spoor
Junilu Lacar
paul wheaton
Saloon Keepers:
Stephan van Hulst
Tim Moores
Tim Holloway
Carey Brown
Scott Selikoff
Bartenders:
Piet Souris
Jj Roberts
fred rosenberger
Forum:
Web Services
return complex types
Georgia Matheou
Greenhorn
Posts: 9
posted 14 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Hi, i have a web service that takes two double numbers and returns complex type
@WebService( name="Complex",serviceName="ComplexService") public class Complex { private double real; private double img; @WebMethod(operationName = "add") public Complex add(Complex complex) { double realResult=real+complex.real; double imgResult=img+complex.img; return new Complex(realResult,imgResult); } }
Can you suggest any ideas how to return this as a
string
so the client can read it?
Thanks a lot,
Geo
NarendraBabu Bandaru
Greenhorn
Posts: 20
posted 14 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
You can use JAXB here. You can convert the complex class object to string object and send it as a string.
But you need to have a XSD file for the complex object. and the same complext object XSD file should be there at the client side also.
Hey, sticks and stones baby. And maybe a wee mention of my stuff:
Free, earth friendly heat - from the CodeRanch trailboss
https://www.kickstarter.com/projects/paulwheaton/free-heat
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
Access Modifiers
why this code fragment is illegal?
modifiers
Doubt in RHE page 78(new edition)
Access Modifiers
More...