[prev in list] [next in list] [prev in thread] [next in thread]
List: wsf-javascript-user
Subject: [User] Validate mediator and left angle bracket
From: Maeglin Vardamir <belcon () gmail ! com>
Date: 2012-09-20 8:19:51
Message-ID: CACVTwgAcY+e-AJfrc7+yZOeJMhp4siupeYNzS6WsQeSK+8wcPQ () mail ! gmail ! com
[Download RAW message or body]
[Attachment #2 (multipart/alternative)]
Hi all,
I am trying to use validate mediator to validate xml data against XSD file.
But I just found it didn't work. The validation always failed because the
left angle bracket was transformed to < before it was validated.
This is my proxy file.
<?xml version="1.0" encoding="UTF-8"?><proxy xmlns="
http://ws.apache.org/ns/synapse" name="schemavalidate" transports="https
http" startOnLoad="true" trace="disable">
<description/>
<target>
<inSequence>
<log level="full"/>
<validate>
<schema key="fpavschema"/>
<on-fail>
<log level="full"/>
<makefault version="soap12">
<code xmlns:soap12Env="
http://www.w3.org/2003/05/soap-envelope" value="soap12Env:VersionMismatch"/>
<reason value="Bad format"/>
</makefault>
<send/>
</on-fail>
</validate>
</inSequence>
</target>
</proxy>
Does anyone have any idea about that? If I added a mediator to change <
back to '<', I can pass the validation but backend web service would fail.
If I added another mediator to change '<' back to < again before send
the request to the backend, all things work without problems. But I doubt
that is not the correct way. There must be something wrong about the
configuration, such as 'messageFormatter' or 'messageBuilder'. But I didn't
get a clue.
Here is workable in-sequence.
'<' to '<' mediator ----------> validate mediator ----------> '<' to
'<' mediator ---------------> backend web service
Regards,
Bin
[Attachment #5 (text/html)]
Hi all,<div><br></div><div>I am trying to use validate mediator to validate xml data \
against XSD file. But I just found it didn't work. The validation always failed \
because the left angle bracket was transformed to &lt; before it was \
validated.</div> <div><br></div><div>This is my proxy \
file.</div><div><br></div><div><div><?xml version="1.0" \
encoding="UTF-8"?><proxy xmlns="<a \
href="http://ws.apache.org/ns/synapse">http://ws.apache.org/ns/synapse</a>" \
name="schemavalidate" transports="https http" \
startOnLoad="true" trace="disable"></div> <div> \
<description/></div><div> <target></div><div> \
<inSequence></div><div> <log \
level="full"/></div><div> <validate></div><div> \
<schema key="fpavschema"/></div> <div> \
<on-fail></div><div> <log \
level="full"/></div><div> <makefault \
version="soap12"></div><div> <code \
xmlns:soap12Env="<a \
href="http://www.w3.org/2003/05/soap-envelope">http://www.w3.org/2003/05/soap-envelope</a>" \
value="soap12Env:VersionMismatch"/></div> <div> \
<reason value="Bad format"/></div><div> \
</makefault></div><div> <send/></div><div> \
</on-fail></div><div> </validate></div> <div> \
</inSequence></div><div> \
</target></div><div></proxy></div></div><div><br></div><div>Does anyone \
have any idea about that? If I added a mediator to change &lt; back to \
'<', I can pass the validation but backend web service would fail. If I \
added another mediator to change '<' back to &lt; again before send \
the request to the backend, all things work without problems. But I doubt that is not \
the correct way. There must be something wrong about the configuration, such as \
'messageFormatter' or 'messageBuilder'. But I didn't get a \
clue.</div> <div><br></div><div>Here is workable \
in-sequence.</div><div><br></div><div>'&lt;' to '<' mediator \
----------> validate mediator ----------> '<' to '&lt;' \
mediator ---------------> backend web service</div> \
<div><br></div><div><br></div><div>Regards,</div><div> Bin </div>
_______________________________________________
User mailing list
User@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/user
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic