5

I have the following xml file:

<?xml version="1.0" encoding="UTF-8"?>
<bindings xmlns="http://java.sun.com/xml/ns/jaxb" 
          xmlns:xs="http://www.w3.org/2001/XMLSchema" 
          targetNamespace="http://java.sun.com/xml/ns/jaxb"
          version="2.1">
    <bindings xs:schemaLocation="Inbound.wsdl#wsdl:types" node="/schema">
        <bindings node="//complexType[@name='TradeIdWithRef']">
            <bindings node=".//attribute[@name='_value']">
                <property name="ValueAttribute"/>
            </bindings>
        </bindings>
        <bindings node="//complexType[@name='Bank']">
            <bindings node=".//attribute[@name='_value']">
                <property name="ValueAttribute"/>
            </bindings>
        </bindings>
        <bindings node="//complexType[@name='Bid']">
            <bindings node=".//attribute[@name='_value']">
                <property name="ValueAttribute"/>
            </bindings>
        </bindings>
        <bindings node="//complexType[@name='addMarketExRequest']">
            <bindings node=".//attribute[@name='_value']">
                <property name="ValueAttribute"/>
            </bindings>
        </bindings>
        <bindings node="//complexType[@name='Offer']">
            <bindings node=".//attribute[@name='_value']">
                <property name="ValueAttribute"/>
            </bindings>
        </bindings>
        <bindings node="//complexType[@name='Price']">
            <bindings node=".//attribute[@name='_value']">
                <property name="ValueAttribute"/>
            </bindings>
        </bindings>
        <bindings node="//complexType[@name='Delta']">
            <bindings node=".//attribute[@name='_value']">
                <property name="ValueAttribute"/>
            </bindings>
        </bindings>
    </bindings>
</bindings>

However I always get the following error upon xml validation:

cvc-elt.1: Cannot find the declaration of element 'bindings'. [5]

Can anyone please help?

pnuts
  • 58,317
  • 11
  • 87
  • 139
balteo
  • 23,602
  • 63
  • 219
  • 412

1 Answers1

3

The schemaLocation attribute must contain the namespace of your schema and the path to the schema definition file, separated by whitespace.

Also, I'm not positive it's an error, but I don't know why you would declare schemaLocation on a child node instead of the root.

Community
  • 1
  • 1
Alex Wittig
  • 2,800
  • 1
  • 33
  • 42