I need some help with a Validator error I am getting when I validate an inbound XML document. If I validate the document in XML Spy with the same schema it validates OK. However with the Mediator validator I get the following error:
“TargetNamespace.2: Expecting no namespace, but the schema document has a target namespace of ‘http://www.polaris-uk.co.uk/Schema/1/TradesmanAllNBRq’.”
The root node in the schema does indeed specify the target namespace:
<xs:schema xmlns=“http://www.polaris-uk.co.uk/Schema/1/TradesmanAllNBRq” xmlns:xs=“http://www.w3.org/2001/XMLSchema” targetNamespace=“http://www.polaris-uk.co.uk/Schema/1/TradesmanAllNBRq” elementFormDefault=“unqualified” attributeFormDefault=“unqualified”>
The root node of the XML being validated also declares this namespace:
<m:TradesmanAllNBRq xmlns:m=“http://www.polaris-uk.co.uk/Schema/1/TradesmanAllNBRq” Id="" MessageVersion="">
The message itself was generated in XML Spy from a WSDL file. The WSDL was constructed in Mediator from the schema now being used for validation.
Is this inconsistent behaviour causeed by something in the message or schema or is it something to do with the validator? Is there a way to ‘fix’ the problem to allow me to validate the inbound request?
Mediator v126.96.36.199 is being used.
MsgSchemaTradesmanAllNBRq.xsd (126 KB)