Marko,
You cannot include the sequence ]]> because it will terminate the CDATA section prematurely.
This is an example of an invalid xml document:
<?xml version="1.0" encoding="utf-8"?>
<content>
<![CDATA[This string of characters can contain XML tags like
<person>
<firstname>John</firstname>
<lastname>Doe</lastname>
</persons>
even if they are not well formed but if you insert the CDATA end character sequence]]>the string will be truncated and maybe the application will show an error message]]>
</content>
Of course, it's going to be rare for you to use the CDATA ending character sequence... unless you are writing an XML tutorial and you store your content in XML files.
Regarding your concern that PB doesn’t generate objects or structures to handle the XML structure I think we’re mixing concepts here. As far as my knowledge goes PowerBuilder will generate user objects and structures based on the WSDL file (in itself an XML file) which describes how the XML communication request documents must be constructed by the web service client and what data types should be expected from the response documents.
This WSDL file along with other possible associated XSD files (schema files) tell the programming language what datatypes are going to be used in the communication process. So PB generates objects and structures to handle the elements and attributes of the request and response XML documents. And if the XML structure is sent as a string by the web service then PB will generate a string variable to store it, but it won’t parse it because there is no reason to do it. So you must parse it yourself for your application purposes using DOM or some other technique.
But the XML datatype specification does have an XML Type that could be used for what you want to do. Personally, I’ve never used those datatypes so I cannot help you anymore with this. And it needs to be seen if PB can handle such datatypes.
Our experience in web services is limited to one project in which we had to call a web service which in turn returned an XML document (electronic invoice) as one of the attributes using base64binary. We didn’t have to do any parsing with the XML document, just store it as a file. But the WSDL file had many complex types defined so we learned a lot about PB web service proxies.
Maybe someone else can shed some light on this.
Best,
Ricardo