Hi,
I have a super abstract class:
@XmlSeeAlso({AndQuery.class, OrQuery.class, NotQuery.class, PropertyQuery.class, MultiQuery.class})
@XmlRootElement
public abstract class Query {
This class has a subclass:
public abstract class MultiQuery extends Query {
and this last super class has also two subclasses: AndQuery and OrQuery annotated with @XmlRootNode.
I also have a PropertyQuery class which extends Query super class.
All it's ok when i do a post like this:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<orQuery>
<query xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="propertyQuery">
<propertyName>SenderContractNumber</propertyName>
<propertyValue>D*</propertyValue>
</query>
<query xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="propertyQuery">
<propertyName>SenderContractNumber</propertyName>
<propertyValue>A*</propertyValue>
</query>
<query xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="andQuery">
<query xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="propertyQuery">
<propertyName>documentNumber</propertyName>
<propertyValue>222</propertyValue>
</query>
<query xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="propertyQuery">
<propertyName>documentNumber</propertyName>
<propertyValue>222</propertyValue>
</query>
</query>
</orQuery>
What i want is to POST an xml like this:
<orQuyery>
<query>...</query>
<andQuery>
<query>...</query>
</andQuery>
</orQuery>
insteand of what i put above.
Can you tell me please what i have to annotate because my OrQuery class expects to see only query nodes not and!
Please help...
Thanks a lot