Help coderanch get a
new server
by contributing to the fundraiser
  • 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

WebService Response in the form of XML string

 
Greenhorn
Posts: 16
Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I am working in websphere web services. I have to get webservice response in the form of XML string instead of java object. because i do some validation on the raw XML.

Now i am receiving response as an JAVA object but i want as a string. I can convert response object into XML but i don't want that because it will take lot of time. Web service internally convert from xml to object and again i will convert from object to xml. again i have to do validation on that.

Is there any possible solution to stop webservice convert from XML to object?
Is it possible to get a string as webservice response?

Thanks,
suresh
 
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

sureshkumar settu wrote:Hi,
I am working in websphere web services. I have to get webservice response in the form of XML string instead of java object. because i do some validation on the raw XML.

Now i am receiving response as an JAVA object but i want as a string. I can convert response object into XML but i don't want that because it will take lot of time. Web service internally convert from xml to object and again i will convert from object to xml. again i have to do validation on that.

Is there any possible solution to stop webservice convert from XML to object?
Is it possible to get a string as webservice response?

Thanks,
suresh



There is no generic rule here - it is entirely up to the designer of the web service what it returns. Surely you can find some documentation on this service.

Bill
 
sureshkumar settu
Greenhorn
Posts: 16
Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i am creating web service client to consume the service. I am getting an object as response from that web service provider. but i want raw XML string. As we already know in the handler i can able to print entire XML string. but i want in the web service client code.

if i use SAAJ then i can able to get SOAPMessage from that i can extract the raw XML in the web service client code.

I want to know can we able to get as a raw XML in the client code using JAX-RPC or JAX-WS?

Please share if you have any documentation on this.

Thanks,
suresh
 
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
http://www.jroller.com/gmazza/entry/jaxws_handler_tutorial
 
Space seems cool in the movies, but once you get out there, it is super boring. Now for a fascinating tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/t/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic