I am using the groovy members step type on a service script to capture an XML after invoking.
def myXml=evalElement('myGroup/myData').getElementsByTagName('myBody').item(0)
I can see the output of myXml as expected using loggers
<?xml version="1.0" encoding="UTF-8"
<myBody>
.....whatever....
</myBody>
The script schema has a structure of
<parm>
<output type="group">
<childList type="list">
<grandChildList type="list">
<node1/>
<node2/>
<rawNode type="raw"/>
</grandChildList
</childList>
</output>
</parm>
I am using postman to test this through IWS and it returns with no errors but whatever the node with type="raw"
is not showing up on the response.
I also tried logging the raw node if it has content after the move function, and it did. This is how I used the move method
//these lists have already been used before this line
move(myXml, "parm/output[last()]/childList[last()]/grandChildList[last()]/rawNode")
Any ideas? This myXml has no definite structure. I tried moving to a node with dataType group but it returns a jsonObject stack overflow exception.
Tried moving to string type but it says cant move to non container field.
I even put the raw type node to a simpler place outside lists but it just wont show on response.
This is not a direct solution, but a workaround -- instead of settling on type="raw", I declared every single data area as groups right inside the script schema, and just wrote logic to identify which data area to use when.