Hi all, ------------------------------------------------------------------------------------------------ Free publications and statistics available on www.abs.gov.au
-- 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 |
Its your page flow, change the @model to @view and give your XPL a data output, you could use oxf:identity to create a dummy output
----------------------------------------------- Ryan Puddephatt FIX Developer Fidessa LatentZero 1 Alfred Place London WC1E 7EB Office: +44 (0) 20 7462 4200 Direct: +44 (0) 20 7323 6112 Blackberry: +44 (0) 79 8539 2458 Fax: +44 (0) 20 7462 4242 Email: [hidden email] Web: http://www.latentzero.com ----- Original Message ----- From: Michael Watson <[hidden email]> To: [hidden email] <[hidden email]> Sent: Tue Dec 02 02:52:37 2008 Subject: [ops-users] Custom Processor Help [SEC=UNCLASSIFIED] Hi all, I am trying to get a custom processor working however I'm not having much luck at the moment. So far what I have tried is taking the my-bookcast tutorial and altering it to call the pipeline that invokes my processor. My processor doesn't appear to be being invoked, but I am not at all sure what is going on as there doesn't appear to be any error messages. The steps I have taken are: - write a custom processor that extends from SimpleProcessor - place the class file in webapps/orbeon/WEB-INF/classes - added a custom-processors.xml to webapps/orbeon/WEB-INF/resources/config - added a reference to my custom processor in the above file: <processors xmlns:my="http://watsmi.org/ops/processors"> <processor name="my:processor"> <class name="org.watsmi.MyProcessor"/> </processor> </processors> - added a service-save.xpl file to the my-bookcast app: <p:config xmlns:p="http://www.orbeon.com/oxf/pipeline" xmlns:my="http://watsmi.org/ops/processors" 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"> <p:param type="input" name="instance"/> <p:processor name="my:processor"> <p:input name="data" href="#instance"/> </p:processor> </p:config> - added a new page to the page-flow.xml file in the my-bookcast app: <config xmlns="http://www.orbeon.com/oxf/controller"> <page path-info="/my-bookcast/" view="view.xhtml"/> <page path-info="/my-bookcast/add" model="service-save.xpl"/> <epilogue url="oxf:/config/epilogue.xpl"/> </config> - changed the submission element in the view.xhtml file of the my-bookcast example to refence the new page: <xforms:submission id="save-submission" ref="instance('books-instance')" action="/my-bookcast/add" method="put" replace="none"/> However as I said, nothing happens when I hit the save button. Even if I make the page reference a non existant xpl file I don't get any errors... so I have obviously not done it right. Would anyone be able to point me at a simple-ish example of a custom processor being used? Any help would be much appreciated. - Michael ------------------------------------------------------------------------------------------------ Free publications and statistics available on www.abs.gov.au ______________________________________________________________________ This email has been scanned by the MessageLabs Email Security System. For more information please visit http://www.messagelabs.com/email ______________________________________________________________________ _______________________________________________________________________ The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from any computer. _____________________________________________________________________ This e-mail has been scanned for viruses by Verizon Business Internet Managed Scanning Services - powered by MessageLabs. For further information visit http://www.mci.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 |
In reply to this post by Michael Watson-5
Michael, You don't declare any outputs to your processor. As I understand, if you do not reference an output, then the "lazy evaluation" will not invoke your processor. If the side effect of running the processor is the goal (and not any output it produces) then I think you nevertheless need to produce something and use it as input to another processor or refer to a data output. --Hank On Dec 1, 2008, at 6:52 PM, Michael Watson wrote: > Hi all, > > I am trying to get a custom processor working however I'm not > having much luck at the moment. So far what I have tried is taking > the my-bookcast tutorial and altering it to call the pipeline that > invokes my processor. My processor doesn't appear to be being > invoked, but I am not at all sure what is going on as there doesn't > appear to be any error messages. > > The steps I have taken are: > > - write a custom processor that extends from SimpleProcessor > - place the class file in webapps/orbeon/WEB-INF/classes > - added a custom-processors.xml to webapps/orbeon/WEB-INF/resources/ > config > - added a reference to my custom processor in the above file: > > <processors xmlns:my="http://watsmi.org/ops/processors"> > <processor name="my:processor"> > <class name="org.watsmi.MyProcessor"/> > </processor> > </processors> > > - added a service-save.xpl file to the my-bookcast app: > > <p:config xmlns:p="http://www.orbeon.com/oxf/pipeline" > xmlns:my="http://watsmi.org/ops/processors" > 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"> > > <p:param type="input" name="instance"/> > > <p:processor name="my:processor"> > <p:input name="data" href="#instance"/> > </p:processor> > > </p:config> > > - added a new page to the page-flow.xml file in the my-bookcast app: > > <config xmlns="http://www.orbeon.com/oxf/controller"> > <page path-info="/my-bookcast/" view="view.xhtml"/> > > > <page path-info="/my-bookcast/add" model="service-save.xpl"/> > > > <epilogue url="oxf:/config/epilogue.xpl"/> > </config> > > - changed the submission element in the view.xhtml file of the my- > bookcast example to refence the new page: > <xforms:submission id="save-submission" ref="instance('books- > instance')" action="/my-bookcast/add" method="put" replace="none"/> > > However as I said, nothing happens when I hit the save button. Even > if I make the page reference a non existant xpl file I don't get > any errors... so I have obviously not done it right. > > Would anyone be able to point me at a simple-ish example of a > custom processor being used? > > Any help would be much appreciated. > > - Michael > > ---------------------------------------------------------------------- > -------------------------- > > Free publications and statistics available on www.abs.gov.au > > > > -- > 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 NEES@UCSB Institute for Crustal Studies, University of California, Santa Barbara 805-893-8042 -- 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 |
Thanks Hank and Ryan I will give that a go.
Michael, You don't declare any outputs to your processor. As I understand, if you do not reference an output, then the "lazy evaluation" will not invoke your processor. If the side effect of running the processor is the goal (and not any output it produces) then I think you nevertheless need to produce something and use it as input to another processor or refer to a data output. --Hank On Dec 1, 2008, at 6:52 PM, Michael Watson wrote: > Hi all, > > I am trying to get a custom processor working however I'm not > having much luck at the moment. So far what I have tried is taking > the my-bookcast tutorial and altering it to call the pipeline that > invokes my processor. My processor doesn't appear to be being > invoked, but I am not at all sure what is going on as there doesn't > appear to be any error messages. > > The steps I have taken are: > > - write a custom processor that extends from SimpleProcessor > - place the class file in webapps/orbeon/WEB-INF/classes > - added a custom-processors.xml to webapps/orbeon/WEB-INF/resources/ > config > - added a reference to my custom processor in the above file: > > <processors xmlns:my="http://watsmi.org/ops/processors"> > <processor name="my:processor"> > <class name="org.watsmi.MyProcessor"/> > </processor> > </processors> > > - added a service-save.xpl file to the my-bookcast app: > > <p:config xmlns:p="http://www.orbeon.com/oxf/pipeline" > xmlns:my="http://watsmi.org/ops/processors" > 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"> > > <p:param type="input" name="instance"/> > > <p:processor name="my:processor"> > <p:input name="data" href="#instance"/> > </p:processor> > > </p:config> > > - added a new page to the page-flow.xml file in the my-bookcast app: > > <config xmlns="http://www.orbeon.com/oxf/controller"> > <page path-info="/my-bookcast/" view="view.xhtml"/> > > > <page path-info="/my-bookcast/add" model="service-save.xpl"/> > > > <epilogue url="oxf:/config/epilogue.xpl"/> > </config> > > - changed the submission element in the view.xhtml file of the my- > bookcast example to refence the new page: > <xforms:submission id="save-submission" ref="instance('books- > instance')" action="/my-bookcast/add" method="put" replace="none"/> > > However as I said, nothing happens when I hit the save button. Even > if I make the page reference a non existant xpl file I don't get > any errors... so I have obviously not done it right. > > Would anyone be able to point me at a simple-ish example of a > custom processor being used? > > Any help would be much appreciated. > > - Michael > > ---------------------------------------------------------------------- > -------------------------- > > Free publications and statistics available on www.abs.gov.au > > > > -- > You receive this message as a subscriber of the [hidden email] > mailing list. > To unsubscribe: [hidden email] > For general help: [hidden email] > OW2 mailing lists service home page: http://www.ow2.org/wws Hank Ratzesberger NEES@UCSB Institute for Crustal Studies, University of California, Santa Barbara 805-893-8042 -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: [hidden email] For general help: [hidden email] OW2 mailing lists service home page: http://www.ow2.org/wws ------------------------------------------------------------------------------------------------ Free publications and statistics available on www.abs.gov.au
-- 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
could also look at the code for the null serializer processor for an example of
a processor with no outputs - in fact you could first experiment using that
processor to make sure you get your page flow/model/view configuration correct
before putting your own processor in.
-- 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 |
In reply to this post by Hank Ratzesberger
Hello again.
Michael, You don't declare any outputs to your processor. As I understand, if you do not reference an output, then the "lazy evaluation" will not invoke your processor. If the side effect of running the processor is the goal (and not any output it produces) then I think you nevertheless need to produce something and use it as input to another processor or refer to a data output. --Hank On Dec 1, 2008, at 6:52 PM, Michael Watson wrote: > Hi all, > > I am trying to get a custom processor working however I'm not > having much luck at the moment. So far what I have tried is taking > the my-bookcast tutorial and altering it to call the pipeline that > invokes my processor. My processor doesn't appear to be being > invoked, but I am not at all sure what is going on as there doesn't > appear to be any error messages. > > The steps I have taken are: > > - write a custom processor that extends from SimpleProcessor > - place the class file in webapps/orbeon/WEB-INF/classes > - added a custom-processors.xml to webapps/orbeon/WEB-INF/resources/ > config > - added a reference to my custom processor in the above file: > > <processors xmlns:my="http://watsmi.org/ops/processors"> > <processor name="my:processor"> > <class name="org.watsmi.MyProcessor"/> > </processor> > </processors> > > - added a service-save.xpl file to the my-bookcast app: > > <p:config xmlns:p="http://www.orbeon.com/oxf/pipeline" > xmlns:my="http://watsmi.org/ops/processors" > 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"> > > <p:param type="input" name="instance"/> > > <p:processor name="my:processor"> > <p:input name="data" href="#instance"/> > </p:processor> > > </p:config> > > - added a new page to the page-flow.xml file in the my-bookcast app: > > <config xmlns="http://www.orbeon.com/oxf/controller"> > <page path-info="/my-bookcast/" view="view.xhtml"/> > > > <page path-info="/my-bookcast/add" model="service-save.xpl"/> > > > <epilogue url="oxf:/config/epilogue.xpl"/> > </config> > > - changed the submission element in the view.xhtml file of the my- > bookcast example to refence the new page: > <xforms:submission id="save-submission" ref="instance('books- > instance')" action="/my-bookcast/add" method="put" replace="none"/> > > However as I said, nothing happens when I hit the save button. Even > if I make the page reference a non existant xpl file I don't get > any errors... so I have obviously not done it right. > > Would anyone be able to point me at a simple-ish example of a > custom processor being used? > > Any help would be much appreciated. > > - Michael > > ---------------------------------------------------------------------- > -------------------------- > > Free publications and statistics available on www.abs.gov.au > > > > -- > You receive this message as a subscriber of the [hidden email] > mailing list. > To unsubscribe: [hidden email] > For general help: [hidden email] > OW2 mailing lists service home page: http://www.ow2.org/wws Hank Ratzesberger NEES@UCSB Institute for Crustal Studies, University of California, Santa Barbara 805-893-8042 -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: [hidden email] For general help: [hidden email] OW2 mailing lists service home page: http://www.ow2.org/wws ------------------------------------------------------------------------------------------------ Free publications and statistics available on www.abs.gov.au
-- 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 |
In reply to this post by Steve Bayliss
Thanks Steve, I will give this a go too.
You could also look at the code for the null serializer processor for an example of a processor with no outputs - in fact you could first experiment using that processor to make sure you get your page flow/model/view configuration correct before putting your own processor in.
From: Michael Watson [[hidden email]] Sent: 02 December 2008 22:44 To: [hidden email] Subject: [ops-users] Re: Re: Custom Processor Help [SEC=UNCLASSIFIED] Thanks Hank and Ryan I will give that a go.
Michael, You don't declare any outputs to your processor. As I understand, if you do not reference an output, then the "lazy evaluation" will not invoke your processor. If the side effect of running the processor is the goal (and not any output it produces) then I think you nevertheless need to produce something and use it as input to another processor or refer to a data output. --Hank On Dec 1, 2008, at 6:52 PM, Michael Watson wrote: > Hi all, > > I am trying to get a custom processor working however I'm not > having much luck at the moment. So far what I have tried is taking > the my-bookcast tutorial and altering it to call the pipeline that > invokes my processor. My processor doesn't appear to be being > invoked, but I am not at all sure what is going on as there doesn't > appear to be any error messages. > > The steps I have taken are: > > - write a custom processor that extends from SimpleProcessor > - place the class file in webapps/orbeon/WEB-INF/classes > - added a custom-processors.xml to webapps/orbeon/WEB-INF/resources/ > config > - added a reference to my custom processor in the above file: > > <processors xmlns:my="http://watsmi.org/ops/processors"> > <processor name="my:processor"> > <class name="org.watsmi.MyProcessor"/> > </processor> > </processors> > > - added a service-save.xpl file to the my-bookcast app: > > <p:config xmlns:p="http://www.orbeon.com/oxf/pipeline" > xmlns:my="http://watsmi.org/ops/processors" > 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"> > > <p:param type="input" name="instance"/> > > <p:processor name="my:processor"> > <p:input name="data" href="#instance"/> > </p:processor> > > </p:config> > > - added a new page to the page-flow.xml file in the my-bookcast app: > > <config xmlns="http://www.orbeon.com/oxf/controller"> > <page path-info="/my-bookcast/" view="view.xhtml"/> > > > <page path-info="/my-bookcast/add" model="service-save.xpl"/> > > > <epilogue url="oxf:/config/epilogue.xpl"/> > </config> > > - changed the submission element in the view.xhtml file of the my- > bookcast example to refence the new page: > <xforms:submission id="save-submission" ref="instance('books- > instance')" action="/my-bookcast/add" method="put" replace="none"/> > > However as I said, nothing happens when I hit the save button. Even > if I make the page reference a non existant xpl file I don't get > any errors... so I have obviously not done it right. > > Would anyone be able to point me at a simple-ish example of a > custom processor being used? > > Any help would be much appreciated. > > - Michael > > ---------------------------------------------------------------------- > -------------------------- > > Free publications and statistics available on www.abs.gov.au > > > > -- > You receive this message as a subscriber of the [hidden email] > mailing list. > To unsubscribe: [hidden email] > For general help: [hidden email] > OW2 mailing lists service home page: http://www.ow2.org/wws Hank Ratzesberger NEES@UCSB Institute for Crustal Studies, University of California, Santa Barbara 805-893-8042 -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: [hidden email] For general help: [hidden email] OW2 mailing lists service home page: http://www.ow2.org/wws ------------------------------------------------------------------------------------------------ Free publications and statistics available on www.abs.gov.au
------------------------------------------------------------------------------------------------ Free publications and statistics available on www.abs.gov.au
-- 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 |
In reply to this post by Michael Watson-5
A page-flow view must always have a data output, change ignored to data and try hitting it from the browser
Ryan ----------------------------------------------- Ryan Puddephatt FIX Developer Fidessa LatentZero 1 Alfred Place London WC1E 7EB Office: +44 (0) 20 7462 4200 Direct: +44 (0) 20 7323 6112 Blackberry: +44 (0) 79 8539 2458 Fax: +44 (0) 20 7462 4242 Email: [hidden email] Web: http://www.latentzero.com ----- Original Message ----- From: Michael Watson <[hidden email]> To: [hidden email] <[hidden email]> Sent: Thu Dec 04 01:03:43 2008 Subject: [ops-users] Re: Re: Custom Processor Help [SEC=UNCLASSIFIED] Hello again. I tried the things suggested but still don't seem to be having any luck. I changed my Processor to return a value, configured it like this: page-flow.xml: <config xmlns="http://www.orbeon.com/oxf/controller"> <page path-info="/my-bookcast/" view="view.xhtml"/> <page path-info="/my-bookcast/add" model="service-save.xpl"/> <epilogue url="oxf:/config/epilogue.xpl"/> </config> I also tried: <page path-info="/my-bookcast/add" view="service-save.xpl"/> service-save.xpl: <p:config xmlns:p="http://www.orbeon.com/oxf/pipeline" xmlns:my="http://watsmi.org/ops/processors" 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"> <p:param type="input" name="instance"/> <p:param type="output" name="ignored"/> <p:processor name="my:processor"> <p:input name="data" href="#instance"/> <p:output name="nothing" href="#ignored"/> </p:processor> </p:config> However the processor still doesn't seem to get invoked. Any further ideas about what I am doing wrong or perhaps an example I could play with? As an aside, what should the behaviour be if the xpl file referenced in page-flow.xml doesn't exist? Even if I set it up to reference a non-existent xpl file I don't get any errors which makes me suspect that the xpl is never getting invoked... if I manually browse to the url I have set up on page-flow.xml I get the following error (pointing at the xpl file that does exist): Error unexpected attribute "href"(schema: http://www.orbeon.com/oxf/pipeline) Which is pointing to this line: <p:output name="nothing" href="#ignored"/> However I am not sure if that is just because there is no model at that point? Any help would be much appreciated :-) - Michael Hank Ratzesberger ---03/12/2008 03:16:16 AM---Michael, You don't declare any outputs to your processor. From: Hank Ratzesberger <[hidden email]> To: [hidden email] Date: 03/12/2008 03:16 AM Subject: [ops-users] Re: Custom Processor Help [SEC=UNCLASSIFIED] ________________________________ Michael, You don't declare any outputs to your processor. As I understand, if you do not reference an output, then the "lazy evaluation" will not invoke your processor. If the side effect of running the processor is the goal (and not any output it produces) then I think you nevertheless need to produce something and use it as input to another processor or refer to a data output. --Hank On Dec 1, 2008, at 6:52 PM, Michael Watson wrote: > Hi all, > > I am trying to get a custom processor working however I'm not > having much luck at the moment. So far what I have tried is taking > the my-bookcast tutorial and altering it to call the pipeline that > invokes my processor. My processor doesn't appear to be being > invoked, but I am not at all sure what is going on as there doesn't > appear to be any error messages. > > The steps I have taken are: > > - write a custom processor that extends from SimpleProcessor > - place the class file in webapps/orbeon/WEB-INF/classes > - added a custom-processors.xml to webapps/orbeon/WEB-INF/resources/ > config > - added a reference to my custom processor in the above file: > > <processors xmlns:my="http://watsmi.org/ops/processors"> > <processor name="my:processor"> > <class name="org.watsmi.MyProcessor"/> > </processor> > </processors> > > - added a service-save.xpl file to the my-bookcast app: > > <p:config xmlns:p="http://www.orbeon.com/oxf/pipeline" > xmlns:my="http://watsmi.org/ops/processors" > 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"> > > <p:param type="input" name="instance"/> > > <p:processor name="my:processor"> > <p:input name="data" href="#instance"/> > </p:processor> > > </p:config> > > - added a new page to the page-flow.xml file in the my-bookcast app: > > <config xmlns="http://www.orbeon.com/oxf/controller"> > <page path-info="/my-bookcast/" view="view.xhtml"/> > > > <page path-info="/my-bookcast/add" model="service-save.xpl"/> > > > <epilogue url="oxf:/config/epilogue.xpl"/> > </config> > > - changed the submission element in the view.xhtml file of the my- > bookcast example to refence the new page: > <xforms:submission id="save-submission" ref="instance('books- > instance')" action="/my-bookcast/add" method="put" replace="none"/> > > However as I said, nothing happens when I hit the save button. Even > if I make the page reference a non existant xpl file I don't get > any errors... so I have obviously not done it right. > > Would anyone be able to point me at a simple-ish example of a > custom processor being used? > > Any help would be much appreciated. > > - Michael > > ---------------------------------------------------------------------- > -------------------------- > > Free publications and statistics available on www.abs.gov.au > > > > -- > 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 NEES@UCSB Institute for Crustal Studies, University of California, Santa Barbara 805-893-8042 -- 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 publications and statistics available on www.abs.gov.au ______________________________________________________________________ This email has been scanned by the MessageLabs Email Security System. For more information please visit http://www.messagelabs.com/email ______________________________________________________________________ _______________________________________________________________________ The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from any computer. _____________________________________________________________________ This e-mail has been scanned for viruses by Verizon Business Internet Managed Scanning Services - powered by MessageLabs. For further information visit http://www.mci.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 |
Hi Ryan,
A page-flow view must always have a data output, change ignored to data and try hitting it from the browser Ryan ----------------------------------------------- Ryan Puddephatt FIX Developer Fidessa LatentZero 1 Alfred Place London WC1E 7EB Office: +44 (0) 20 7462 4200 Direct: +44 (0) 20 7323 6112 Blackberry: +44 (0) 79 8539 2458 Fax: +44 (0) 20 7462 4242 Email: [hidden email] Web: http://www.latentzero.com ----- Original Message ----- From: Michael Watson <[hidden email]> To: [hidden email] <[hidden email]> Sent: Thu Dec 04 01:03:43 2008 Subject: [ops-users] Re: Re: Custom Processor Help [SEC=UNCLASSIFIED] Hello again. I tried the things suggested but still don't seem to be having any luck. I changed my Processor to return a value, configured it like this: page-flow.xml: <config xmlns="http://www.orbeon.com/oxf/controller"> <page path-info="/my-bookcast/" view="view.xhtml"/> <page path-info="/my-bookcast/add" model="service-save.xpl"/> <epilogue url="oxf:/config/epilogue.xpl"/> </config> I also tried: <page path-info="/my-bookcast/add" view="service-save.xpl"/> service-save.xpl: <p:config xmlns:p="http://www.orbeon.com/oxf/pipeline" xmlns:my="http://watsmi.org/ops/processors" 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"> <p:param type="input" name="instance"/> <p:param type="output" name="ignored"/> <p:processor name="my:processor"> <p:input name="data" href="#instance"/> <p:output name="nothing" href="#ignored"/> </p:processor> </p:config> However the processor still doesn't seem to get invoked. Any further ideas about what I am doing wrong or perhaps an example I could play with? As an aside, what should the behaviour be if the xpl file referenced in page-flow.xml doesn't exist? Even if I set it up to reference a non-existent xpl file I don't get any errors which makes me suspect that the xpl is never getting invoked... if I manually browse to the url I have set up on page-flow.xml I get the following error (pointing at the xpl file that does exist): Error unexpected attribute "href"(schema: http://www.orbeon.com/oxf/pipeline) Which is pointing to this line: <p:output name="nothing" href="#ignored"/> However I am not sure if that is just because there is no model at that point? Any help would be much appreciated :-) - Michael Hank Ratzesberger ---03/12/2008 03:16:16 AM---Michael, You don't declare any outputs to your processor. From: Hank Ratzesberger <[hidden email]> To: [hidden email] Date: 03/12/2008 03:16 AM Subject: [ops-users] Re: Custom Processor Help [SEC=UNCLASSIFIED] ________________________________ Michael, You don't declare any outputs to your processor. As I understand, if you do not reference an output, then the "lazy evaluation" will not invoke your processor. If the side effect of running the processor is the goal (and not any output it produces) then I think you nevertheless need to produce something and use it as input to another processor or refer to a data output. --Hank On Dec 1, 2008, at 6:52 PM, Michael Watson wrote: > Hi all, > > I am trying to get a custom processor working however I'm not > having much luck at the moment. So far what I have tried is taking > the my-bookcast tutorial and altering it to call the pipeline that > invokes my processor. My processor doesn't appear to be being > invoked, but I am not at all sure what is going on as there doesn't > appear to be any error messages. > > The steps I have taken are: > > - write a custom processor that extends from SimpleProcessor > - place the class file in webapps/orbeon/WEB-INF/classes > - added a custom-processors.xml to webapps/orbeon/WEB-INF/resources/ > config > - added a reference to my custom processor in the above file: > > <processors xmlns:my="http://watsmi.org/ops/processors"> > <processor name="my:processor"> > <class name="org.watsmi.MyProcessor"/> > </processor> > </processors> > > - added a service-save.xpl file to the my-bookcast app: > > <p:config xmlns:p="http://www.orbeon.com/oxf/pipeline" > xmlns:my="http://watsmi.org/ops/processors" > 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"> > > <p:param type="input" name="instance"/> > > <p:processor name="my:processor"> > <p:input name="data" href="#instance"/> > </p:processor> > > </p:config> > > - added a new page to the page-flow.xml file in the my-bookcast app: > > <config xmlns="http://www.orbeon.com/oxf/controller"> > <page path-info="/my-bookcast/" view="view.xhtml"/> > > > <page path-info="/my-bookcast/add" model="service-save.xpl"/> > > > <epilogue url="oxf:/config/epilogue.xpl"/> > </config> > > - changed the submission element in the view.xhtml file of the my- > bookcast example to refence the new page: > <xforms:submission id="save-submission" ref="instance('books- > instance')" action="/my-bookcast/add" method="put" replace="none"/> > > However as I said, nothing happens when I hit the save button. Even > if I make the page reference a non existant xpl file I don't get > any errors... so I have obviously not done it right. > > Would anyone be able to point me at a simple-ish example of a > custom processor being used? > > Any help would be much appreciated. > > - Michael > > ---------------------------------------------------------------------- > -------------------------- > > Free publications and statistics available on www.abs.gov.au > > > > -- > You receive this message as a subscriber of the [hidden email] > mailing list. > To unsubscribe: [hidden email] > For general help: [hidden email] > OW2 mailing lists service home page: http://www.ow2.org/wws Hank Ratzesberger NEES@UCSB Institute for Crustal Studies, University of California, Santa Barbara 805-893-8042 -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: [hidden email] For general help: [hidden email] OW2 mailing lists service home page: http://www.ow2.org/wws ------------------------------------------------------------------------------------------------ Free publications and statistics available on www.abs.gov.au ______________________________________________________________________ This email has been scanned by the MessageLabs Email Security System. For more information please visit http://www.messagelabs.com/email ______________________________________________________________________ _______________________________________________________________________ The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from any computer. _____________________________________________________________________ This e-mail has been scanned for viruses by Verizon Business Internet Managed Scanning Services - powered by MessageLabs. For further information visit http://www.mci.com -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: [hidden email] For general help: [hidden email] OW2 mailing lists service home page: http://www.ow2.org/wws ------------------------------------------------------------------------------------------------ Free publications and statistics available on www.abs.gov.au
-- 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 |
In reply to this post by Michael Watson-5
The href error is and xpl error, you'll need to fix that first
Read the xpl documentation to find out what is wrong. A good way to test xpls and custom processors is to hit them in a browser so u get the xml output, this way you cut out orbeon xforms wrapping the error in a different way ----------------------------------------------- Ryan Puddephatt FIX Developer Fidessa LatentZero 1 Alfred Place London WC1E 7EB Office: +44 (0) 20 7462 4200 Direct: +44 (0) 20 7323 6112 Blackberry: +44 (0) 79 8539 2458 Fax: +44 (0) 20 7462 4242 Email: [hidden email] Web: http://www.latentzero.com ----- Original Message ----- From: Michael Watson <[hidden email]> To: [hidden email] <[hidden email]> Sent: Fri Dec 05 01:38:12 2008 Subject: [ops-users] Re: Re: Re: Re: Custom Processor Help [SEC=UNCLASSIFIED] Hi Ryan, I tried changing the names in the processor and the xpl but still no luck. When I hit the /add url directly in the browser I get the href error. I tried using this xpl instead (from the serializers documentation page): <p:config xmlns:p="http://www.orbeon.com/oxf/pipeline" xmlns:my="http://watsmi.org/ops/processors" 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"> <p:param type="input" name="instance"/> <!-- Convert a document to serialized XML --> <p:processor name="oxf:xml-converter"> <p:input name="config"> <config> <encoding>utf-8</encoding> </config> </p:input> <p:input name="data" href="#instance"/> <p:output name="data" id="converted"/> </p:processor> <!-- Write the document to a file --> <p:processor name="oxf:file-serializer"> <p:input name="config"> <config> <directory>/apps/my-bookcast/</directory> <file>single-file-doc.html</file> <make-directories>true</make-directories> <append>false</append> </config> </p:input> <p:input name="data" href="#converted"/> </p:processor> </p:config> but the file doesn't get written out. So none of the xpls seem to be being invoked correctly. Thanks all for your help, I think for the time being I will pursue some other approaches. - Michael "Ryan Puddephatt" ---04/12/2008 05:26:03 PM---A page-flow view must always have a data output, change ignored to data and try hitting it from the From: "Ryan Puddephatt" <[hidden email]> To: <[hidden email]> Date: 04/12/2008 05:26 PM Subject: [ops-users] Re: Re: Re: Custom Processor Help [SEC=UNCLASSIFIED] ________________________________ A page-flow view must always have a data output, change ignored to data and try hitting it from the browser Ryan ----------------------------------------------- Ryan Puddephatt FIX Developer Fidessa LatentZero 1 Alfred Place London WC1E 7EB Office: +44 (0) 20 7462 4200 Direct: +44 (0) 20 7323 6112 Blackberry: +44 (0) 79 8539 2458 Fax: +44 (0) 20 7462 4242 Email: [hidden email] Web: http://www.latentzero.com ----- Original Message ----- From: Michael Watson <[hidden email]> To: [hidden email] <[hidden email]> Sent: Thu Dec 04 01:03:43 2008 Subject: [ops-users] Re: Re: Custom Processor Help [SEC=UNCLASSIFIED] Hello again. I tried the things suggested but still don't seem to be having any luck. I changed my Processor to return a value, configured it like this: page-flow.xml: <config xmlns="http://www.orbeon.com/oxf/controller"> <page path-info="/my-bookcast/" view="view.xhtml"/> <page path-info="/my-bookcast/add" model="service-save.xpl"/> <epilogue url="oxf:/config/epilogue.xpl"/> </config> I also tried: <page path-info="/my-bookcast/add" view="service-save.xpl"/> service-save.xpl: <p:config xmlns:p="http://www.orbeon.com/oxf/pipeline" xmlns:my="http://watsmi.org/ops/processors" 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"> <p:param type="input" name="instance"/> <p:param type="output" name="ignored"/> <p:processor name="my:processor"> <p:input name="data" href="#instance"/> <p:output name="nothing" href="#ignored"/> </p:processor> </p:config> However the processor still doesn't seem to get invoked. Any further ideas about what I am doing wrong or perhaps an example I could play with? As an aside, what should the behaviour be if the xpl file referenced in page-flow.xml doesn't exist? Even if I set it up to reference a non-existent xpl file I don't get any errors which makes me suspect that the xpl is never getting invoked... if I manually browse to the url I have set up on page-flow.xml I get the following error (pointing at the xpl file that does exist): Error unexpected attribute "href"(schema: http://www.orbeon.com/oxf/pipeline) Which is pointing to this line: <p:output name="nothing" href="#ignored"/> However I am not sure if that is just because there is no model at that point? Any help would be much appreciated :-) - Michael Hank Ratzesberger ---03/12/2008 03:16:16 AM---Michael, You don't declare any outputs to your processor. From: Hank Ratzesberger <[hidden email]> To: [hidden email] Date: 03/12/2008 03:16 AM Subject: [ops-users] Re: Custom Processor Help [SEC=UNCLASSIFIED] ________________________________ Michael, You don't declare any outputs to your processor. As I understand, if you do not reference an output, then the "lazy evaluation" will not invoke your processor. If the side effect of running the processor is the goal (and not any output it produces) then I think you nevertheless need to produce something and use it as input to another processor or refer to a data output. --Hank On Dec 1, 2008, at 6:52 PM, Michael Watson wrote: > Hi all, > > I am trying to get a custom processor working however I'm not > having much luck at the moment. So far what I have tried is taking > the my-bookcast tutorial and altering it to call the pipeline that > invokes my processor. My processor doesn't appear to be being > invoked, but I am not at all sure what is going on as there doesn't > appear to be any error messages. > > The steps I have taken are: > > - write a custom processor that extends from SimpleProcessor > - place the class file in webapps/orbeon/WEB-INF/classes > - added a custom-processors.xml to webapps/orbeon/WEB-INF/resources/ > config > - added a reference to my custom processor in the above file: > > <processors xmlns:my="http://watsmi.org/ops/processors"> > <processor name="my:processor"> > <class name="org.watsmi.MyProcessor"/> > </processor> > </processors> > > - added a service-save.xpl file to the my-bookcast app: > > <p:config xmlns:p="http://www.orbeon.com/oxf/pipeline" > xmlns:my="http://watsmi.org/ops/processors" > 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"> > > <p:param type="input" name="instance"/> > > <p:processor name="my:processor"> > <p:input name="data" href="#instance"/> > </p:processor> > > </p:config> > > - added a new page to the page-flow.xml file in the my-bookcast app: > > <config xmlns="http://www.orbeon.com/oxf/controller"> > <page path-info="/my-bookcast/" view="view.xhtml"/> > > > <page path-info="/my-bookcast/add" model="service-save.xpl"/> > > > <epilogue url="oxf:/config/epilogue.xpl"/> > </config> > > - changed the submission element in the view.xhtml file of the my- > bookcast example to refence the new page: > <xforms:submission id="save-submission" ref="instance('books- > instance')" action="/my-bookcast/add" method="put" replace="none"/> > > However as I said, nothing happens when I hit the save button. Even > if I make the page reference a non existant xpl file I don't get > any errors... so I have obviously not done it right. > > Would anyone be able to point me at a simple-ish example of a > custom processor being used? > > Any help would be much appreciated. > > - Michael > > ---------------------------------------------------------------------- > -------------------------- > > Free publications and statistics available on www.abs.gov.au > > > > -- > 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 NEES@UCSB Institute for Crustal Studies, University of California, Santa Barbara 805-893-8042 -- 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 publications and statistics available on www.abs.gov.au ______________________________________________________________________ This email has been scanned by the MessageLabs Email Security System. For more information please visit http://www.messagelabs.com/email ______________________________________________________________________ _______________________________________________________________________ The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from any computer. _____________________________________________________________________ This e-mail has been scanned for viruses by Verizon Business Internet Managed Scanning Services - powered by MessageLabs. For further information visit http://www.mci.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 publications and statistics available on www.abs.gov.au ______________________________________________________________________ This email has been scanned by the MessageLabs Email Security System. For more information please visit http://www.messagelabs.com/email ______________________________________________________________________ _______________________________________________________________________ The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from any computer. _____________________________________________________________________ This e-mail has been scanned for viruses by Verizon Business Internet Managed Scanning Services - powered by MessageLabs. For further information visit http://www.mci.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 |