Webservice response  - XML data from oracle

Webservice response  - XML data from oracle

  
We have a generic structure mounted in Oracle/.Net used for  various purposes (webservices, lookups used in enterprise applications, Searches, Listing services etc).

We are migrating the webservices part from .Net to Outsystems.
 
The current implementation has just a single endpoint/webmethod available to all the webservice calls and the work is done in oracle. (we have to keep it that way as most of the enterprise solutions are mounted based on it).
 
We managed to implement most of the functionalities for a generic solution except in the response part.
 
The problem is that the xml response from oracle is always encoded with “<![CDATA[“ by outsystems and we want it to be interpreted as XML,  the webservice output parameter is defined as a text datatype since the response can vary based on the service called (Text data type is the closest we could use since we don’t have any other output datatype in outsystems to achive this).
 
After searching the forums and articles, we dont think this solution could be achieved, based on the the way response is presented by outsystems webservices,

The only way we  have is to construct record/recordlist output for each webservice individually. 
 
The main problem is that we have lots of services, with varying complexity in xml response structure, and we are looking to avoid creating an output structure for each service in Outsystems.

Another benefit we have today is that whenever we want to tweak with the response (add an element, remove an element, change element datatype etc..) we just have to take care of it in oracle.
 
I am posting this to see if anyone could help with the current solution we’re are looking for and perhaps outsystems could look into something like “xmldatatype” in future releases.
 
Here is the example of  the request/response scenarios in .Net and Outsystems.
 
Sample Request
       <out:RequestInformton>
         <out:xmlin>
            <out:Provider>2013_RW</out:Provider>
            <out:Authentication>
                               <out:Identification>
                                               <out:Username>xxxxxxxxxx</ out:Username>
                                               <out:Password>xxxxxxxxxx</ out:Password>
                               </out: Identification>
<out:Token>TIAoxIDAgb2JqIAo8PCAKL1R5cGUgL0NhdGFsb2cgCi9QYWdlcyAyIDAgUiAKL1BhZ2VNb2RlIC9Vc2VOb25lIAovVmlld2VyUHJlZmVyZW5jZXMgPDwgCi9GaXRXaW5kb3cg </out:Token>
</out: Authentication >
            < out:ServiceName>CHECK_EMPLOYEE_VALIDITY</out:ServiceName >
             <out:Filters>
                               <out:FilterInfo>
                                               <out:FieldName>IDNumber</out:FieldName>
                                               <out:FieldValue>100</out:FieldValue>                                             
                               </out:FilterInfo>                                           
                               <out:FilterInfo>                                             
                                               <out:FieldName>Department</out:FieldName>
                                               <out:FieldValue>IT</out:FieldValue>                                                                                
                               </out:FilterInfo>
                               <out:FilterInfo>                                             
                                               <out:FieldName>Name</out:FieldName>
                                               <out:FieldValue>MARIA</out:FieldValue>                                                                                     
                               </out:FilterInfo>
            </out:Filters>
         </out:xmlin>
      </out:RequestInformton >

Sample successful response  - current senario
 
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
   <soap:Body>
      <ServiceResponse xmlns="http://www.abc.com/services/">
         <ServiceResult>
            <ROWSET xmlns="">
               <ROW>
                  <IsValid>N</IsValid>
                  <Detail>
                     <Employee>
                        <EmpNumber>00107738500005100</EmpNumber>
                        <EmpName>CARLOS DIAS</EmpName>
                          <Expirydate>15/10/2004</Expirydate>
                     </Employee>
                  </Detail>
               </ROW>
            </ROWSET>
         </ServiceResult>
      </ServiceResponse>
   </soap:Body>
</soap:Envelope>
 
Sample error response  - current scenario
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
   <soap:Body>
      <ServiceResponse xmlns="http://www.abc.com/services/">
         <ServiceResult>
               <soap:Error>
                  <soap:ErrorText>Token is invalid/you are  not authenticated to access this service.</soap:ErrorText>
                  <soap:ErrorCode>111013</soap:ErrorCode>
               </soap:Error>
         </ServiceResult>
      </ServiceResponse>
   </soap:Body>
</soap:Envelope>
 
 
Outsystem webservice response
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
   <soap:Body>
      <ServiceResponse xmlns="http://www.abc.com/services/">
         <ServiceResult>
            <![CDATA[<ROWSET>
               <ROW>
                  <IsValid>N</IsValid>
                  <Detail>
                     <Employee>
                        <EmpNumber>00107738500005100</EmpNumber>
                        <EmpName>CARLOS DIAS</EmpName>
                          <Expirydate>15/10/2004</Expirydate>
                     </Employee>
                  </Detail>
               </ROW>
            </ROWSET>]]>
         </ServiceResult>
      </ServiceResponse>
   </soap:Body>
</soap:Envelope>