I am using JAX-RPC. Currently my client (Struts Action) get Web Service response as JAVA object. But I need that response ax XML.
I am able to retrive SOAP request / response as XML directly by writing Handlers for Server and Client. Handler are triggered on Req and response and can do some processing on SOAP messages.
But I need that XML SOAP Response in my Struts Action Class or Servlet. How can I access that ? Please advice.
I'm not sure how to do this with JAX-RPC, but if you need to work with the SOAP on such a low level you may be better off using SAAJ instead. It's easy to get an javax.xml.transform.Source object from the SOAP response, which you then can use as you see fit. [ November 06, 2008: Message edited by: Ulf Dittmer ]
Issue is like this that If I add/remove attributes in WSDL for some client, I need to have all client with modified Java Object Code for Deserialiation to avoid any deserialization error.
So to avoid that I think I need to get web service response as direct XML ( Not Attachment ) so different client can customize the response xml using xml binding for their use. Currently my implementation uses marshaling / unmarshalling of objects so I get data as JAVA Data Objects (DTOs ). How can I access SOAP body contents in client Web App ( Not in Handlers ) in JAX-RPC without changing my current implementaion to SAAJ.
Or is there any way we can define whether client can skip deserialization of attribute if that attribute is not availablbe in client Side skelton classes.
But again JAX-WS is used with JEE 1.5 onwards, and its not a solution if you are using J2EE 1.4. Although it looks like using SAAJ and Message Handler can work it out
Ulf/Arpit, will web service versioning help in this case? As per Arpit's requirement, he is willing to change some attributes in WSDL(mostly in Schema), will web service versioning help in this case?
SCJP,SCWCD,SCBCD,SCDJWS1.4, SCDJWS1.5
For my next feat, I will require a volunteer from the audience! Perhaps this tiny ad?
The Low Tech Laboratory Movie Kickstarter is LIVE NOW!