Validator error - Expecting no namespace, but the schema...

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 ‘’.”

The root node in the schema does indeed specify the target namespace:
<xs:schema xmlns=“” xmlns:xs=“XML Schema” targetNamespace=“” elementFormDefault=“unqualified” attributeFormDefault=“unqualified”>

The root node of the XML being validated also declares this namespace:
<m:TradesmanAllNBRq xmlns:m=“” 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 v7.4.2.3 is being used.

Kind regards,
David Sanders
MsgSchemaTradesmanAllNBRq.xsd (126 KB)

Problem solved. The schema has a target namespace but I hadn’t specified this target namespace in the xdb.validator.schema property.

For information, this property can comprise two parts:


So my property had to be set as follows:

xbd.validator.schema=“ …/xsd/MsgSchemaTradesmanAllNBRq.xsd”