Eric,
If you create an application called schemaService and create the three files
listed below in that folder you can create a RESTful service like I did. In
SOAPUI create a a new project and check the box to Create a new rest service
using your location information. At the end of this message l also provide
the xml for SOAPUI test.
XPL file called 'validate.xpl'
<p:config xmlns:p="http://www.orbeon.com/oxf/pipeline"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:oxf="http://www.orbeon.com/oxf/processors"
xmlns:delegation="http://orbeon.org/oxf/xml/delegation"
xmlns:aopc="http://jnet.state.pa.us/jxdm/aopc"
xmlns="http://jnet.state.pa.us/jxdm/aopc"
xmlns:j="http://www.it.ojp.gov/jxdm/3.0"
xmlns:v="http://orbeon.org/oxf/xml/validation"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<p:param type="input" name="instance"/>
<p:param type="output" name="data"/>
<p:input name="schema" href="test.xsd"/>
<p:processor name="oxf:validation">
<p:input name="config">
<config>
<decorate>true</decorate>
</config>
</p:input>
<!--<p:input name="schema" href="CourtFiling.xsd"/>-->
<p:input name="data" href="#instance"/><p:output name="data" id="data" />
</p:processor>
<!-- prepare config for the file-serializer -->
<p:processor name="oxf:xslt">
<p:input name="data" href="#data"/>
<p:input name="config">
<xsl:stylesheet version="2.0"
xmlns:aopc="http://jnet.state.pa.us/jxdm/aopc"
xmlns="http://jnet.state.pa.us/jxdm/aopc"
xmlns:j="http://www.it.ojp.gov/jxdm/3.0"
xmlns:v="http://orbeon.org/oxf/xml/validation">
<xsl:template match="/">
<document xsi:type="xs:string" content-type="text/plain">
<xsl:copy-of select="/" />
</document>
</xsl:template>
</xsl:stylesheet>
</p:input>
<p:output name="data" ref="data"/></p:config>
</p:processor>
page-flow.xml
<config xmlns="http://www.orbeon.com/oxf/controller">
<page path-info="/schemaService/" view="validate.xpl"></page>
<epilogue url="oxf:/config/epilogue.xpl"/>
</config>
Schema file called test.xsd
<schema xmlns="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://www.example.org/schemaValidation"
xmlns:tns="http://www.example.org/schemaValidation"
elementFormDefault="qualified">
<element name="test" type="tns:testType"></element>
<complexType name="testType">
<sequence>
<element name="select">
<simpleType>
<restriction base="string">
<enumeration value="Yes"/>
<enumeration value="No"/>
</restriction>
</simpleType>
</element>
</sequence>
</complexType>
</schema>
And here is the xml for SOPAUI:
<test xmlns="http://www.example.org/schemaValidation">
<select>No</select>
</test>
If you put in Yes or No the validation succeeds. Anything else the Orbeon
HTML error is thrown instead of decorating mode with error tags.
Let me know if you need anything else.
Brian Steuhl
http://btmsoftwaresolutions.com BTM Software Solutions
--
View this message in context: http://orbeon-forms-ops-users.24843.n4.nabble.com/Validation-Response-tp3230774p3318315.html
Sent from the Orbeon Forms (ops-users) mailing list archive at Nabble.com.
--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
Free forum by Nabble | Edit this page |