Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
The moose likes Web Services and the fly likes Spring WS JAXB CDATA issue Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "Spring WS JAXB CDATA issue" Watch "Spring WS JAXB CDATA issue" New topic
Author

Spring WS JAXB CDATA issue

Mat Anthony
Ranch Hand

Joined: May 21, 2008
Posts: 237
Hi All,
I'm trying to write some code that will handle CDATA issues wen Marshalling data (i.e. org.sport.vo.GetTennisDetailsResponse)
I currently have the following configuration:-


I have searched the internet and found the following example that uses class CdataJaxb2Marshaller that extends Jaxb2Marshaller
The example uses String[] cdataElements, that is spring injected in, but I need to use GetTennisDetailsResponse

Here is the example



Can anybody help.

Mat

Mat Anthony
Ranch Hand

Joined: May 21, 2008
Posts: 237
Hi All,
I think all I have to do to this is


I think that this then searches the the response object (i.e. GetTennisDetailsResponse) that has been converted into xml via jaxb for
a tag named specification. I think that this then uses the specification tag to be handled as CDATA.
Please can somebody confirm that if this is correct.

Mat
Mat Anthony
Ranch Hand

Joined: May 21, 2008
Posts: 237
Hi All,
I'm currently getting the following error:-
java.lang.ClassCastException: org.springframework.ws.soap.axiom.AxiomResult
on calling:-


It looks like you cannot cast the result (i.e. javax.xml.transform.Result) to OutputStream


Can anybody help?
Mat

Mat Anthony
Ranch Hand

Joined: May 21, 2008
Posts: 237
Hi All,
I have still got a problem with trying to marshall data using CDATA with spring ws and jaxb.
I have tried the above approach, but I cant get it to work?

Mat
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Spring WS JAXB CDATA issue