Hi Devs,
I'm using CXF Jax-rs libs. Did some google searching on the $subject and
since im using,
org.apache.cxf.jaxrs.provider.json.JSONProvider, i made use of
org.apache.cxf.jaxrs.utils.schemas.SchemaHandler to validate my input
against my schema.
I get an input similar, to,
{
"id": "AWSEC2AsiaPacificPartition1",
"provider": "ec2",
"property": [
{
"name": "region",
"value": "ap-southeast-1"
}
],
"partitionMin": "1",
"partitionMax": "3"
}
I cant figure out how to model property array in xmlSchema without using a
wrapping element. And it gives an error at the moment.
The schema portion i use to validate the property array..
<xs:element name="property" minOccurs="1" maxOccurs="1">
<xs:complexType>
<xs:sequence>
<xs:element name="property" minOccurs="0"
maxOccurs="unbounded">
<xs:complexType>
<xs:sequence>
<xs:element name="name"
minOccurs="1" maxOccurs="1" nillable="false"/>
<xs:element name="value"
minOccurs="1" maxOccurs="1" nillable="false"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
Am i doing the correct thing, May be im missing a trivial thing. Is it
possible at all.
thanks in advance...
--Pradeep