I am using the rest2Soap interceptor and I am wondering if there is a way to force single elements into arrays.
For example if I receive the following XML:
<response>
<customer>
<name>John</name>
<surname>White</surname>
</customer>
</response>
it gets translated in {"response": {"customer": {"name" = "John", "surname"= "White"} } }
while I would like it to be: {"response": [ { "name" = "John", "surname"= "White" } ] }
Of course arrays with multiple elements get translated like the latter example.
Is there a simple way to achieve this? I know that I can detect this on the client side, but it seems not the best solution.
Many thanks!
Agostino