Modify SOAP response structure of exposed SOAP service

Hi All,

Not sure if this makes sense, but I'm trying to modify the below SOAP response before returnng the result to the caller. I need to change the tags in bold from <CASAUser> and <CASARole> to <User> and <Role> respectively as the consuming service requires it in that specific format. 


Normally this would be done by defining the structure as Role and User, but as these names are already there, service studio changes them to Role2 and User2 for me. Wondering if there is a way to manipulate the tags before sending out the response. 


<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">

   <soap:Body>

      <QueryiEnforceUserRoleServiceResponse xmlns="http://www.outsystems.com">

         <Users>

            <CASAUser>

               <netw_id>admin</netw_id>

               <apln_m>iEnforce</apln_m>

               <emp_type_m>Internal</emp_type_m>

               <cmpy_m/>

               <roles>

                  <CASARole>

                     <role_m>ENF_Administrator</role_m>

                  </CASARole>

               </roles>

            </CASAUser>

         </Users>

      </QueryiEnforceUserRoleServiceResponse>

   </soap:Body>

</soap:Envelope>

Hi,


I use the record data type option to allow different names to be used in the generated XML from the attribute/structure names. 

lstERP_Stock local variable has the DataType Stocks Record List

. Stocks refers to the structure with the name ERP_AvailableStocks. 

The name Stocks at the left can be edited within Service Studio in the "data type record editor" to anything you like.

Something similar is done for attribute AvailableStocks which is a reference to a structure with the name D365_AvailableStock..

When converting this Records List with some records to XML using the following settings it generates the XML shown below:


XML Generated

As you can see the names defined in the XML correspond to the names specified in the "data type record editor" (not sure if this is the correct name for this editor).


May be you can try this record datatype usage in your structure(s) yourself and get the XML with the required names.


Regards,


Peter Braat