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="https://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="https://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="https://www.w3.org/2001/XMLSchema">


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

















Rank: #4063


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.


Peter Braat