Neither is a solution because the tag name is not fixed. It varies depending on the message.
I'll log a support call. "Marvin Tener" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Two options: > 1) change the property name to be the desired element name (Payload? in this > case) or > 2) add XMLNAME="Payload" or what ever is correct element name to the > property called any.. > > Marvin > > "Wendy Griffiths" <[EMAIL PROTECTED]> wrote in > message news:[EMAIL PROTECTED] > > After greater inspection I have realised that your solution still isn't > > quite working > > correctly. The tagname of my content message now comes out as "any" the > > name of the property. > > I have tried geting the Abstract PayloadAny class to inherit from > > %XML.Element and setting it's > > tagname property, but the tag still comes out as any and I just get an > extra > > <Tagname>ContentMessageTag</Tagname> in the XML. > > I have also noticed I have a number of extra tags namely > > <Local>false</Local> that appear after the payload message tags and after > > the wrapper tag. > > > > On a brighter note I have managed to get rid quite a bit of code by making > a > > number of my sub-object serial classes. > > > > thanks > > Wendy > > > > > > "Marvin Tener" <[EMAIL PROTECTED]> wrote in message > > news:[EMAIL PROTECTED] > > > 1. Try the following: Create a class called AbstractPayload which is > an > > > XML enabled abstract class. Inherit all payload objects from this > class. > > > Change the type of the payload list property to be AbstractPayload and > add > > > the XMLPROJECTION="element" property parameter to the payload property. > > The > > > using RootObject for wrapper should do all that you need. > > > > > > 2. If the different payloads are in different namespaces, manage this > by > > > using the NAMESPACE parameter in each class to specify the XML namespace > > > that the class should be in. > > > > > > 3. If you are building these pieces up not using classes, just use > > > RootElement for the top level containing element. Then use Element > method > > > for each of the other tags. > > > > > > 4. The way to get the embedded classes (like Address) to be > automatically > > > instantiated is to make them serial classes. This works with either > > > registered or persistent objects. Sample.Address in Sample.Person is an > > > example with persistent classes, but he same works for subclasses of > > > %RegisteredObject. See Sample package that is in the SAMPLES namespace. > > > > > > 5. In some cases, the write command is just about as easy. However, > most > > > of the time, using %XML.Writer gives a more descriptive approach with > less > > > code and easier maintenance as well as automatic handling of XML > > namespaces. > > > > > > Marvin > > > > > > > > >
