How to transform with xquery from CDATA to XML
KnorrarAug 29 2012 — edited Oct 25 2012Hi everyone
I want to transform from CDATA to XML and I don´t know how to do.
anyone can help me please?
I'm using OSB OEPE PS3, I have artifacts: person.PROXY, person.BIZ, BIZ-Person.WSDL, PROXY-Person.WSDL, Person-response.xq and Person.xsd.
I Use Message Flow Within Route, Routing (Request and Response Actions)
To Request Xquery transformation is ok, for Response Action I need help. I receive a String and inside with CDATA:
+<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">+
+<soapenv:Body>+
+<executeResponse soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">+
+<executeReturn xsi:type="xsd:string">+
+*<![CDATA[<example-data rows="1"><person><id>123</id><name>JHON</name><surname>MAGNESS</surname>+*
*+<code>123456789V</code></person></example-data>]]>+*
+</executeReturn>+
+</executeResponse>+
+</soapenv:Body>+
+</soapenv:Envelope>+
I want to map from CDATA to XML like this (Person.xsd):
<xs:schema xmlns="http://www.domain.com/XSD/Persons" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:ns1="http://www.domain.com/XSD/ABCD" targetNamespace="http://www.domain.com/XSD/Persons" elementFormDefault="qualified" attributeFormDefault="unqualified">
<xs:import namespace="http://www.domain.com/XSD/ABCD"
<xs:complexType name="Persons">
<xs:sequence>++
<xs:element name="id" type="xs:string"/>
<xs:element name="surname1" type="xs:string" minOccurs="0"/>
<xs:element name="surname2" type="xs:string" minOccurs="0"/>
<xs:element name="name" type="xs:string" minOccurs="0"/>
<xs:element name="code" type="xs:string"/>
</xs:sequence>
</xs:complexType>
Edited by: user10070593 on Aug 29, 2012 10:58 PM
Edited by: user10070593 on Aug 29, 2012 10:58 PM
Edited by: user10070593 on Aug 29, 2012 11:00 PM