Forums Register Login

JAX-WS: Always return String as CDATA.

+Pie Number of slices to send: Send
Hi guys,

I'm using JAX-WS in order to implement a web service. The web service receives XML as parameter and returns XML. I use Java Strings for this (i.e. the XML data comes as string and gets returned as a string):



Now when I return small XML instances (with few < and >), the String is not wrapped within CDATA but instead the < are parsed into <. However if the instances that are returned are big enough, suddenly my web service packs everything into a CDATA passage.
The latter is actually what I want: I want every string to be represented as a CDATA field. But my service won't return the short XML instances as CDATA. Is there any way to force JAX-WS to always return the string within a CDATA passage?
They weren't very bright, but they were very, very big. Ad contrast:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 2631 times.
Similar Threads
Need info about deployment descriptors required on IBM websphere for webservice
Webservices made easier ?
Can't generate java classes from WSDL file
CDATA
[JAX-WS] XML String as webmethod return parameter
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 06:14:18.