Hi,

I've just created a new proxy service, which should validate the
received xml file against a particular schema. If the validation fails,
a log message should be written. If the validation went ok, the message
should be delivered to a certain directory via fileshare.
Find below my proxy service:

<?xml version="1.0" encoding="UTF-8"?>
<proxy xmlns="http://ws.apache.org/ns/synapse";
name="validateXMLProxyNDV" transports="http" startOnLoad="true"
trace="enable">
    <target endpoint="fileshareEndpointNDV" faultSequence="fault">
        <inSequence>
            <log level="full" separator=",">
                <property name="MESSAGE" value="*** Message received
***"/>
            </log>
            <property name="FORCE_SC_ACCEPTED" value="true"
scope="axis2"/>
            <validate
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
source="//huisdier">
                <schema key="conf:/repository/NBB/NDV/huisdier.xsd"/>
                <on-fail>
                    <log level="custom" separator=",">
                        <property name="MESSAGE" value="*** XML file is
not valid ***"/>
                    </log>
                </on-fail>
            </validate>
            <log level="custom" separator=",">
                <property name="MESSAGE" value="*** Message is valid
***"/>
            </log>
            <property name="OUT_ONLY" value="true" scope="default"
type="STRING"/>
        </inSequence>
    </target>
</proxy>

But apparently, my message is always written to disk, even if the xml is
invalid. How can I make sure that this delivery is only executed in case
of success ?





-----------------------------------------
Visit our website! http://www.nbb.be

"DISCLAIMER: The content of this e-mail message should not be
construed as binding on the part of the National Bank of Belgium
(NBB) unless otherwise and previously stated. The opinions
expressed in this message are solely those of the author and do not
necessarily reflect NBB viewpoints, particularly when the content
of this message, or part thereof, is private by nature or does not
fall within the professional scope of its author."

Reply via email to