Wolfgang, you are a legend.
Thank you.
Andy
________________________________
From: Wolfgang Laun [mailto:wolfgang.laun_at_gmail.com]
Sent: 23 February 2009 21:14
To: users_at_jaxb.dev.java.net
Subject: Re: Re: Re: Mapping interfaces
Assuming that there is an abstract base class Abstract*porter and the
classes for a *porter are its subclasses then I suggest these
annotations, detailing the possible tags and classes representing the
content node, like this:
@XmlElementWrapper(name="exporters",namespace="")
@XmlElements({
@XmlElement(name = "fileSystemExporter",
type = FileSystemExporter.class),
@XmlElement(name = "jmsExporter",
type = JmsExporter.class)
})
public List<AbstractExporter> getAbstractExporters() {
return abstractExporters;
}
-W
On Mon, Feb 23, 2009 at 6:45 PM, Andrew Mansfield <AMansfie_at_globeop.com>
wrote:
They can basically be anything. Examples would be File*porter,
Mq*porter, Soap*porter etc.
A
________________________________
From: Wolfgang Laun [mailto:wolfgang.laun_at_gmail.com]
Sent: 23 February 2009 17:04
To: users_at_jaxb.dev.java.net
Subject: Re: Re: Mapping interfaces
<configuration> contains <importers>, <exporters> and
<messageStores>. The latter is a wrapper for a list of messageStore
objects, and there is a <messageStore> element in the schema. The
<*porters> tags will bracket arbitrary objecs (@XmlAnyType), and that
appears to be in contradiction to List<*porter>.
There is a <fileSystemExporter> element in the schema, but I see
no way that the unmarshaller would associate this with the contents of
the <*porters> tags.
For a quick fix, restrict one or both List<*porter> to
List<fileSystem*porter> and rename the Java field name.
What else could occur in these lists?
-W
On Mon, Feb 23, 2009 at 4:47 PM, Andrew Mansfield
<AMansfie_at_globeop.com> wrote:
Hi,
Thanks for responding. Sample xml attached. Message
store unmarshalling works just fine, even though the messageStoreFilter
element is using exactly the same mechanism as importers / exporters??
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<configuration>
<exporters>
<fileSystemExporter>
<enabled>true</enabled>
<name>test</name>
<batchTrades>true</batchTrades>
<concurrentListeners>1</concurrentListeners>
<fixedDelay>1</fixedDelay>
<outputFileFolder>test</outputFileFolder>
</fileSystemExporter>
</exporters>
<importers>
<fileSystemImporter>
<enabled>true</enabled>
<name>importer</name>
<concurrentListeners>1</concurrentListeners>
<fixedDelay>1</fixedDelay>
<deleteOriginalFile>false</deleteOriginalFile>
<filePattern>ddd</filePattern>
<receiveFolder>ccccd</receiveFolder>
</fileSystemImporter>
</importers>
<messageStores>
<messageStore>
<enabled>true</enabled>
<name>testStore</name>
<xpathMessageStoreFilter>
<name>testFilter</name>
<xpathQueryString>querrystring</xpathQueryString>
</xpathMessageStoreFilter>
<messageStoreHandlers>
<messageStoreHandler>
<xmlTransformer>
<name>testTransformer</name>
</xmlTransformer>
<name>testHandler</name>
<scope>com</scope>
</messageStoreHandler>
<messageStoreHandler>
<swiftTransformer>
<name>swift</name>
<messageFlowName>Testflow</messageFlowName>
<messageIn>541</messageIn>
<messageOut>GOML</messageOut>
</swiftTransformer>
<name>testhandler</name>
<scope>com</scope>
</messageStoreHandler>
</messageStoreHandlers>
</messageStore>
</messageStores>
</configuration>
________________________________
From: Wolfgang Laun [mailto:wolfgang.laun_at_gmail.com]
Sent: 23 February 2009 15:26
To: users_at_jaxb.dev.java.net
Subject: Re: Mapping interfaces
On Mon, Feb 23, 2009 at 3:25 PM, Andrew Mansfield
<AMansfie_at_globeop.com> wrote:
Any one have any ideas why importers and
exporters are never unmarshalled ?
Not easily, without a sample of the XML you're
unmarshalling.
-W
________________________________
This email with all information contained herein or
attached hereto may contain confidential and/or privileged information
intended for the addressee(s) only. If you have received this email in
error, please contact the sender and immediately delete this email in
its entirety and any attachments thereto.
(W1)
________________________________
This email with all information contained herein or attached
hereto may contain confidential and/or privileged information intended
for the addressee(s) only. If you have received this email in error,
please contact the sender and immediately delete this email in its
entirety and any attachments thereto.
(W1)
--------------------------------------------------------------------------
This email with all information contained herein or attached hereto may contain confidential and/or privileged information intended for the addressee(s) only. If you have received this email in error, please contact the sender and immediately delete this email in its entirety and any attachments thereto.
(W1)