For an integration to a custom solution I have been asked to extend the logic so that if there are two resources attached to an order, the node saying resources should be listed twice.
The add-on, simplified, is that the resource/person assembling the order is moved to the header, so that when the external software handling the scheduling and assembling the resource is at the top level.
If you imagine that the xml is as follows, you get the idea.
Now they want the solution to handle that sometimes the person assembling the order needs help, and so there are two resources on the order. The logic on the assembly software is set up so that if there are more than 1 node with resource, then the first is the person responsible and everyone else is helping.
So now I need to make two nodes with Resource.
If the integration would have been made using DOM management originally, I would just add the extra node when needed and be done with it. However, since this originally has been made using XMLports, I now face remaking the entire thing or somehow making the XMLport add a resource node if needed.
Since I can define the Min/Max Occurs, it suggests that this could be possible, but I don't see any way of actually achieving this. I can add another Resource node to the XMLPort, but messes up the wdsl, so I am a bit stomped.
Does anybody know how I can make the XMLPort do what I need, or am I stuck with moving everything to being handled by codeunits?
Don't just take my word for it, test it yourself