If you want to use a copybook that contains REDEFINES in the outgoing section combined with an autogenerated webservice, you first have to install the HOTFIX KB939352 in order to make it work. If you are working in a self-hosted model you don’t have to install this FIX.
The error you get without this FIX is the following : There was an error generating the XML document.
When you want to use the union structures (REDEFINES) in a webservice, you have to create dummy structures in the TI Designer and associate the unions to these structures.