The receiving system should provide you with either a schema (I prefer a schema) or a DTD for the messages they will receive.
You then compile the schema/dtd using the XML Tool in the GUI. The result of that compile is then used by an Xlate as the OB message structure.
The SOAP and potentially WSDL envelopes I believe are added within the CAA-WS addin. I don’t have hands on experience with that addin.
I typically also compile the XML Schema in a 3rd party XML tool (like Oxygen or XML Spy) as further validation of the proper structure of the schema/dtd. Those tools may also give you more information regarding issues with the schema/dtd.
Inside the Xlate it is just like any other message structure in that you need to understand the structure but you just use COPYs, ITERATEs, etc.
Of course you could also use Tcl to do the whole thing. Not what I would do.
email: jim.kosloskey@jim-kosloskey.com 29+ years Cloverleaf, 59 years IT - old fart.