Forum Discussion

grussell's avatar
grussell
Contributor
14 years ago

Mock Returns XmlException when message contains negative num

I have two different WSDLs and various different mocks in each. One WSDL and it's mocks accept a field <Version> which is an integer and it accepts negative integers, e.g. -1. The other mocks for the other WSDL however returns a soapfault:
org.apache.xmlbeans.XmlException: error: Unexpected character encountered (lex state 9): '0'
When I set <version> to -1 or any number below 0. However it handles -0 and all posivite integers.

I am not sure what the problem is as they are both using the same primitive data type.

WSDL 1
- message1 with <version>
XSD1
- message1 with <name="version" type="pdt:count">
WSDL 2
- message2 with <version>
XSD2
- message2 with <name="version" type="pdt:count">
PDT.xsd
- <xs:simpleType name="count">...<xs:restriction base="xs:integer"/>...

Mock with WSDL1 handles <version>-1</version>
Mock with WSDL2 gives the above error.

Anyone have any ideas/suggestions?

Many thanks.
No RepliesBe the first to reply