You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Cheng Po-wen <st...@itri.org.tw> on 2003/09/09 04:06:43 UTC
multiRef & Schema Checking
Hi, all:
I try to check the validation of the following message which is
generated from the Axis client(WSDL2Java,.....) :
<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body>
<ns1:KeywordSearchRequest
soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:ns1="http://soap.amazon.com">
<KeywordSearchRequest href="#id0"/>
</ns1:KeywordSearchRequest>
<multiRef id="id0" soapenc:root="0"
soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
xsi:type="ns2:KeywordRequest"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:ns2="http://soap.amazon.com">
<keyword xsi:type="xsd:string">dog</keyword>
<page xsi:type="xsd:string">1</page>
<mode xsi:type="xsd:string">book</mode>
<tag xsi:type="xsd:string">webservices-30</tag>
<type xsi:type="xsd:string">lite</type>
<devtag xsi:type="xsd:string">your-dev-tag</devtag>
<sort xsi:type="xsd:string" xsi:nil="true"/>
<locale xsi:type="xsd:string" xsi:nil="true"/>
<price xsi:type="xsd:string" xsi:nil="true"/>
</multiRef>
</soapenv:Body>
</soapenv:Envelope>
I use Xerces 2.5 to check the validation of the message above,
and it tells me the following error messaage:
[Error] KeywordSearchRequestSample_gen.xml:15:39:
cvc-complex-type.3.2.2:
Attribute 'id' is not allowed to appear in element 'multiRef'.
[Error] KeywordSearchRequestSample_gen.xml:15:39:
cvc-complex-type.3.2.2:
Attribute 'soapenc:root' is not allowed to appear in element
'multiRef'.
[Error] KeywordSearchRequestSample_gen.xml:15:39:
cvc-complex-type.3.2.2:
Attribute 'soapenv:encodingStyle' is not allowed to appear in
element 'multiRef'.
[Error] KeywordSearchRequestSample_gen.xml:22:48: cvc-elt.3.1:
Attribute 'http://www.w3.org/2001/XMLSchema-instance,nil' must not
appear on element 'sort',
because the {nillable} property of 'sort' is false.
[Error] KeywordSearchRequestSample_gen.xml:23:50: cvc-elt.3.1: Attribute
'http://www.w3.org/2001/XMLSchema-instance,nil' must not
appear on element 'locale', because the {nillable} property of
'locale' is false.
[Error] KeywordSearchRequestSample_gen.xml:24:49: cvc-elt.3.1: Attribute
'http://www.w3.org/2001/XMLSchema-instance,nil' must not appear on
element 'price',
because the {nillable} property of 'price' is false.
It seems that the SOAP Message is not vallid????
Does anyone know how to solve this problem??
Sting