Validation Response

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

Validation Response

bsteuhl
Another issue with Validation Processor.  IS there a way to get the error message back as XML?  We are dealing with an XML application and the response is not coming back as XML.  How would orbeon handle the response stream?  This is the error we are receiving when calling the Validation Processor as a REST service from Intalio which requires the response to be XML:

Response Content-Type [text/html;charset=utf-8] does not describe XML entities. Faults must be XML.
Reply | Threaded
Open this post in threaded view
|

Re: Validation Response

bsteuhl
I must have the decorate or processor wrong because if I read the validation processor correctly it states that the pipeline should not be interrupted with and error but rather with an added element for each element next to the element within the xml file?

Here is my processor:

<p:processor name="oxf:validation">
                <p:input name="config">
                        <decorate>true</decorate>
                </p:input>
                <p:input name="schema" href="CourtFiling.xsd"/>
                <p:input name="data" href="#instance"/>
                <p:output name="data" ref="data" />
        </p:processor>

Do I have something wrong?  And if so, if corrected should I get an xml file as the data output?  Thank you.
Reply | Threaded
Open this post in threaded view
|

Re: Re: Validation Response

Erik Bruchez
Administrator
Yup I think you need:

<config><decorate>true</decorate></config>

-Erik

On Fri, Jan 21, 2011 at 5:40 PM, bsteuhl <[hidden email]> wrote:

I must have the decorate or processor wrong because if I read the validation
processor correctly it states that the pipeline should not be interrupted
with and error but rather with an added element for each element next to the
element within the xml file?

Here is my processor:

<p:processor name="oxf:validation">
               <p:input name="config">
                       <decorate>true</decorate>
               </p:input>
               <p:input name="schema" href="CourtFiling.xsd"/>
               <p:input name="data" href="#instance"/>
               <p:output name="data" ref="data" />
       </p:processor>

Do I have something wrong?  And if so, if corrected should I get an xml file
as the data output?  Thank you.
--
View this message in context: http://orbeon-forms-ops-users.24843.n4.nabble.com/Validation-Response-tp3230774p3230928.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




--
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
Reply | Threaded
Open this post in threaded view
|

Re: Re: Re: Validation Response

bsteuhl
I have that below?  Input is a required tag, with name attribute.  And then doesn't decorate stand where it is at.  If I try any other combination Orbeon throws a processor error.  The way I have it successfully completes?
 

Brian Steuhl
Website: http://BTMSoftwareSolutions.com

Website: http://BTMDeals.com
Business Email: [hidden email]
Cell: 908-421-0742

Home Office: 732-961-3187

Google Voice: 732-800-1286 (1BTM)

BTM Deals Alert Sign Up Form
RSS Feed To My Blog:

Business Process Modeling - BTMSoftwareSolutions.com




From: Erik Bruchez <[hidden email]>
To: [hidden email]
Sent: Tue, January 25, 2011 12:16:59 AM
Subject: [ops-users] Re: Re: Validation Response

Yup I think you need:

<config><decorate>true</decorate></config>

-Erik

On Fri, Jan 21, 2011 at 5:40 PM, bsteuhl <[hidden email]> wrote:

I must have the decorate or processor wrong because if I read the validation
processor correctly it states that the pipeline should not be interrupted
with and error but rather with an added element for each element next to the
element within the xml file?

Here is my processor:

<p:processor name="oxf:validation">
               <p:input name="config">
                       <decorate>true</decorate>
               </p:input>
               <p:input name="schema" href="CourtFiling.xsd"/>
               <p:input name="data" href="#instance"/>
               <p:output name="data" ref="data" />
       </p:processor>

Do I have something wrong?  And if so, if corrected should I get an xml file
as the data output?  Thank you.
--
View this message in context: http://orbeon-forms-ops-users.24843.n4.nabble.com/Validation-Response-tp3230774p3230928.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





--
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
Reply | Threaded
Open this post in threaded view
|

Re: Re: Re: Re: Validation Response

Erik Bruchez
Administrator
You wrote:

<decorate>true</decorate>

not:

<config><decorate>true</decorate></config>

-Erik

On Tue, Jan 25, 2011 at 7:41 AM, Brian Steuhl <[hidden email]> wrote:
I have that below?  Input is a required tag, with name attribute.  And then doesn't decorate stand where it is at.  If I try any other combination Orbeon throws a processor error.  The way I have it successfully completes?
 

Brian Steuhl
Website: http://BTMSoftwareSolutions.com

Website: http://BTMDeals.com
Business Email: [hidden email]
Cell: 908-421-0742

Home Office: 732-961-3187

Google Voice: 732-800-1286 (1BTM)

BTM Deals Alert Sign Up Form
RSS Feed To My Blog:

Business Process Modeling - BTMSoftwareSolutions.com




From: Erik Bruchez <[hidden email]>
To: [hidden email]
Sent: Tue, January 25, 2011 12:16:59 AM
Subject: [ops-users] Re: Re: Validation Response

Yup I think you need:

<config><decorate>true</decorate></config>

-Erik

On Fri, Jan 21, 2011 at 5:40 PM, bsteuhl <[hidden email]> wrote:

I must have the decorate or processor wrong because if I read the validation
processor correctly it states that the pipeline should not be interrupted
with and error but rather with an added element for each element next to the
element within the xml file?

Here is my processor:

<p:processor name="oxf:validation">
               <p:input name="config">
                       <decorate>true</decorate>
               </p:input>
               <p:input name="schema" href="CourtFiling.xsd"/>
               <p:input name="data" href="#instance"/>
               <p:output name="data" ref="data" />
       </p:processor>

Do I have something wrong?  And if so, if corrected should I get an xml file
as the data output?  Thank you.
--
View this message in context: http://orbeon-forms-ops-users.24843.n4.nabble.com/Validation-Response-tp3230774p3230928.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





--
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




--
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
Reply | Threaded
Open this post in threaded view
|

Re: Re: Re: Re: Re: Validation Response

bsteuhl
I tried all combinatiosn and again I tried:

<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" ref="data" />
       </p:processor>

And I still get the orbeon error response (text/html) when validation error and not the decorated xml response (application/xml)?
 

Brian Steuhl
Website: http://BTMSoftwareSolutions.com

Website: http://BTMDeals.com
Business Email: [hidden email]
Cell: 908-421-0742

Home Office: 732-961-3187

Google Voice: 732-800-1286 (1BTM)

BTM Deals Alert Sign Up Form
RSS Feed To My Blog:

Business Process Modeling - BTMSoftwareSolutions.com




From: Erik Bruchez <[hidden email]>
To: [hidden email]
Sent: Wed, January 26, 2011 12:44:41 AM
Subject: [ops-users] Re: Re: Re: Re: Validation Response

You wrote:

<decorate>true</decorate>

not:

<config><decorate>true</decorate></config>

-Erik

On Tue, Jan 25, 2011 at 7:41 AM, Brian Steuhl <[hidden email]> wrote:
I have that below?  Input is a required tag, with name attribute.  And then doesn't decorate stand where it is at.  If I try any other combination Orbeon throws a processor error.  The way I have it successfully completes?
 

Brian Steuhl
Website: http://BTMSoftwareSolutions.com

Website: http://BTMDeals.com
Business Email: [hidden email]
Cell: 908-421-0742

Home Office: 732-961-3187

Google Voice: 732-800-1286 (1BTM)

BTM Deals Alert Sign Up Form
RSS Feed To My Blog:

Business Process Modeling - BTMSoftwareSolutions.com




From: Erik Bruchez <[hidden email]>
To: [hidden email]
Sent: Tue, January 25, 2011 12:16:59 AM
Subject: [ops-users] Re: Re: Validation Response

Yup I think you need:

<config><decorate>true</decorate></config>

-Erik

On Fri, Jan 21, 2011 at 5:40 PM, bsteuhl <[hidden email]> wrote:

I must have the decorate or processor wrong because if I read the validation
processor correctly it states that the pipeline should not be interrupted
with and error but rather with an added element for each element next to the
element within the xml file?

Here is my processor:

<p:processor name="oxf:validation">
               <p:input name="config">
                       <decorate>true</decorate>
               </p:input>
               <p:input name="schema" href="CourtFiling.xsd"/>
               <p:input name="data" href="#instance"/>
               <p:output name="data" ref="data" />
       </p:processor>

Do I have something wrong?  And if so, if corrected should I get an xml file
as the data output?  Thank you.
--
View this message in context: http://orbeon-forms-ops-users.24843.n4.nabble.com/Validation-Response-tp3230774p3230928.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





--
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





--
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
Reply | Threaded
Open this post in threaded view
|

Re: Re: Re: Re: Re: Re: Validation Response

Erik Bruchez
Administrator
We can't rule out a bug. Is there a simple pipeline you could send that shows this?

-Erik

On Wed, Jan 26, 2011 at 4:04 AM, Brian Steuhl <[hidden email]> wrote:
I tried all combinatiosn and again I tried:


<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" ref="data" />
       </p:processor>

And I still get the orbeon error response (text/html) when validation error and not the decorated xml response (application/xml)?

 

Brian Steuhl
Website: http://BTMSoftwareSolutions.com

Website: http://BTMDeals.com
Business Email: [hidden email]
Cell: 908-421-0742

Home Office: 732-961-3187

Google Voice: 732-800-1286 (1BTM)

BTM Deals Alert Sign Up Form
RSS Feed To My Blog:

Business Process Modeling - BTMSoftwareSolutions.com




From: Erik Bruchez <[hidden email]>
To: [hidden email]
Sent: Wed, January 26, 2011 12:44:41 AM
Subject: [ops-users] Re: Re: Re: Re: Validation Response

You wrote:

<decorate>true</decorate>

not:

<config><decorate>true</decorate></config>

-Erik

On Tue, Jan 25, 2011 at 7:41 AM, Brian Steuhl <[hidden email]> wrote:
I have that below?  Input is a required tag, with name attribute.  And then doesn't decorate stand where it is at.  If I try any other combination Orbeon throws a processor error.  The way I have it successfully completes?
 

Brian Steuhl
Website: http://BTMSoftwareSolutions.com

Website: http://BTMDeals.com
Business Email: [hidden email]
Cell: 908-421-0742

Home Office: 732-961-3187

Google Voice: 732-800-1286 (1BTM)

BTM Deals Alert Sign Up Form
RSS Feed To My Blog:

Business Process Modeling - BTMSoftwareSolutions.com




From: Erik Bruchez <[hidden email]>
To: [hidden email]
Sent: Tue, January 25, 2011 12:16:59 AM
Subject: [ops-users] Re: Re: Validation Response

Yup I think you need:

<config><decorate>true</decorate></config>

-Erik

On Fri, Jan 21, 2011 at 5:40 PM, bsteuhl <[hidden email]> wrote:

I must have the decorate or processor wrong because if I read the validation
processor correctly it states that the pipeline should not be interrupted
with and error but rather with an added element for each element next to the
element within the xml file?

Here is my processor:

<p:processor name="oxf:validation">
               <p:input name="config">
                       <decorate>true</decorate>
               </p:input>
               <p:input name="schema" href="CourtFiling.xsd"/>
               <p:input name="data" href="#instance"/>
               <p:output name="data" ref="data" />
       </p:processor>

Do I have something wrong?  And if so, if corrected should I get an xml file
as the data output?  Thank you.
--
View this message in context: http://orbeon-forms-ops-users.24843.n4.nabble.com/Validation-Response-tp3230774p3230928.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





--
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





--
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




--
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
Reply | Threaded
Open this post in threaded view
|

Re: Re: Re: Re: Re: Re: Validation Response

bsteuhl
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:processor name="oxf:validation">
                <p:input name="config">
                        <config>
                                <decorate>true</decorate>
                        </config>
                </p:input>
                <p:input name="schema" href="test.xsd"/>
               
                <p:input name="data" href="#instance"/>
                <p:output name="data" id="data" />
        </p:processor>
       
         
       
        <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:processor>

        </p:config>

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
BTM Software Solutions
Reply | Threaded
Open this post in threaded view
|

Re: Re: Re: Re: Re: Re: Re: Validation Response

Erik Bruchez
Administrator
Brian,

Thanks for the reproducible case.

The good news for is that it's not really a bug in Orbeon: you have simply been a victim of the "default XML namespace" catch.

In your pipeline, you have a default namespace:


This will put every element without a prefix in your document in that namespace, including the <config> and <decorate> elements.

This means that the validation processor doesn't recognize the configuration elements as they are in the wrong namespace.

Now you would think that the validation processor would tell you that the configuration is incorrect, like most other processors do!

This is where there is another catch: the validation processor doesn't validate its own config input with a schema as doing this naively causes recursion in the pipeline engine. An ad-hoc mechanism would be needed for this.

In the meanwhile, if you remove the default namespace from the root element, validation works as expected.

-Erik

On Mon, Feb 21, 2011 at 3:06 PM, bsteuhl <[hidden email]> wrote:

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:processor name="oxf:validation">
               <p:input name="config">
                       <config>
                               <decorate>true</decorate>
                       </config>
               </p:input>
               <p:input name="schema" href="test.xsd"/>
               <!--<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:processor>

       </p:config>

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




--
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