My schema is:
<xsd:element name="SetMonitor">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="period" type="xsd:long" />
<xsd:element name="refreshrate" type="xsd:long" />
</xsd:sequence>
</xsd:complexType>
</xsd:element>
And my xml will be:
Case 1.
<SetMonitor
xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:cb="http://schemas.cordys.com/1.0/coboc">
<period/>
<refreshrate/>
</SetMonitor>
OR Case 2.
<SetMonitor
xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:cb="http://schemas.cordys.com/1.0/coboc">
<period>10</period>
<refreshrate>20</refreshrate>
</SetMonitor>
For case 2 there are no issues. But for case 1 I get the following error:
Caused by: org.xml.sax.SAXException: cvc-datatype-valid.1.2.1: '' is not a valid value for 'integer'.
org.xml.sax.SAXParseException; lineNumber: 6; columnNumber: 14; cvc-datatype-valid.1.2.1: '' is not a valid value for 'integer'.
How can i modify the wsdl so that it accepts both case 1 and case 2? Please help.