I have a webservice function that returns a link.
Currently it returns a link like this:
<link 
xmlns="">http://bess/bess/webservicelinks.do?action=PRINT&amp;token=-5-74-12545112103894622-43847-5666-38-96</link<http://bess/bess/webservicelinks.do?action=PRINT&amp;token=-5-74-12545112103894622-43847-5666-38-96%3c/link>>

This link is not valid in a Browser, since &amp; is not converted into &.
As far as i know i cannot use the same code for encoding & in XML encoding and 
URL encoding.

My solution would be to  enclose the xml link in CDATA
<link 
xmlns=""><![CDATA[http://bess/bess/webservicelinks.do?action=PRINT&token=-1109610571849-56-8525-67-114-68-946950-48]]></link>


Unfortunately, Axis2 will convert part of this line for me, so instead i 
receive:
<link 
xmlns="">&lt;![CDATA[http://bess/bess/webservicelinks.do?action=PRINT&amp;token=-1109610571849-56-8525-67-114-68-946950-48]]&gt;</link>

On the server end im manually addding the CDATA part:
response.setLink("<![CDATA[http://bess/bess/webservicelinks.do?action=PRINT&token="+token+";]]>");

Does anyone know what i can change to get Axis2 or Soap to enclose the data in 
CDATA tags for me?
Should i change my WSDL file? What should i change?
Can i do it from my Java code on the server side? What should i do?

Any help is very much appreciated

With kind regards
Jesper Jensen

Reply via email to