Understanding XML validation in switchyard.xml

Solution Verified - Updated -

Issue

  • I am having a hard time understanding this example: validate-xml
  • In switchyard.xml I see the following blocks but I cannot see how this is connected to the in/out messages.

    <transforms>
        <transform.xslt xmlns="urn:switchyard-config:transform:1.0" from="{urn:switchyard-quickstart:validate-xml:0.1.0}order" to="{urn:switchyard-quickstart:validate-xml:0.1.0}orderAck" xsltFile="xslt/order.xslt" failOnWarning="false"/>
    </transforms>
    <validates>
        <validate.xml xmlns="urn:switchyard-config:validate:1.0" name="{urn:switchyard-quickstart:validate-xml:0.1.0}order" schemaType="XML_SCHEMA" namespaceAware="true">
            <schemaFiles>
                <entry file="/xsd/orders.xsd"/>
            </schemaFiles>
            <schemaCatalogs>
                <entry file="/xsd/catalog.xml"/>
            </schemaCatalogs>
        </validate.xml>
    </validates>
    
  • For example, what does name="{urn:switchyard-quickstart:validate-xml:0.1.0}order" mean in this line?

    <validate.xml xmlns="urn:switchyard-config:validate:1.0" name="{urn:switchyard-quickstart:validate-xml:0.1.0}order"
    
  • Is there a place where I can understand the switchyard.xml structure?

  • Should the "<validates>" be configured manually or is there a GUI option to configure it?
  • How can I configure the "<validates>" in the GUI?

Environment

  • Red Hat JBoss Fuse (Fuse)
    • 6.2
  • Red Hat JBoss Fuse Service Works (FSW)
    • 6.0
  • SwitchYard

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In