How can I call an Orbeon processor from my Java Code

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

How can I call an Orbeon processor from my Java Code

Antoine.DE-TROOSTEMBERGH
How can I call an Orbeon processor from my Java Code

Hello,

I would like to execute an Orbeon processor from inside my java code.
I got part of this code from OPS.java
Here is what I did but it doesn't seem to work:

ProcessorDefinition processorDefinition = new ProcessorDefinition();
processorDefinition.setName(new QName("xslt", XMLConstants.OXF_PROCESSORS_NAMESPACE));
processorDefinition.addInput("data", readInputAsDOM4J(context, "instance").getRootElement());
processorDefinition.addInput("config", "oxf:/my-xsl-file.xsl");

PipelineEngineFactory.instance().executePipeline(processorDefinition, new CommandLineExternalContext(), context, logger);

The error I get is
org.orbeon.oxf.common.ValidationException: Start not supported; processor implemented by 'org.orbeon.oxf.processor.transformer.xslt.XSLT2Transformer': Start not supported; processor implemented by 'org.orbeon.oxf.processor.transformer.xslt.XSLT2Transformer'

Can you please give me a sample code of how to do this?

Thanks,

Antoine



--
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: How can I call an Orbeon processor from my Java Code

Alessandro Vernet
Administrator
Antoine,

Antoine dT wrote
I would like to execute an Orbeon processor from inside my java code.
I got part of this code from OPS.java
Here is what I did but it doesn't seem to work:
[...]
Just to make sure, have you seen the page linked below? Does it help?

http://www.orbeon.com/ops/doc/reference-pipeline-api

Alex
Reply | Threaded
Open this post in threaded view
|

RE: Re: How can I call an Orbeon processor from my Java Code

Antoine.DE-TROOSTEMBERGH
Hi Alessandro,

Indeed I had a look to the OPS.java file.

The code from which I want to call a processor is itself also a processor (it extends SimpleProcessor)
I suppose that there are some thing I don't need to do like "Initialize a resource manager" and so on.


Antoine

-----Original Message-----
From: Alessandro Vernet [mailto:[hidden email]]
Sent: Saturday, August 29, 2009 2:25 AM
To: [hidden email]
Subject: [ops-users] Re: How can I call an Orbeon processor from my Java Code


Antoine,


Antoine dT wrote:
>
> I would like to execute an Orbeon processor from inside my java code.
> I got part of this code from OPS.java
> Here is what I did but it doesn't seem to work:
> [...]
>

Just to make sure, have you seen the page linked below? Does it help?

http://www.orbeon.com/ops/doc/reference-pipeline-api

Alex

-----
Orbeon Forms - Web 2.0 Forms, open-source, for the Enterprise
Orbeon's Blog: http://www.orbeon.com/blog/
Personal Blog: http://avernet.blogspot.com/
Twitter - http://twitter.com/avernet
--
View this message in context: http://www.nabble.com/How-can-I-call-an-Orbeon-processor-from-my-Java-Code-tp25187532p25198812.html
Sent from the ObjectWeb 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