-
June 6th, 2010, 11:26 PM
#1
get XML string returned by web service in java
dear gurus:
how can I get XML string returned by web service in java?
not an object of web service .
thank you
-
June 7th, 2010, 08:21 AM
#2
Re: get XML string returned by web service in java
If you type "java consume web service" about 25,000,000 results pop up showing you, with code even, how to consume a web service. There are two main ways that people do this: using JaxWS (a third party, open source, solution), or by using some of the following Java classes, already there in the SDK:
javax.xml.rpc.Service
javax.xml.rpc.ServiceFactory
-
June 8th, 2010, 04:38 PM
#3
Re: get XML string returned by web service in java
The easiest and straightforward way would be to connect to the service and parse the response: http://java.sun.com/docs/books/tutor...eadingURL.html
The rest of solutions involve external APIs.
Wanna install linux on a vacuum cleaner. Could anyone tell me which distro sucks better?
I had a nightmare last night. I was dreaming that I’m 64-bit and my blanket is 32-bit and I couldn’t cover myself with it, so I’ve spent the whole night freezing. And in the morning I find that my blanket just had fallen off the bed. =S (from: bash.org.ru)
//always looking for job opportunities in AU/NZ/US/CA/Europe :P
willCodeForFood(Arrays.asList("Java","PHP","C++","bash","Assembler","XML","XHTML","CSS","JS","PL/SQL"));
USE [code] TAGS! Read this FAQ if you are new here. If this post was helpful, please rate it!
-
June 10th, 2010, 07:22 AM
#4
Re: get XML string returned by web service in java
The Java recommended way is using JAX-WS, and as of JSR 109 and SDK 1.6 JAX-WS is actually part of the SDK. Using a WSDL and the classes provided is about 5 lines of code, AND the best part is that you don't have to write your own XML parser.
Try reading this article: http://java.sun.com/developer/techni...J2SE/jax_ws_2/.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|