You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@uima.apache.org by Baptiste GAILLARD <ba...@gmail.com> on 2007/11/29 14:31:37 UTC

How to use a SOAP component in a CPE ?

Hi,

I'm trying to use the CPEGui tool to build and run a CPE which contains an
Analysis Engine deployed via SOAP.

I've read the following in the UIMA documentation:
Note

The UIMA SDK also supports using unmanaged remote services via the
web-standard SOAP communications protocol (see Section 3.6.1, "Deploying as
SOAP Service"<http://incubator.apache.org/uima/downloads/releaseDocs/2.2.0-incubating/docs/html/tutorials_and_users_guides/tutorials_and_users_guides.html#ugr.tug.application.how_to_deploy_as_soap>.
This approach is based on a proxy implementation, where the proxy is
essentially running in an integrated mode. To use this approach with the
CPM, use the Integrated mode, with the component being an Aggregate which,
in turn, connects to a remote service.

 So I try to wrap a Soap service descriptor into an aggreagate AE:

-- AggregateWordsListAnnotatorSoapService.xml --

<?xml version="1.0" encoding="UTF-8" ?>
<analysisEngineDescription xmlns="http://uima.apache.org/resourceSpecifier">
    <frameworkImplementation>org.apache.uima.java</frameworkImplementation>
    <primitive>false</primitive>
    <delegateAnalysisEngineSpecifiers>
        <delegateAnalysisEngine key="WordsListAnnotatorSoapService">
            <import location="file:/D:\uimaj-
2.1.0-incubating-bin\apache-uima\bin\WordsListAnnotatorSoapService.xml"/>
        </delegateAnalysisEngine>
    </delegateAnalysisEngineSpecifiers>
    <analysisEngineMetaData>
        <name>WordsListAnnotatorSoapService</name>
        <description></description>
        <version>1.0</version>
        <vendor>The Apache Software Foundation</vendor>
        <flowConstraints>
            <fixedFlow>
                <node>WordsListAnnotatorSoapService</node>
            </fixedFlow>
        </flowConstraints>
    </analysisEngineMetaData>
</analysisEngineDescription>


My Soap service descriptor is the following:

<?xml version="1.0" encoding="UTF-8" ?>
<uriSpecifier xmlns="http://uima.apache.org/resourceSpecifier">
    <resourceType>AnalysisEngine</resourceType>
    <uri>http://localhost:8070/axis/services/urn:WordsListAnnotator</uri>
    <protocol>SOAP</protocol>
</uriSpecifier>


But, when I try to add the Aggregate AE "
AggregateWordsListAnnotatorSoapService.xml" with the "cpeGui.bat" tool the
following error is displayed :

org.apache.uima.collection.metadata.CpeDescriptionException: The object
reference casProcessor=NULL is invalid. (Thread Name: AWT-EventQueue-0).


So, do you know why this error appear ?
Why the isn't any sample CPE descriptor using components deployed via SOAP
in the UIMA examples ?

Thanks,


Baptiste GAILLARD

Re: OS licensing for TAEs

Posted by Marshall Schor <ms...@schor.com>.
Hi Girish. 

I am not a lawyer, so this is not in any way official advice.  However,
the Apache license version 2 was designed to allow commercial use of its
software by others with minimal conditions.  Please read the license,
http://www.apache.org/licenses/LICENSE-2.0
<http://apache.org/licenses/LICENSE-2.0> for details, especially section
4, which allows you to redistribute Apache licensed components, and
specifies the restrictions. 

The license, in particular, says you can release your TAEs under any
license you wish, provided that it complies with the conditions stated
in the Apache License. 

-Marshall

Chavan, Girish wrote:
> Do I have to release the TAEs that I produce under the Apache License?
> In other words, even If I just use any libraries released under Apache,
> and that have to be included with the software I produce for it to work,
> does that restrict my software to be released under the Apache license?
>
>
> thanks
> -Girish
>
>
>   


OS licensing for TAEs

Posted by "Chavan, Girish" <ch...@upmc.edu>.
Do I have to release the TAEs that I produce under the Apache License?
In other words, even If I just use any libraries released under Apache,
and that have to be included with the software I produce for it to work,
does that restrict my software to be released under the Apache license?


thanks
-Girish

Re: When to add CAS Consumer to CPM, and when to add it to the end of a user's AE

Posted by Adam Lally <al...@alum.rpi.edu>.
On Dec 7, 2007 11:03 AM, Adam Lally <al...@alum.rpi.edu> wrote:
> If you need a CAS Consumer that processes CASes created within an
> aggregate AnalysisEngine, then you need to add the CasMultiplier to
> that aggregate AnalysisEngine, and not to the CPE.
>

Sorry, I typed the wrong thing there.  I meant to say: ...you need to
add the _CasConsumer_ to that aggregate AnalysisEngine, and not to the
CPE.

-Adam

Re: When to add CAS Consumer to CPM, and when to add it to the end of a user's AE

Posted by Adam Lally <al...@alum.rpi.edu>.
Hi,

On Dec 7, 2007 10:50 AM, Chavan, Girish <ch...@upmc.edu> wrote:
> Hi All,
>
> I am a newbie with UIMA, and some of my terminologies might be a bit off
> here. Please bear with me.

Looks to me like you got the terminology right.

> Here's my question:
> I am going through the code in 'DocumentAnalyzer.java' and I see that it
> creates an Aggregate AE which contains the user specified AE and a CAS
> consumer to the end of it. However, the CPM also seems to have a
> addCasConsumer() method. Why would you not add the CasConsumer to the
> CPM instead of tagging it at the end of the user's AE? The comment talks
> about how this is done to support a user AE which might have a CAS
> Multiplier.
> When a CasConsumer is added to a CPM, does it only see CASes that were
> output by the CollectionReader?, and not all CASes coming out of the
> user's AE?
>

Yes, that's right.  It's currently a limitation that a CasConsumer
won't see CASes that are created by a CasMultiplier within the user's
AE.  This is explained here:
http://incubator.apache.org/uima/downloads/releaseDocs/2.2.0-incubating/docs/html/tutorials_and_users_guides/tutorials_and_users_guides.html#ugr.tug.cm.using_cm_in_cpe

If you need a CAS Consumer that processes CASes created within an
aggregate AnalysisEngine, then you need to add the CasMultiplier to
that aggregate AnalysisEngine, and not to the CPE.

-Adam

When to add CAS Consumer to CPM, and when to add it to the end of a user's AE

Posted by "Chavan, Girish" <ch...@upmc.edu>.
Hi All,

I am a newbie with UIMA, and some of my terminologies might be a bit off
here. Please bear with me.
Here's my question:
I am going through the code in 'DocumentAnalyzer.java' and I see that it
creates an Aggregate AE which contains the user specified AE and a CAS
consumer to the end of it. However, the CPM also seems to have a
addCasConsumer() method. Why would you not add the CasConsumer to the
CPM instead of tagging it at the end of the user's AE? The comment talks
about how this is done to support a user AE which might have a CAS
Multiplier. 
When a CasConsumer is added to a CPM, does it only see CASes that were
output by the CollectionReader?, and not all CASes coming out of the
user's AE?

Kind Regards,
Girish Chavan
UPitt.

Re: How to use a SOAP component in a CPE ?

Posted by Marshall Schor <ms...@schor.com>.
I've entered 2 Jira issues for this,
https://issues.apache.org/jira/browse/UIMA-670 for making it basically
work and https://issues.apache.org/jira/browse/UIMA-671 for adding
support for the CPM calls of batchProcessComplete and
collectionProcessComplete.

My guess is that these may take some time to fix, and are not scheduled
for the 2.2.1 release (now in its final stages of testing before
releasing, we hope), so in the meanwhile, I hope you can use the
work-arounds.

-Marshall

Adam Lally wrote:
> On Dec 6, 2007 9:44 AM, Baptiste GAILLARD <ba...@gmail.com> wrote:
>   
>> Hi again,
>>
>> sorry but I still have problems even with the Cas Consumer inside an
>> aggregate Analysis Engine.
>>
>>     
>
> I scanned through the code and it looks like we have a bug with remote
> CAS Consumers.
>
> I can think of two possible workarounds: Either wrap the CAS Consumer
> in an Aggregate AE _on the service side_, or you might just be able to
> change the <resourceType> in your client descriptor to AnalysisEngine
> instead of CasConsumer.
>
> However, I saw while looking at the code that the
> batchProcessComplete() and collectionProcessComplete() methods are
> unimplemented through the SOAP interface.  So if you need those you
> may be out of luck, sorry.
>
> In recent versions of UIMA there is essentially no difference between
> an AnalysisEngine and a CasConsumer, but apparently the SOAP Service
> adapter hasn't kept up with the times. :(
>
> -Adam
>
>
>   


Re: How to use a SOAP component in a CPE ?

Posted by Adam Lally <al...@alum.rpi.edu>.
On Dec 6, 2007 9:44 AM, Baptiste GAILLARD <ba...@gmail.com> wrote:
> Hi again,
>
> sorry but I still have problems even with the Cas Consumer inside an
> aggregate Analysis Engine.
>

I scanned through the code and it looks like we have a bug with remote
CAS Consumers.

I can think of two possible workarounds: Either wrap the CAS Consumer
in an Aggregate AE _on the service side_, or you might just be able to
change the <resourceType> in your client descriptor to AnalysisEngine
instead of CasConsumer.

However, I saw while looking at the code that the
batchProcessComplete() and collectionProcessComplete() methods are
unimplemented through the SOAP interface.  So if you need those you
may be out of luck, sorry.

In recent versions of UIMA there is essentially no difference between
an AnalysisEngine and a CasConsumer, but apparently the SOAP Service
adapter hasn't kept up with the times. :(

-Adam

Re: How to use a SOAP component in a CPE ?

Posted by Baptiste GAILLARD <ba...@gmail.com>.
Hi again,

sorry but I still have problems even with the Cas Consumer inside an
aggregate Analysis Engine.

The CPE descriptor I've saved with the cpeGui.bat tool is the following.

-- cpeDescriptor.xml --

<?xml version="1.0" encoding="UTF-8"?>
<cpeDescription xmlns="http://uima.apache.org/resourceSpecifier">
    <collectionReader>
        <collectionIterator>
            <descriptor>
                <import
location="../../../workspace/imp-helper-uima/src/main/resources/descriptors/collection_reader/TextsListCollectionReader.xml"/>
            </descriptor>
        </collectionIterator>
    </collectionReader>
    <casProcessors casPoolSize="5" processingUnitThreadCount="1">
        <casProcessor deployment="integrated" name="
WordsListAnnotatorSoapService.xml">
            <descriptor>
                <import location="WordsListAnnotatorSoapService.xml"/>
            </descriptor>
            <deploymentParameters/>
            <errorHandling>
                <errorRateThreshold action="terminate" value="0/1000"/>
                <maxConsecutiveRestarts action="terminate" value="30"/>
                <timeout max="100000" default="-1"/>
            </errorHandling>
            <checkpoint batch="10000" time="1000ms"/>
        </casProcessor>
        <casProcessor deployment="integrated"
name="AggregateWordsFilePrinterSoapService">
            <descriptor>
                <import location="AggregateWordsFilePrinterSoapService.xml
"/>
            </descriptor>
            <deploymentParameters/>
            <errorHandling>
                <errorRateThreshold action="terminate" value="0/1000"/>
                <maxConsecutiveRestarts action="terminate" value="30"/>
                <timeout max="100000" default="-1"/>
            </errorHandling>
            <checkpoint batch="10000" time="1000ms"/>
        </casProcessor>
    </casProcessors>
    <cpeConfig>
        <numToProcess>-1</numToProcess>
        <deployAs>immediate</deployAs>
        <checkpoint batch="0" time="300000ms"/>
        <timerImpl/>
    </cpeConfig>
</cpeDescription>

When I execute this CPE descriptor in cpeGui.bat those exceptions are
thrown:

org.apache.uima.collection.metadata.CpeDescriptorException: The object
reference casProcessor name=NULL is invalid.  (Thread Name:
AWT-EventQueue-0)
        at
org.apache.uima.collection.impl.metadata.cpe.CasProcessorCpeObject.setName(
CasProcessorCpeObject.java:347)
        at org.apache.uima.tools.cpm.CpmPanel.addAE(CpmPanel.java:1408)
        at org.apache.uima.tools.cpm.CpmPanel.openCpeDescriptor(
CpmPanel.java:1786)
        at org.apache.uima.tools.cpm.CpmPanel.readPreferences(CpmPanel.java
:538)
        at org.apache.uima.tools.cpm.CpmPanel.<init>(CpmPanel.java:419)
        at org.apache.uima.tools.cpm.CpmFrame.<init>(CpmFrame.java:94)
        at org.apache.uima.tools.cpm.CpmFrame.initGUI(CpmFrame.java:178)
        at org.apache.uima.tools.cpm.CpmFrame.access$000(CpmFrame.java:49)
        at org.apache.uima.tools.cpm.CpmFrame$1.run(CpmFrame.java:168)
        at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
        at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)
        at java.awt.EventDispatchThread.pumpOneEventForFilters(
EventDispatchThread.java:273)
        at java.awt.EventDispatchThread.pumpEventsForFilter(
EventDispatchThread.java:183)
        at java.awt.EventDispatchThread.pumpEventsForHierarchy(
EventDispatchThread.java:173)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java
:168)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java
:160)
        at java.awt.EventDispatchThread.run(EventDispatchThread.java:121)
log4j:WARN No appenders could be found for logger (
org.apache.axis.i18n.ProjectResourceBundle).
log4j:WARN Please initialize the log4j system properly.
org.apache.uima.resource.ResourceInitializationException: Initialization of
CAS Processor with name "AggregateWordsFilePrinterSoapService.xml" failed.
        at
org.apache.uima.collection.impl.CollectionProcessingEngine_impl.initialize
(CollectionProcessingEngine_impl.java:83)
        at
org.apache.uima.impl.UIMAFramework_impl._produceCollectionProcessingEngine
(UIMAFramework_impl.java:395)
        at org.apache.uima.UIMAFramework.produceCollectionProcessingEngine(
UIMAFramework.java:807)
        at org.apache.uima.tools.cpm.CpmPanel.startProcessing(CpmPanel.java
:571)
        at org.apache.uima.tools.cpm.CpmPanel.access$000(CpmPanel.java:105)
        at org.apache.uima.tools.cpm.CpmPanel$1.construct(CpmPanel.java:711)
        at org.apache.uima.tools.util.gui.SwingWorker$2.run(SwingWorker.java
:130)
        at java.lang.Thread.run(Thread.java:619)
Caused by: org.apache.uima.resource.ResourceConfigurationException:
Initialization of CAS Processor with name "
AggregateWordsFilePrinterSoapService.xml" failed.
        at
org.apache.uima.collection.impl.cpm.container.CPEFactory.produceIntegratedCasProcessor
(CPEFactory.java:1104)
        at
org.apache.uima.collection.impl.cpm.container.CPEFactory.getCasProcessors(
CPEFactory.java:550)
        at org.apache.uima.collection.impl.cpm.BaseCPMImpl.init(
BaseCPMImpl.java:253)
        at org.apache.uima.collection.impl.cpm.BaseCPMImpl.<init>(
BaseCPMImpl.java:127)
        at
org.apache.uima.collection.impl.CollectionProcessingEngine_impl.initialize
(CollectionProcessingEngine_impl.java:75)
        ... 7 more
Caused by: org.apache.uima.resource.ResourceInitializationException: The
Resource Factory does not know how to create a resource of class
org.apache.uima.analysis_engine.AnalysisEn
the given ResourceSpecifier. (Descriptor: file:/D:/uimaj-
2.2.0-incubating-bin/apache-uima/bin/WordsFilePrinterSoapService.xml)
        at org.apache.uima.UIMAFramework.produceResource(UIMAFramework.java
:261)
        at org.apache.uima.UIMAFramework.produceAnalysisEngine(
UIMAFramework.java:352)
        at org.apache.uima.analysis_engine.asb.impl.ASB_impl.setup
(ASB_impl.java:243)
        at
org.apache.uima.analysis_engine.impl.AggregateAnalysisEngine_impl.initASB
(AggregateAnalysisEngine_impl.java:413)
        at
org.apache.uima.analysis_engine.impl.AggregateAnalysisEngine_impl.initializeAggregateAnalysisEngine
(AggregateAnalysisEngine_impl.java:361)
        at
org.apache.uima.analysis_engine.impl.AggregateAnalysisEngine_impl.initialize
(AggregateAnalysisEngine_impl.java:183)
        at org.apache.uima.impl.AnalysisEngineFactory_impl.produceResource
(AnalysisEngineFactory_impl.java:94)
        at
org.apache.uima.impl.CompositeResourceFactory_impl.produceResource
(CompositeResourceFactory_impl.java:62)
        at org.apache.uima.UIMAFramework.produceResource(UIMAFramework.java
:258)
        at org.apache.uima.UIMAFramework.produceResource(UIMAFramework.java
:303)
        at org.apache.uima.UIMAFramework.produceAnalysisEngine(
UIMAFramework.java:383)
        at
org.apache.uima.collection.impl.cpm.container.CPEFactory.produceIntegratedCasProcessor
(CPEFactory.java:1088)
        ... 11 more

The aggregate AE descriptor (AggregateWordsFilePrinterSoapService.xml) is:

<analysisEngineDescription xmlns="http://uima.apache.org/resourceSpecifier">
    <frameworkImplementation>org.apache.uima.java</frameworkImplementation>
    <primitive>false</primitive>
    <delegateAnalysisEngineSpecifiers>
        <delegateAnalysisEngine key="WordsFilePrinterSoapService">
            <import location="WordsFilePrinterSoapService.xml"/>
        </delegateAnalysisEngine>
    </delegateAnalysisEngineSpecifiers>
</analysisEngineDescription>

So what's wrong with those descriptors ?

Thanks.

Baptiste.


2007/12/4, Baptiste GAILLARD <ba...@gmail.com>:
>
> Ok, so I will integrate that SOAP service descriptor inside an Aggregate
> AE.
>
> I'll try that soon.
>
> Does that answer your question, or did I miss something?
>
>
> Yes, I think it will solve my problems, thank you Marshall !!!
>
>
> Baptiste.
>
> 2007/12/4, Marshall Schor < msa@schor.com>:
> >
> > If you a remote SOAP service that is acting as a CAS Consumer, you have
> > to put it into your CPE pipeline wrapped inside an Aggregate Analysis
> > engine.   The aggregate can be a container of just one SOAP component
> > (or, if it makes logical sense in your flow - you can add it to the end
> > of perhaps some other aggregate you already have in your pipeline).
> >
> > Does that answer your question, or did I miss something?
> >
> > -Marshall
> >
> > Baptiste GAILLARD wrote:
> > > Hi Marshall, thanks for your help,
> > >
> > > Can you clarify how you are trying to use a SOAP AE as a CAS Consumer
> > in
> > >
> > >> a CPE descriptor?
> > >>
> > >>
> > >
> > > In fact I was just using the CPE gui tool, I specified in the
> > "Analysis
> > > Engines" part a SOAP AE descriptor and in the "CAS Consumers" part the
> > same
> > > SOAP AE descriptor, it works, no problem !
> > >
> > > Do you have in the CPE descriptor a <casProcessor ... > element for
> > mode
> > >
> > >> "integrated", which specifies a <descriptor> element which imports a
> > >> SOAP remote descriptor?
> > >>
> > >> If so, that is not supported by the current code - see section
> > 3.6.1.1
> > >> where it says, for integrated CAS processors, the referenced
> > descriptor
> > >> must be an Analysis Engine Descriptor.
> > >>
> > >
> > >
> > > Yes, I was trying to do that:
> > >
> > > -- CpeDescriptor.xml --
> > > ...
> > > ...
> > > <casProcessors casPoolSize="3" processingUnitThreadCount="1">
> > >         ...
> > >         <casProcessor deployment="integrated"
> > name="WordsFilePrinterSOAP">
> > >             <descriptor>
> > >                 <import location="WordsFilePrinterSoapService.xml"/>
> > >             </descriptor>
> > >             <deploymentParameters/>
> > >             <errorHandling>
> > >                 <errorRateThreshold action="terminate"
> > value="0/1000"/>
> > >                 <maxConsecutiveRestarts action="terminate"
> > value="30"/>
> > >                 <timeout max="100000" default="-1"/>
> > >             </errorHandling>
> > >             <checkpoint batch="10000" time="1000ms"/>
> > >         </casProcessor>
> > >        ....
> > > </casProcessors>
> > >
> > > -- WordsFilePrinterSoapService.xml --
> > > <uriSpecifier xmlns=" http://uima.apache.org/resourceSpecifier">
> > >     <resourceType>CasConsumer</resourceType>
> > >     <uri>http://localhost:8070/axis/services/urn:WordsFilePrinter
> > </uri>
> > >     <protocol>SOAP</protocol>
> > > </uriSpecifier>
> > >
> > >
> > > If it's not allowed in UIMA for the moment it is normal if it does not
> > work,
> > > ok ;-).
> > >
> > > But, I have only 3 deployment modes:
> > >
> > >
> > >>    -
> > >>
> > >>    For *remote* CAS Processors, the referenced descriptor must be a
> > >>    Vinci *Service Client Descriptor*, which identifies a remotely
> > >>    deployed CAS Processor service.
> > >>    -
> > >>
> > >>    For *local* CAS Processors, the referenced descriptor must be a
> > >>    Vinci *Service Deployment Descriptor*.
> > >>    -
> > >>
> > >>    For *integrated* CAS Processors, the referenced descriptor must be
> > >>    an Analysis Engine Descriptor (primitive or aggregate).
> > >>
> > >> So the only solution to use a SOAP services is "integrated"
> > deployment
> > >>
> > > mode , ok.
> > > But I want to use a Cas Consumer SOAP service in my CPE descriptor, is
> > it
> > > possible ? If not, what is the right thing to do (in the CPE
> > decsriptor) to
> > > communicate with my remote SOAP Cas Consumers ?
> > >
> > > Thanks.
> > >
> > >
> > > Baptiste.
> > >
> > >
> > > 2007/12/3, Marshall Schor <ms...@schor.com>:
> > >
> > >> Hi Baptiste -
> > >>
> > >> Can you clarify how you are trying to use a SOAP AE as a CAS Consumer
> > in
> > >> a CPE descriptor?
> > >>
> > >> Do you have in the CPE descriptor a <casProcessor ... > element for
> > mode
> > >> "integrated", which specifies a <descriptor> element which imports a
> > >> SOAP remote descriptor?
> > >>
> > >> If so, that is not supported by the current code - see section
> > 3.6.1.1
> > >> where it says, for integrated CAS processors, the referenced
> > descriptor
> > >> must be an Analysis Engine Descriptor.
> > >>
> > >>
> > >>
> > http://incubator.apache.org/uima/downloads/releaseDocs/2.2.0-incubating/docs/html/references/references.html#ugr.ref.xml.cpe_descriptor.descriptor.cas_processors.individual
> > >>
> > >> If you're doing something else, please let us know.
> > >>
> > >> Thanks. -Marshall
> > >>
> > >> Baptiste GAILLARD wrote:
> > >>
> > >>> Yes, If I use one Analysis Engine and the same Analysis Engine
> > instead
> > >>>
> > >> of a
> > >>
> > >>> CC the process completed successfully.
> > >>>
> > >>>
> > >>> 2007/12/3, Marshall Schor <ms...@schor.com>:
> > >>>
> > >>>
> > >>>> This appears it might be a bug.  Can you work around by using an
> > >>>> Analysis Engine instead of a Cas Consumer?
> > >>>>
> > >>>> -Marshall
> > >>>>
> > >>>> Baptiste GAILLARD wrote:
> > >>>>
> > >>>>
> > >>>>> Ok, thanks,
> > >>>>>
> > >>>>> I've tried with a SOAP AE and a local integrated CAS Consumer, it
> > >>>>>
> > >> works.
> > >>
> > >>>>> But, If If use a SOAP AE an a SOAP Cas Consumer the following
> > errors
> > >>>>>
> > >> are
> > >>
> > >>>>> displayed:
> > >>>>>
> > >>>>>
> > >>>>> org.apache.uima.resource.ResourceInitializationException:
> > >>>>>
> > >> Initialization
> > >>
> > >>>> of
> > >>>>
> > >>>>
> > >>>>> CAS Processor with name "WordsFilePrinterSoapService.xml" failed.
> > >>>>>         at
> > >>>>>
> > >>>>>
> > >>>>>
> > >>
> > org.apache.uima.collection.impl.CollectionProcessingEngine_impl.initialize
> > >>
> > >>>>> (CollectionProcessingEngine_impl.java:83)
> > >>>>>         at
> > >>>>>
> > >>>>>
> > >>>>>
> > >>
> > org.apache.uima.impl.UIMAFramework_impl._produceCollectionProcessingEngine
> > >>
> > >>>>> (UIMAFramework_impl.java:395)
> > >>>>>         at
> > >>>>>
> > >>>>>
> > >>>> org.apache.uima.UIMAFramework.produceCollectionProcessingEngine(
> > >>>>
> > >>>>
> > >>>>> UIMAFramework.java:807)
> > >>>>>         at org.apache.uima.tools.cpm.CpmPanel.startProcessing(
> > >>>>>
> > >>>>>
> > >>>> CpmPanel.java
> > >>>>
> > >>>>
> > >>>>> :538)
> > >>>>>         at org.apache.uima.tools.cpm.CpmPanel.access$000(
> > CpmPanel.java
> > >>>>>
> > >>>>>
> > >>>> :96)
> > >>>>
> > >>>>
> > >>>>>         at org.apache.uima.tools.cpm.CpmPanel$1.construct(
> > >>>>>
> > >> CpmPanel.java
> > >>
> > >>>> :678)
> > >>>>
> > >>>>
> > >>>>>         at org.apache.uima.tools.util.gui.SwingWorker$2.run (
> > >>>>>
> > >>>>>
> > >>>> SwingWorker.java
> > >>>>
> > >>>>
> > >>>>> :130)
> > >>>>>         at java.lang.Thread.run(Thread.java :595)
> > >>>>> Caused by: org.apache.uima.resource.ResourceConfigurationException
> > :
> > >>>>> Initialization of CAS Processor with name "
> > >>>>>
> > >>>>>
> > >>>> WordsFilePrinterSoapService.xml"
> > >>>>
> > >>>>
> > >>>>> failed.
> > >>>>>         at
> > >>>>>
> > >>>>>
> > >>>>>
> > >>
> > org.apache.uima.collection.impl.cpm.container.CPEFactory.produceIntegratedCasProcessor
> > >>
> > >>>>> (CPEFactory.java:1107)
> > >>>>>         at
> > >>>>>
> > >>>>>
> > >>>>>
> > >>
> > org.apache.uima.collection.impl.cpm.container.CPEFactory.getCasProcessors
> > (
> > >>
> > >>>>> CPEFactory.java:550)
> > >>>>>         at org.apache.uima.collection.impl.cpm.BaseCPMImpl.init(
> > >>>>> BaseCPMImpl.java:253)
> > >>>>>         at org.apache.uima.collection.impl.cpm.BaseCPMImpl.<init>(
> > >>>>> BaseCPMImpl.java:127)
> > >>>>>         at
> > >>>>>
> > >>>>>
> > >>>>>
> > >>
> > org.apache.uima.collection.impl.CollectionProcessingEngine_impl.initialize
> > >>
> > >>>>> (CollectionProcessingEngine_impl.java:75)
> > >>>>>         ... 7 more
> > >>>>> Caused by:
> > org.apache.uima.resource.ResourceInitializationException:
> > >>>>>
> > >> The
> > >>
> > >>>>> Resource Factory does not know how to create a resource of class
> > >>>>> org.apache.uima.analysis_engine.AnalysisEngine from
> > >>>>> the given ResourceSpecifier. (Descriptor:
> > >>>>>
> > >>>>>
> > >>>>>
> > >>
> > file:/D:/workspace/imp-helper-uima/src/main/resources/descriptors/soap/WordsFilePrinterSoapService.xml)
> > >>
> > >>>>>         at org.apache.uima.UIMAFramework.produceResource(
> > >>>>>
> > >>>>>
> > >>>> UIMAFramework.java
> > >>>>
> > >>>>
> > >>>>> :261)
> > >>>>>         at org.apache.uima.UIMAFramework.produceResource(
> > >>>>>
> > >>>>>
> > >>>> UIMAFramework.java
> > >>>>
> > >>>>
> > >>>>> :303)
> > >>>>>         at org.apache.uima.UIMAFramework.produceAnalysisEngine(
> > >>>>> UIMAFramework.java:383)
> > >>>>>         at
> > >>>>>
> > >>>>>
> > >>>>>
> > >>
> > org.apache.uima.collection.impl.cpm.container.CPEFactory.produceIntegratedCasProcessor
> > >>
> > >>>>> (CPEFactory.java:1091)
> > >>>>>         ... 11 more
> > >>>>>
> > >>>>> So, it seams to work with SOAP AE but not SOAP CC.
> > >>>>>
> > >>>>>
> > >>>>> Baptiste.
> > >>>>>
> > >>>>>
> > >>>>> 2007/11/29, Adam Lally <al...@alum.rpi.edu>:
> > >>>>>
> > >>>>>
> > >>>>>
> > >>>>>> On Nov 29, 2007 10:37 AM, Baptiste GAILLARD <
> > >>>>>>
> > >>>>>>
> > >>>> baptiste.gaillard@gmail.com>
> > >>>>
> > >>>>
> > >>>>>> wrote:
> > >>>>>>
> > >>>>>>
> > >>>>>>
> > >>>>>>> <?xml version="1.0" encoding="UTF-8"?>
> > >>>>>>>         <casProcessor deployment="remote"
> > >>>>>>> name="WordsListAnnotatorSoapService">
> > >>>>>>>             <descriptor>
> > >>>>>>>                 <include
> > >>>>>>>
> > >>>>>>>
> > >>>>>>>
> > >>>>>>>
> > >>
> > href="D:\workspace\imp-helper-uima\src\main\resources\descriptors\soap\WordsListAnnotatorSoapService.xml"/>
> > >>
> > >>>>>>>             </descriptor>
> > >>>>>>>
> > >>>>>>>
> > >>>>>>>
> > >>>>>> <snip/>
> > >>>>>>
> > >>>>>> Use deployment="integrated" instead of deployment="remote".  I
> > know
> > >>>>>> that's confusing.  Using deployment="integrated" will actually
> > work
> > >>>>>> just fine for remote services.  deployment="remote" invokes some
> > >>>>>> specialized processing specifically for Vinci services, but is
> > not
> > >>>>>> generally needed.
> > >>>>>>
> > >>>>>> -Adam
> > >>>>>>
> > >>>>>>
> > >>>>>>
> > >>>>>>
> > >>>
> > >>
> > >
> > >
> >
> >
>

Re: How to use a SOAP component in a CPE ?

Posted by Baptiste GAILLARD <ba...@gmail.com>.
Ok, so I will integrate that SOAP service descriptor inside an Aggregate AE.


I'll try that soon.

Does that answer your question, or did I miss something?


Yes, I think it will solve my problems, thank you Marshall !!!


Baptiste.

2007/12/4, Marshall Schor <ms...@schor.com>:
>
> If you a remote SOAP service that is acting as a CAS Consumer, you have
> to put it into your CPE pipeline wrapped inside an Aggregate Analysis
> engine.   The aggregate can be a container of just one SOAP component
> (or, if it makes logical sense in your flow - you can add it to the end
> of perhaps some other aggregate you already have in your pipeline).
>
> Does that answer your question, or did I miss something?
>
> -Marshall
>
> Baptiste GAILLARD wrote:
> > Hi Marshall, thanks for your help,
> >
> > Can you clarify how you are trying to use a SOAP AE as a CAS Consumer in
> >
> >> a CPE descriptor?
> >>
> >>
> >
> > In fact I was just using the CPE gui tool, I specified in the "Analysis
> > Engines" part a SOAP AE descriptor and in the "CAS Consumers" part the
> same
> > SOAP AE descriptor, it works, no problem !
> >
> > Do you have in the CPE descriptor a <casProcessor ... > element for mode
> >
> >> "integrated", which specifies a <descriptor> element which imports a
> >> SOAP remote descriptor?
> >>
> >> If so, that is not supported by the current code - see section 3.6.1.1
> >> where it says, for integrated CAS processors, the referenced descriptor
> >> must be an Analysis Engine Descriptor.
> >>
> >
> >
> > Yes, I was trying to do that:
> >
> > -- CpeDescriptor.xml --
> > ...
> > ...
> > <casProcessors casPoolSize="3" processingUnitThreadCount="1">
> >         ...
> >         <casProcessor deployment="integrated"
> name="WordsFilePrinterSOAP">
> >             <descriptor>
> >                 <import location="WordsFilePrinterSoapService.xml"/>
> >             </descriptor>
> >             <deploymentParameters/>
> >             <errorHandling>
> >                 <errorRateThreshold action="terminate" value="0/1000"/>
> >                 <maxConsecutiveRestarts action="terminate" value="30"/>
> >                 <timeout max="100000" default="-1"/>
> >             </errorHandling>
> >             <checkpoint batch="10000" time="1000ms"/>
> >         </casProcessor>
> >        ....
> > </casProcessors>
> >
> > -- WordsFilePrinterSoapService.xml --
> > <uriSpecifier xmlns="http://uima.apache.org/resourceSpecifier">
> >     <resourceType>CasConsumer</resourceType>
> >     <uri>http://localhost:8070/axis/services/urn:WordsFilePrinter</uri>
> >     <protocol>SOAP</protocol>
> > </uriSpecifier>
> >
> >
> > If it's not allowed in UIMA for the moment it is normal if it does not
> work,
> > ok ;-).
> >
> > But, I have only 3 deployment modes:
> >
> >
> >>    -
> >>
> >>    For *remote* CAS Processors, the referenced descriptor must be a
> >>    Vinci *Service Client Descriptor*, which identifies a remotely
> >>    deployed CAS Processor service.
> >>    -
> >>
> >>    For *local* CAS Processors, the referenced descriptor must be a
> >>    Vinci *Service Deployment Descriptor*.
> >>    -
> >>
> >>    For *integrated* CAS Processors, the referenced descriptor must be
> >>    an Analysis Engine Descriptor (primitive or aggregate).
> >>
> >> So the only solution to use a SOAP services is "integrated" deployment
> >>
> > mode , ok.
> > But I want to use a Cas Consumer SOAP service in my CPE descriptor, is
> it
> > possible ? If not, what is the right thing to do (in the CPE decsriptor)
> to
> > communicate with my remote SOAP Cas Consumers ?
> >
> > Thanks.
> >
> >
> > Baptiste.
> >
> >
> > 2007/12/3, Marshall Schor <ms...@schor.com>:
> >
> >> Hi Baptiste -
> >>
> >> Can you clarify how you are trying to use a SOAP AE as a CAS Consumer
> in
> >> a CPE descriptor?
> >>
> >> Do you have in the CPE descriptor a <casProcessor ... > element for
> mode
> >> "integrated", which specifies a <descriptor> element which imports a
> >> SOAP remote descriptor?
> >>
> >> If so, that is not supported by the current code - see section 3.6.1.1
> >> where it says, for integrated CAS processors, the referenced descriptor
> >> must be an Analysis Engine Descriptor.
> >>
> >>
> >>
> http://incubator.apache.org/uima/downloads/releaseDocs/2.2.0-incubating/docs/html/references/references.html#ugr.ref.xml.cpe_descriptor.descriptor.cas_processors.individual
> >>
> >> If you're doing something else, please let us know.
> >>
> >> Thanks. -Marshall
> >>
> >> Baptiste GAILLARD wrote:
> >>
> >>> Yes, If I use one Analysis Engine and the same Analysis Engine instead
> >>>
> >> of a
> >>
> >>> CC the process completed successfully.
> >>>
> >>>
> >>> 2007/12/3, Marshall Schor <ms...@schor.com>:
> >>>
> >>>
> >>>> This appears it might be a bug.  Can you work around by using an
> >>>> Analysis Engine instead of a Cas Consumer?
> >>>>
> >>>> -Marshall
> >>>>
> >>>> Baptiste GAILLARD wrote:
> >>>>
> >>>>
> >>>>> Ok, thanks,
> >>>>>
> >>>>> I've tried with a SOAP AE and a local integrated CAS Consumer, it
> >>>>>
> >> works.
> >>
> >>>>> But, If If use a SOAP AE an a SOAP Cas Consumer the following errors
> >>>>>
> >> are
> >>
> >>>>> displayed:
> >>>>>
> >>>>>
> >>>>> org.apache.uima.resource.ResourceInitializationException:
> >>>>>
> >> Initialization
> >>
> >>>> of
> >>>>
> >>>>
> >>>>> CAS Processor with name "WordsFilePrinterSoapService.xml" failed.
> >>>>>         at
> >>>>>
> >>>>>
> >>>>>
> >>
> org.apache.uima.collection.impl.CollectionProcessingEngine_impl.initialize
> >>
> >>>>> (CollectionProcessingEngine_impl.java:83)
> >>>>>         at
> >>>>>
> >>>>>
> >>>>>
> >>
> org.apache.uima.impl.UIMAFramework_impl._produceCollectionProcessingEngine
> >>
> >>>>> (UIMAFramework_impl.java:395)
> >>>>>         at
> >>>>>
> >>>>>
> >>>> org.apache.uima.UIMAFramework.produceCollectionProcessingEngine(
> >>>>
> >>>>
> >>>>> UIMAFramework.java:807)
> >>>>>         at org.apache.uima.tools.cpm.CpmPanel.startProcessing(
> >>>>>
> >>>>>
> >>>> CpmPanel.java
> >>>>
> >>>>
> >>>>> :538)
> >>>>>         at org.apache.uima.tools.cpm.CpmPanel.access$000(
> CpmPanel.java
> >>>>>
> >>>>>
> >>>> :96)
> >>>>
> >>>>
> >>>>>         at org.apache.uima.tools.cpm.CpmPanel$1.construct(
> >>>>>
> >> CpmPanel.java
> >>
> >>>> :678)
> >>>>
> >>>>
> >>>>>         at org.apache.uima.tools.util.gui.SwingWorker$2.run(
> >>>>>
> >>>>>
> >>>> SwingWorker.java
> >>>>
> >>>>
> >>>>> :130)
> >>>>>         at java.lang.Thread.run(Thread.java:595)
> >>>>> Caused by: org.apache.uima.resource.ResourceConfigurationException:
> >>>>> Initialization of CAS Processor with name "
> >>>>>
> >>>>>
> >>>> WordsFilePrinterSoapService.xml"
> >>>>
> >>>>
> >>>>> failed.
> >>>>>         at
> >>>>>
> >>>>>
> >>>>>
> >>
> org.apache.uima.collection.impl.cpm.container.CPEFactory.produceIntegratedCasProcessor
> >>
> >>>>> (CPEFactory.java:1107)
> >>>>>         at
> >>>>>
> >>>>>
> >>>>>
> >>
> org.apache.uima.collection.impl.cpm.container.CPEFactory.getCasProcessors(
> >>
> >>>>> CPEFactory.java:550)
> >>>>>         at org.apache.uima.collection.impl.cpm.BaseCPMImpl.init(
> >>>>> BaseCPMImpl.java:253)
> >>>>>         at org.apache.uima.collection.impl.cpm.BaseCPMImpl.<init>(
> >>>>> BaseCPMImpl.java:127)
> >>>>>         at
> >>>>>
> >>>>>
> >>>>>
> >>
> org.apache.uima.collection.impl.CollectionProcessingEngine_impl.initialize
> >>
> >>>>> (CollectionProcessingEngine_impl.java:75)
> >>>>>         ... 7 more
> >>>>> Caused by: org.apache.uima.resource.ResourceInitializationException:
> >>>>>
> >> The
> >>
> >>>>> Resource Factory does not know how to create a resource of class
> >>>>> org.apache.uima.analysis_engine.AnalysisEngine from
> >>>>> the given ResourceSpecifier. (Descriptor:
> >>>>>
> >>>>>
> >>>>>
> >>
> file:/D:/workspace/imp-helper-uima/src/main/resources/descriptors/soap/WordsFilePrinterSoapService.xml)
> >>
> >>>>>         at org.apache.uima.UIMAFramework.produceResource(
> >>>>>
> >>>>>
> >>>> UIMAFramework.java
> >>>>
> >>>>
> >>>>> :261)
> >>>>>         at org.apache.uima.UIMAFramework.produceResource(
> >>>>>
> >>>>>
> >>>> UIMAFramework.java
> >>>>
> >>>>
> >>>>> :303)
> >>>>>         at org.apache.uima.UIMAFramework.produceAnalysisEngine(
> >>>>> UIMAFramework.java:383)
> >>>>>         at
> >>>>>
> >>>>>
> >>>>>
> >>
> org.apache.uima.collection.impl.cpm.container.CPEFactory.produceIntegratedCasProcessor
> >>
> >>>>> (CPEFactory.java:1091)
> >>>>>         ... 11 more
> >>>>>
> >>>>> So, it seams to work with SOAP AE but not SOAP CC.
> >>>>>
> >>>>>
> >>>>> Baptiste.
> >>>>>
> >>>>>
> >>>>> 2007/11/29, Adam Lally <al...@alum.rpi.edu>:
> >>>>>
> >>>>>
> >>>>>
> >>>>>> On Nov 29, 2007 10:37 AM, Baptiste GAILLARD <
> >>>>>>
> >>>>>>
> >>>> baptiste.gaillard@gmail.com>
> >>>>
> >>>>
> >>>>>> wrote:
> >>>>>>
> >>>>>>
> >>>>>>
> >>>>>>> <?xml version="1.0" encoding="UTF-8"?>
> >>>>>>>         <casProcessor deployment="remote"
> >>>>>>> name="WordsListAnnotatorSoapService">
> >>>>>>>             <descriptor>
> >>>>>>>                 <include
> >>>>>>>
> >>>>>>>
> >>>>>>>
> >>>>>>>
> >>
> href="D:\workspace\imp-helper-uima\src\main\resources\descriptors\soap\WordsListAnnotatorSoapService.xml"/>
> >>
> >>>>>>>             </descriptor>
> >>>>>>>
> >>>>>>>
> >>>>>>>
> >>>>>> <snip/>
> >>>>>>
> >>>>>> Use deployment="integrated" instead of deployment="remote".  I know
> >>>>>> that's confusing.  Using deployment="integrated" will actually work
> >>>>>> just fine for remote services.  deployment="remote" invokes some
> >>>>>> specialized processing specifically for Vinci services, but is not
> >>>>>> generally needed.
> >>>>>>
> >>>>>> -Adam
> >>>>>>
> >>>>>>
> >>>>>>
> >>>>>>
> >>>
> >>
> >
> >
>
>

Re: How to use a SOAP component in a CPE ?

Posted by Marshall Schor <ms...@schor.com>.
If you a remote SOAP service that is acting as a CAS Consumer, you have
to put it into your CPE pipeline wrapped inside an Aggregate Analysis
engine.   The aggregate can be a container of just one SOAP component
(or, if it makes logical sense in your flow - you can add it to the end
of perhaps some other aggregate you already have in your pipeline).

Does that answer your question, or did I miss something?

-Marshall

Baptiste GAILLARD wrote:
> Hi Marshall, thanks for your help,
>
> Can you clarify how you are trying to use a SOAP AE as a CAS Consumer in
>   
>> a CPE descriptor?
>>
>>     
>
> In fact I was just using the CPE gui tool, I specified in the "Analysis
> Engines" part a SOAP AE descriptor and in the "CAS Consumers" part the same
> SOAP AE descriptor, it works, no problem !
>
> Do you have in the CPE descriptor a <casProcessor ... > element for mode
>   
>> "integrated", which specifies a <descriptor> element which imports a
>> SOAP remote descriptor?
>>
>> If so, that is not supported by the current code - see section 3.6.1.1
>> where it says, for integrated CAS processors, the referenced descriptor
>> must be an Analysis Engine Descriptor.
>>     
>
>
> Yes, I was trying to do that:
>
> -- CpeDescriptor.xml --
> ...
> ...
> <casProcessors casPoolSize="3" processingUnitThreadCount="1">
>         ...
>         <casProcessor deployment="integrated" name="WordsFilePrinterSOAP">
>             <descriptor>
>                 <import location="WordsFilePrinterSoapService.xml"/>
>             </descriptor>
>             <deploymentParameters/>
>             <errorHandling>
>                 <errorRateThreshold action="terminate" value="0/1000"/>
>                 <maxConsecutiveRestarts action="terminate" value="30"/>
>                 <timeout max="100000" default="-1"/>
>             </errorHandling>
>             <checkpoint batch="10000" time="1000ms"/>
>         </casProcessor>
>        ....
> </casProcessors>
>
> -- WordsFilePrinterSoapService.xml --
> <uriSpecifier xmlns="http://uima.apache.org/resourceSpecifier">
>     <resourceType>CasConsumer</resourceType>
>     <uri>http://localhost:8070/axis/services/urn:WordsFilePrinter</uri>
>     <protocol>SOAP</protocol>
> </uriSpecifier>
>
>
> If it's not allowed in UIMA for the moment it is normal if it does not work,
> ok ;-).
>
> But, I have only 3 deployment modes:
>
>   
>>    -
>>
>>    For *remote* CAS Processors, the referenced descriptor must be a
>>    Vinci *Service Client Descriptor*, which identifies a remotely
>>    deployed CAS Processor service.
>>    -
>>
>>    For *local* CAS Processors, the referenced descriptor must be a
>>    Vinci *Service Deployment Descriptor*.
>>    -
>>
>>    For *integrated* CAS Processors, the referenced descriptor must be
>>    an Analysis Engine Descriptor (primitive or aggregate).
>>
>> So the only solution to use a SOAP services is "integrated" deployment
>>     
> mode , ok.
> But I want to use a Cas Consumer SOAP service in my CPE descriptor, is it
> possible ? If not, what is the right thing to do (in the CPE decsriptor) to
> communicate with my remote SOAP Cas Consumers ?
>
> Thanks.
>
>
> Baptiste.
>
>
> 2007/12/3, Marshall Schor <ms...@schor.com>:
>   
>> Hi Baptiste -
>>
>> Can you clarify how you are trying to use a SOAP AE as a CAS Consumer in
>> a CPE descriptor?
>>
>> Do you have in the CPE descriptor a <casProcessor ... > element for mode
>> "integrated", which specifies a <descriptor> element which imports a
>> SOAP remote descriptor?
>>
>> If so, that is not supported by the current code - see section 3.6.1.1
>> where it says, for integrated CAS processors, the referenced descriptor
>> must be an Analysis Engine Descriptor.
>>
>>
>> http://incubator.apache.org/uima/downloads/releaseDocs/2.2.0-incubating/docs/html/references/references.html#ugr.ref.xml.cpe_descriptor.descriptor.cas_processors.individual
>>
>> If you're doing something else, please let us know.
>>
>> Thanks. -Marshall
>>
>> Baptiste GAILLARD wrote:
>>     
>>> Yes, If I use one Analysis Engine and the same Analysis Engine instead
>>>       
>> of a
>>     
>>> CC the process completed successfully.
>>>
>>>
>>> 2007/12/3, Marshall Schor <ms...@schor.com>:
>>>
>>>       
>>>> This appears it might be a bug.  Can you work around by using an
>>>> Analysis Engine instead of a Cas Consumer?
>>>>
>>>> -Marshall
>>>>
>>>> Baptiste GAILLARD wrote:
>>>>
>>>>         
>>>>> Ok, thanks,
>>>>>
>>>>> I've tried with a SOAP AE and a local integrated CAS Consumer, it
>>>>>           
>> works.
>>     
>>>>> But, If If use a SOAP AE an a SOAP Cas Consumer the following errors
>>>>>           
>> are
>>     
>>>>> displayed:
>>>>>
>>>>>
>>>>> org.apache.uima.resource.ResourceInitializationException:
>>>>>           
>> Initialization
>>     
>>>> of
>>>>
>>>>         
>>>>> CAS Processor with name "WordsFilePrinterSoapService.xml" failed.
>>>>>         at
>>>>>
>>>>>
>>>>>           
>> org.apache.uima.collection.impl.CollectionProcessingEngine_impl.initialize
>>     
>>>>> (CollectionProcessingEngine_impl.java:83)
>>>>>         at
>>>>>
>>>>>
>>>>>           
>> org.apache.uima.impl.UIMAFramework_impl._produceCollectionProcessingEngine
>>     
>>>>> (UIMAFramework_impl.java:395)
>>>>>         at
>>>>>
>>>>>           
>>>> org.apache.uima.UIMAFramework.produceCollectionProcessingEngine(
>>>>
>>>>         
>>>>> UIMAFramework.java:807)
>>>>>         at org.apache.uima.tools.cpm.CpmPanel.startProcessing(
>>>>>
>>>>>           
>>>> CpmPanel.java
>>>>
>>>>         
>>>>> :538)
>>>>>         at org.apache.uima.tools.cpm.CpmPanel.access$000(CpmPanel.java
>>>>>
>>>>>           
>>>> :96)
>>>>
>>>>         
>>>>>         at org.apache.uima.tools.cpm.CpmPanel$1.construct(
>>>>>           
>> CpmPanel.java
>>     
>>>> :678)
>>>>
>>>>         
>>>>>         at org.apache.uima.tools.util.gui.SwingWorker$2.run(
>>>>>
>>>>>           
>>>> SwingWorker.java
>>>>
>>>>         
>>>>> :130)
>>>>>         at java.lang.Thread.run(Thread.java:595)
>>>>> Caused by: org.apache.uima.resource.ResourceConfigurationException:
>>>>> Initialization of CAS Processor with name "
>>>>>
>>>>>           
>>>> WordsFilePrinterSoapService.xml"
>>>>
>>>>         
>>>>> failed.
>>>>>         at
>>>>>
>>>>>
>>>>>           
>> org.apache.uima.collection.impl.cpm.container.CPEFactory.produceIntegratedCasProcessor
>>     
>>>>> (CPEFactory.java:1107)
>>>>>         at
>>>>>
>>>>>
>>>>>           
>> org.apache.uima.collection.impl.cpm.container.CPEFactory.getCasProcessors(
>>     
>>>>> CPEFactory.java:550)
>>>>>         at org.apache.uima.collection.impl.cpm.BaseCPMImpl.init(
>>>>> BaseCPMImpl.java:253)
>>>>>         at org.apache.uima.collection.impl.cpm.BaseCPMImpl.<init>(
>>>>> BaseCPMImpl.java:127)
>>>>>         at
>>>>>
>>>>>
>>>>>           
>> org.apache.uima.collection.impl.CollectionProcessingEngine_impl.initialize
>>     
>>>>> (CollectionProcessingEngine_impl.java:75)
>>>>>         ... 7 more
>>>>> Caused by: org.apache.uima.resource.ResourceInitializationException:
>>>>>           
>> The
>>     
>>>>> Resource Factory does not know how to create a resource of class
>>>>> org.apache.uima.analysis_engine.AnalysisEngine from
>>>>> the given ResourceSpecifier. (Descriptor:
>>>>>
>>>>>
>>>>>           
>> file:/D:/workspace/imp-helper-uima/src/main/resources/descriptors/soap/WordsFilePrinterSoapService.xml)
>>     
>>>>>         at org.apache.uima.UIMAFramework.produceResource(
>>>>>
>>>>>           
>>>> UIMAFramework.java
>>>>
>>>>         
>>>>> :261)
>>>>>         at org.apache.uima.UIMAFramework.produceResource(
>>>>>
>>>>>           
>>>> UIMAFramework.java
>>>>
>>>>         
>>>>> :303)
>>>>>         at org.apache.uima.UIMAFramework.produceAnalysisEngine(
>>>>> UIMAFramework.java:383)
>>>>>         at
>>>>>
>>>>>
>>>>>           
>> org.apache.uima.collection.impl.cpm.container.CPEFactory.produceIntegratedCasProcessor
>>     
>>>>> (CPEFactory.java:1091)
>>>>>         ... 11 more
>>>>>
>>>>> So, it seams to work with SOAP AE but not SOAP CC.
>>>>>
>>>>>
>>>>> Baptiste.
>>>>>
>>>>>
>>>>> 2007/11/29, Adam Lally <al...@alum.rpi.edu>:
>>>>>
>>>>>
>>>>>           
>>>>>> On Nov 29, 2007 10:37 AM, Baptiste GAILLARD <
>>>>>>
>>>>>>             
>>>> baptiste.gaillard@gmail.com>
>>>>
>>>>         
>>>>>> wrote:
>>>>>>
>>>>>>
>>>>>>             
>>>>>>> <?xml version="1.0" encoding="UTF-8"?>
>>>>>>>         <casProcessor deployment="remote"
>>>>>>> name="WordsListAnnotatorSoapService">
>>>>>>>             <descriptor>
>>>>>>>                 <include
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>               
>> href="D:\workspace\imp-helper-uima\src\main\resources\descriptors\soap\WordsListAnnotatorSoapService.xml"/>
>>     
>>>>>>>             </descriptor>
>>>>>>>
>>>>>>>
>>>>>>>               
>>>>>> <snip/>
>>>>>>
>>>>>> Use deployment="integrated" instead of deployment="remote".  I know
>>>>>> that's confusing.  Using deployment="integrated" will actually work
>>>>>> just fine for remote services.  deployment="remote" invokes some
>>>>>> specialized processing specifically for Vinci services, but is not
>>>>>> generally needed.
>>>>>>
>>>>>> -Adam
>>>>>>
>>>>>>
>>>>>>
>>>>>>             
>>>       
>>     
>
>   


Re: How to use a SOAP component in a CPE ?

Posted by Baptiste GAILLARD <ba...@gmail.com>.
Hi Marshall, thanks for your help,

Can you clarify how you are trying to use a SOAP AE as a CAS Consumer in
> a CPE descriptor?
>

In fact I was just using the CPE gui tool, I specified in the "Analysis
Engines" part a SOAP AE descriptor and in the "CAS Consumers" part the same
SOAP AE descriptor, it works, no problem !

Do you have in the CPE descriptor a <casProcessor ... > element for mode
> "integrated", which specifies a <descriptor> element which imports a
> SOAP remote descriptor?
>
> If so, that is not supported by the current code - see section 3.6.1.1
> where it says, for integrated CAS processors, the referenced descriptor
> must be an Analysis Engine Descriptor.


Yes, I was trying to do that:

-- CpeDescriptor.xml --
...
...
<casProcessors casPoolSize="3" processingUnitThreadCount="1">
        ...
        <casProcessor deployment="integrated" name="WordsFilePrinterSOAP">
            <descriptor>
                <import location="WordsFilePrinterSoapService.xml"/>
            </descriptor>
            <deploymentParameters/>
            <errorHandling>
                <errorRateThreshold action="terminate" value="0/1000"/>
                <maxConsecutiveRestarts action="terminate" value="30"/>
                <timeout max="100000" default="-1"/>
            </errorHandling>
            <checkpoint batch="10000" time="1000ms"/>
        </casProcessor>
       ....
</casProcessors>

-- WordsFilePrinterSoapService.xml --
<uriSpecifier xmlns="http://uima.apache.org/resourceSpecifier">
    <resourceType>CasConsumer</resourceType>
    <uri>http://localhost:8070/axis/services/urn:WordsFilePrinter</uri>
    <protocol>SOAP</protocol>
</uriSpecifier>


If it's not allowed in UIMA for the moment it is normal if it does not work,
ok ;-).

But, I have only 3 deployment modes:

>
>    -
>
>    For *remote* CAS Processors, the referenced descriptor must be a
>    Vinci *Service Client Descriptor*, which identifies a remotely
>    deployed CAS Processor service.
>    -
>
>    For *local* CAS Processors, the referenced descriptor must be a
>    Vinci *Service Deployment Descriptor*.
>    -
>
>    For *integrated* CAS Processors, the referenced descriptor must be
>    an Analysis Engine Descriptor (primitive or aggregate).
>
> So the only solution to use a SOAP services is "integrated" deployment
mode , ok.
But I want to use a Cas Consumer SOAP service in my CPE descriptor, is it
possible ? If not, what is the right thing to do (in the CPE decsriptor) to
communicate with my remote SOAP Cas Consumers ?

Thanks.


Baptiste.


2007/12/3, Marshall Schor <ms...@schor.com>:
>
> Hi Baptiste -
>
> Can you clarify how you are trying to use a SOAP AE as a CAS Consumer in
> a CPE descriptor?
>
> Do you have in the CPE descriptor a <casProcessor ... > element for mode
> "integrated", which specifies a <descriptor> element which imports a
> SOAP remote descriptor?
>
> If so, that is not supported by the current code - see section 3.6.1.1
> where it says, for integrated CAS processors, the referenced descriptor
> must be an Analysis Engine Descriptor.
>
>
> http://incubator.apache.org/uima/downloads/releaseDocs/2.2.0-incubating/docs/html/references/references.html#ugr.ref.xml.cpe_descriptor.descriptor.cas_processors.individual
>
> If you're doing something else, please let us know.
>
> Thanks. -Marshall
>
> Baptiste GAILLARD wrote:
> > Yes, If I use one Analysis Engine and the same Analysis Engine instead
> of a
> > CC the process completed successfully.
> >
> >
> > 2007/12/3, Marshall Schor <ms...@schor.com>:
> >
> >> This appears it might be a bug.  Can you work around by using an
> >> Analysis Engine instead of a Cas Consumer?
> >>
> >> -Marshall
> >>
> >> Baptiste GAILLARD wrote:
> >>
> >>> Ok, thanks,
> >>>
> >>> I've tried with a SOAP AE and a local integrated CAS Consumer, it
> works.
> >>>
> >>> But, If If use a SOAP AE an a SOAP Cas Consumer the following errors
> are
> >>> displayed:
> >>>
> >>>
> >>> org.apache.uima.resource.ResourceInitializationException:
> Initialization
> >>>
> >> of
> >>
> >>> CAS Processor with name "WordsFilePrinterSoapService.xml" failed.
> >>>         at
> >>>
> >>>
> >>
> org.apache.uima.collection.impl.CollectionProcessingEngine_impl.initialize
> >>
> >>> (CollectionProcessingEngine_impl.java:83)
> >>>         at
> >>>
> >>>
> >>
> org.apache.uima.impl.UIMAFramework_impl._produceCollectionProcessingEngine
> >>
> >>> (UIMAFramework_impl.java:395)
> >>>         at
> >>>
> >> org.apache.uima.UIMAFramework.produceCollectionProcessingEngine(
> >>
> >>> UIMAFramework.java:807)
> >>>         at org.apache.uima.tools.cpm.CpmPanel.startProcessing(
> >>>
> >> CpmPanel.java
> >>
> >>> :538)
> >>>         at org.apache.uima.tools.cpm.CpmPanel.access$000(CpmPanel.java
> >>>
> >> :96)
> >>
> >>>         at org.apache.uima.tools.cpm.CpmPanel$1.construct(
> CpmPanel.java
> >>>
> >> :678)
> >>
> >>>         at org.apache.uima.tools.util.gui.SwingWorker$2.run(
> >>>
> >> SwingWorker.java
> >>
> >>> :130)
> >>>         at java.lang.Thread.run(Thread.java:595)
> >>> Caused by: org.apache.uima.resource.ResourceConfigurationException:
> >>> Initialization of CAS Processor with name "
> >>>
> >> WordsFilePrinterSoapService.xml"
> >>
> >>> failed.
> >>>         at
> >>>
> >>>
> >>
> org.apache.uima.collection.impl.cpm.container.CPEFactory.produceIntegratedCasProcessor
> >>
> >>> (CPEFactory.java:1107)
> >>>         at
> >>>
> >>>
> >>
> org.apache.uima.collection.impl.cpm.container.CPEFactory.getCasProcessors(
> >>
> >>> CPEFactory.java:550)
> >>>         at org.apache.uima.collection.impl.cpm.BaseCPMImpl.init(
> >>> BaseCPMImpl.java:253)
> >>>         at org.apache.uima.collection.impl.cpm.BaseCPMImpl.<init>(
> >>> BaseCPMImpl.java:127)
> >>>         at
> >>>
> >>>
> >>
> org.apache.uima.collection.impl.CollectionProcessingEngine_impl.initialize
> >>
> >>> (CollectionProcessingEngine_impl.java:75)
> >>>         ... 7 more
> >>> Caused by: org.apache.uima.resource.ResourceInitializationException:
> The
> >>> Resource Factory does not know how to create a resource of class
> >>> org.apache.uima.analysis_engine.AnalysisEngine from
> >>> the given ResourceSpecifier. (Descriptor:
> >>>
> >>>
> >>
> file:/D:/workspace/imp-helper-uima/src/main/resources/descriptors/soap/WordsFilePrinterSoapService.xml)
> >>
> >>>         at org.apache.uima.UIMAFramework.produceResource(
> >>>
> >> UIMAFramework.java
> >>
> >>> :261)
> >>>         at org.apache.uima.UIMAFramework.produceResource(
> >>>
> >> UIMAFramework.java
> >>
> >>> :303)
> >>>         at org.apache.uima.UIMAFramework.produceAnalysisEngine(
> >>> UIMAFramework.java:383)
> >>>         at
> >>>
> >>>
> >>
> org.apache.uima.collection.impl.cpm.container.CPEFactory.produceIntegratedCasProcessor
> >>
> >>> (CPEFactory.java:1091)
> >>>         ... 11 more
> >>>
> >>> So, it seams to work with SOAP AE but not SOAP CC.
> >>>
> >>>
> >>> Baptiste.
> >>>
> >>>
> >>> 2007/11/29, Adam Lally <al...@alum.rpi.edu>:
> >>>
> >>>
> >>>> On Nov 29, 2007 10:37 AM, Baptiste GAILLARD <
> >>>>
> >> baptiste.gaillard@gmail.com>
> >>
> >>>> wrote:
> >>>>
> >>>>
> >>>>> <?xml version="1.0" encoding="UTF-8"?>
> >>>>>         <casProcessor deployment="remote"
> >>>>> name="WordsListAnnotatorSoapService">
> >>>>>             <descriptor>
> >>>>>                 <include
> >>>>>
> >>>>>
> >>>>>
> >>
> href="D:\workspace\imp-helper-uima\src\main\resources\descriptors\soap\WordsListAnnotatorSoapService.xml"/>
> >>
> >>>>>             </descriptor>
> >>>>>
> >>>>>
> >>>> <snip/>
> >>>>
> >>>> Use deployment="integrated" instead of deployment="remote".  I know
> >>>> that's confusing.  Using deployment="integrated" will actually work
> >>>> just fine for remote services.  deployment="remote" invokes some
> >>>> specialized processing specifically for Vinci services, but is not
> >>>> generally needed.
> >>>>
> >>>> -Adam
> >>>>
> >>>>
> >>>>
> >>>
> >>
> >
> >
>
>

Re: How to use a SOAP component in a CPE ?

Posted by Marshall Schor <ms...@schor.com>.
Hi Baptiste -

Can you clarify how you are trying to use a SOAP AE as a CAS Consumer in
a CPE descriptor?

Do you have in the CPE descriptor a <casProcessor ... > element for mode
"integrated", which specifies a <descriptor> element which imports a
SOAP remote descriptor? 

If so, that is not supported by the current code - see section 3.6.1.1
where it says, for integrated CAS processors, the referenced descriptor
must be an Analysis Engine Descriptor.

http://incubator.apache.org/uima/downloads/releaseDocs/2.2.0-incubating/docs/html/references/references.html#ugr.ref.xml.cpe_descriptor.descriptor.cas_processors.individual

If you're doing something else, please let us know.

Thanks. -Marshall

Baptiste GAILLARD wrote:
> Yes, If I use one Analysis Engine and the same Analysis Engine instead of a
> CC the process completed successfully.
>
>
> 2007/12/3, Marshall Schor <ms...@schor.com>:
>   
>> This appears it might be a bug.  Can you work around by using an
>> Analysis Engine instead of a Cas Consumer?
>>
>> -Marshall
>>
>> Baptiste GAILLARD wrote:
>>     
>>> Ok, thanks,
>>>
>>> I've tried with a SOAP AE and a local integrated CAS Consumer, it works.
>>>
>>> But, If If use a SOAP AE an a SOAP Cas Consumer the following errors are
>>> displayed:
>>>
>>>
>>> org.apache.uima.resource.ResourceInitializationException: Initialization
>>>       
>> of
>>     
>>> CAS Processor with name "WordsFilePrinterSoapService.xml" failed.
>>>         at
>>>
>>>       
>> org.apache.uima.collection.impl.CollectionProcessingEngine_impl.initialize
>>     
>>> (CollectionProcessingEngine_impl.java:83)
>>>         at
>>>
>>>       
>> org.apache.uima.impl.UIMAFramework_impl._produceCollectionProcessingEngine
>>     
>>> (UIMAFramework_impl.java:395)
>>>         at
>>>       
>> org.apache.uima.UIMAFramework.produceCollectionProcessingEngine(
>>     
>>> UIMAFramework.java:807)
>>>         at org.apache.uima.tools.cpm.CpmPanel.startProcessing(
>>>       
>> CpmPanel.java
>>     
>>> :538)
>>>         at org.apache.uima.tools.cpm.CpmPanel.access$000(CpmPanel.java
>>>       
>> :96)
>>     
>>>         at org.apache.uima.tools.cpm.CpmPanel$1.construct(CpmPanel.java
>>>       
>> :678)
>>     
>>>         at org.apache.uima.tools.util.gui.SwingWorker$2.run(
>>>       
>> SwingWorker.java
>>     
>>> :130)
>>>         at java.lang.Thread.run(Thread.java:595)
>>> Caused by: org.apache.uima.resource.ResourceConfigurationException:
>>> Initialization of CAS Processor with name "
>>>       
>> WordsFilePrinterSoapService.xml"
>>     
>>> failed.
>>>         at
>>>
>>>       
>> org.apache.uima.collection.impl.cpm.container.CPEFactory.produceIntegratedCasProcessor
>>     
>>> (CPEFactory.java:1107)
>>>         at
>>>
>>>       
>> org.apache.uima.collection.impl.cpm.container.CPEFactory.getCasProcessors(
>>     
>>> CPEFactory.java:550)
>>>         at org.apache.uima.collection.impl.cpm.BaseCPMImpl.init(
>>> BaseCPMImpl.java:253)
>>>         at org.apache.uima.collection.impl.cpm.BaseCPMImpl.<init>(
>>> BaseCPMImpl.java:127)
>>>         at
>>>
>>>       
>> org.apache.uima.collection.impl.CollectionProcessingEngine_impl.initialize
>>     
>>> (CollectionProcessingEngine_impl.java:75)
>>>         ... 7 more
>>> Caused by: org.apache.uima.resource.ResourceInitializationException: The
>>> Resource Factory does not know how to create a resource of class
>>> org.apache.uima.analysis_engine.AnalysisEngine from
>>> the given ResourceSpecifier. (Descriptor:
>>>
>>>       
>> file:/D:/workspace/imp-helper-uima/src/main/resources/descriptors/soap/WordsFilePrinterSoapService.xml)
>>     
>>>         at org.apache.uima.UIMAFramework.produceResource(
>>>       
>> UIMAFramework.java
>>     
>>> :261)
>>>         at org.apache.uima.UIMAFramework.produceResource(
>>>       
>> UIMAFramework.java
>>     
>>> :303)
>>>         at org.apache.uima.UIMAFramework.produceAnalysisEngine(
>>> UIMAFramework.java:383)
>>>         at
>>>
>>>       
>> org.apache.uima.collection.impl.cpm.container.CPEFactory.produceIntegratedCasProcessor
>>     
>>> (CPEFactory.java:1091)
>>>         ... 11 more
>>>
>>> So, it seams to work with SOAP AE but not SOAP CC.
>>>
>>>
>>> Baptiste.
>>>
>>>
>>> 2007/11/29, Adam Lally <al...@alum.rpi.edu>:
>>>
>>>       
>>>> On Nov 29, 2007 10:37 AM, Baptiste GAILLARD <
>>>>         
>> baptiste.gaillard@gmail.com>
>>     
>>>> wrote:
>>>>
>>>>         
>>>>> <?xml version="1.0" encoding="UTF-8"?>
>>>>>         <casProcessor deployment="remote"
>>>>> name="WordsListAnnotatorSoapService">
>>>>>             <descriptor>
>>>>>                 <include
>>>>>
>>>>>
>>>>>           
>> href="D:\workspace\imp-helper-uima\src\main\resources\descriptors\soap\WordsListAnnotatorSoapService.xml"/>
>>     
>>>>>             </descriptor>
>>>>>
>>>>>           
>>>> <snip/>
>>>>
>>>> Use deployment="integrated" instead of deployment="remote".  I know
>>>> that's confusing.  Using deployment="integrated" will actually work
>>>> just fine for remote services.  deployment="remote" invokes some
>>>> specialized processing specifically for Vinci services, but is not
>>>> generally needed.
>>>>
>>>> -Adam
>>>>
>>>>
>>>>         
>>>       
>>     
>
>   


Re: How to use a SOAP component in a CPE ?

Posted by Baptiste GAILLARD <ba...@gmail.com>.
Yes, If I use one Analysis Engine and the same Analysis Engine instead of a
CC the process completed successfully.


2007/12/3, Marshall Schor <ms...@schor.com>:
>
> This appears it might be a bug.  Can you work around by using an
> Analysis Engine instead of a Cas Consumer?
>
> -Marshall
>
> Baptiste GAILLARD wrote:
> > Ok, thanks,
> >
> > I've tried with a SOAP AE and a local integrated CAS Consumer, it works.
> >
> > But, If If use a SOAP AE an a SOAP Cas Consumer the following errors are
> > displayed:
> >
> >
> > org.apache.uima.resource.ResourceInitializationException: Initialization
> of
> > CAS Processor with name "WordsFilePrinterSoapService.xml" failed.
> >         at
> >
> org.apache.uima.collection.impl.CollectionProcessingEngine_impl.initialize
> > (CollectionProcessingEngine_impl.java:83)
> >         at
> >
> org.apache.uima.impl.UIMAFramework_impl._produceCollectionProcessingEngine
> > (UIMAFramework_impl.java:395)
> >         at
> org.apache.uima.UIMAFramework.produceCollectionProcessingEngine(
> > UIMAFramework.java:807)
> >         at org.apache.uima.tools.cpm.CpmPanel.startProcessing(
> CpmPanel.java
> > :538)
> >         at org.apache.uima.tools.cpm.CpmPanel.access$000(CpmPanel.java
> :96)
> >         at org.apache.uima.tools.cpm.CpmPanel$1.construct(CpmPanel.java
> :678)
> >         at org.apache.uima.tools.util.gui.SwingWorker$2.run(
> SwingWorker.java
> > :130)
> >         at java.lang.Thread.run(Thread.java:595)
> > Caused by: org.apache.uima.resource.ResourceConfigurationException:
> > Initialization of CAS Processor with name "
> WordsFilePrinterSoapService.xml"
> > failed.
> >         at
> >
> org.apache.uima.collection.impl.cpm.container.CPEFactory.produceIntegratedCasProcessor
> > (CPEFactory.java:1107)
> >         at
> >
> org.apache.uima.collection.impl.cpm.container.CPEFactory.getCasProcessors(
> > CPEFactory.java:550)
> >         at org.apache.uima.collection.impl.cpm.BaseCPMImpl.init(
> > BaseCPMImpl.java:253)
> >         at org.apache.uima.collection.impl.cpm.BaseCPMImpl.<init>(
> > BaseCPMImpl.java:127)
> >         at
> >
> org.apache.uima.collection.impl.CollectionProcessingEngine_impl.initialize
> > (CollectionProcessingEngine_impl.java:75)
> >         ... 7 more
> > Caused by: org.apache.uima.resource.ResourceInitializationException: The
> > Resource Factory does not know how to create a resource of class
> > org.apache.uima.analysis_engine.AnalysisEngine from
> > the given ResourceSpecifier. (Descriptor:
> >
> file:/D:/workspace/imp-helper-uima/src/main/resources/descriptors/soap/WordsFilePrinterSoapService.xml)
> >         at org.apache.uima.UIMAFramework.produceResource(
> UIMAFramework.java
> > :261)
> >         at org.apache.uima.UIMAFramework.produceResource(
> UIMAFramework.java
> > :303)
> >         at org.apache.uima.UIMAFramework.produceAnalysisEngine(
> > UIMAFramework.java:383)
> >         at
> >
> org.apache.uima.collection.impl.cpm.container.CPEFactory.produceIntegratedCasProcessor
> > (CPEFactory.java:1091)
> >         ... 11 more
> >
> > So, it seams to work with SOAP AE but not SOAP CC.
> >
> >
> > Baptiste.
> >
> >
> > 2007/11/29, Adam Lally <al...@alum.rpi.edu>:
> >
> >> On Nov 29, 2007 10:37 AM, Baptiste GAILLARD <
> baptiste.gaillard@gmail.com>
> >> wrote:
> >>
> >>> <?xml version="1.0" encoding="UTF-8"?>
> >>>         <casProcessor deployment="remote"
> >>> name="WordsListAnnotatorSoapService">
> >>>             <descriptor>
> >>>                 <include
> >>>
> >>>
> >>
> href="D:\workspace\imp-helper-uima\src\main\resources\descriptors\soap\WordsListAnnotatorSoapService.xml"/>
> >>
> >>>             </descriptor>
> >>>
> >> <snip/>
> >>
> >> Use deployment="integrated" instead of deployment="remote".  I know
> >> that's confusing.  Using deployment="integrated" will actually work
> >> just fine for remote services.  deployment="remote" invokes some
> >> specialized processing specifically for Vinci services, but is not
> >> generally needed.
> >>
> >> -Adam
> >>
> >>
> >
> >
>
>

Re: How to use a SOAP component in a CPE ?

Posted by Marshall Schor <ms...@schor.com>.
This appears it might be a bug.  Can you work around by using an
Analysis Engine instead of a Cas Consumer?

-Marshall

Baptiste GAILLARD wrote:
> Ok, thanks,
>
> I've tried with a SOAP AE and a local integrated CAS Consumer, it works.
>
> But, If If use a SOAP AE an a SOAP Cas Consumer the following errors are
> displayed:
>
>
> org.apache.uima.resource.ResourceInitializationException: Initialization of
> CAS Processor with name "WordsFilePrinterSoapService.xml" failed.
>         at
> org.apache.uima.collection.impl.CollectionProcessingEngine_impl.initialize
> (CollectionProcessingEngine_impl.java:83)
>         at
> org.apache.uima.impl.UIMAFramework_impl._produceCollectionProcessingEngine
> (UIMAFramework_impl.java:395)
>         at org.apache.uima.UIMAFramework.produceCollectionProcessingEngine(
> UIMAFramework.java:807)
>         at org.apache.uima.tools.cpm.CpmPanel.startProcessing(CpmPanel.java
> :538)
>         at org.apache.uima.tools.cpm.CpmPanel.access$000(CpmPanel.java:96)
>         at org.apache.uima.tools.cpm.CpmPanel$1.construct(CpmPanel.java:678)
>         at org.apache.uima.tools.util.gui.SwingWorker$2.run(SwingWorker.java
> :130)
>         at java.lang.Thread.run(Thread.java:595)
> Caused by: org.apache.uima.resource.ResourceConfigurationException:
> Initialization of CAS Processor with name "WordsFilePrinterSoapService.xml"
> failed.
>         at
> org.apache.uima.collection.impl.cpm.container.CPEFactory.produceIntegratedCasProcessor
> (CPEFactory.java:1107)
>         at
> org.apache.uima.collection.impl.cpm.container.CPEFactory.getCasProcessors(
> CPEFactory.java:550)
>         at org.apache.uima.collection.impl.cpm.BaseCPMImpl.init(
> BaseCPMImpl.java:253)
>         at org.apache.uima.collection.impl.cpm.BaseCPMImpl.<init>(
> BaseCPMImpl.java:127)
>         at
> org.apache.uima.collection.impl.CollectionProcessingEngine_impl.initialize
> (CollectionProcessingEngine_impl.java:75)
>         ... 7 more
> Caused by: org.apache.uima.resource.ResourceInitializationException: The
> Resource Factory does not know how to create a resource of class
> org.apache.uima.analysis_engine.AnalysisEngine from
> the given ResourceSpecifier. (Descriptor:
> file:/D:/workspace/imp-helper-uima/src/main/resources/descriptors/soap/WordsFilePrinterSoapService.xml)
>         at org.apache.uima.UIMAFramework.produceResource(UIMAFramework.java
> :261)
>         at org.apache.uima.UIMAFramework.produceResource(UIMAFramework.java
> :303)
>         at org.apache.uima.UIMAFramework.produceAnalysisEngine(
> UIMAFramework.java:383)
>         at
> org.apache.uima.collection.impl.cpm.container.CPEFactory.produceIntegratedCasProcessor
> (CPEFactory.java:1091)
>         ... 11 more
>
> So, it seams to work with SOAP AE but not SOAP CC.
>
>
> Baptiste.
>
>
> 2007/11/29, Adam Lally <al...@alum.rpi.edu>:
>   
>> On Nov 29, 2007 10:37 AM, Baptiste GAILLARD <ba...@gmail.com>
>> wrote:
>>     
>>> <?xml version="1.0" encoding="UTF-8"?>
>>>         <casProcessor deployment="remote"
>>> name="WordsListAnnotatorSoapService">
>>>             <descriptor>
>>>                 <include
>>>
>>>       
>> href="D:\workspace\imp-helper-uima\src\main\resources\descriptors\soap\WordsListAnnotatorSoapService.xml"/>
>>     
>>>             </descriptor>
>>>       
>> <snip/>
>>
>> Use deployment="integrated" instead of deployment="remote".  I know
>> that's confusing.  Using deployment="integrated" will actually work
>> just fine for remote services.  deployment="remote" invokes some
>> specialized processing specifically for Vinci services, but is not
>> generally needed.
>>
>> -Adam
>>
>>     
>
>   


Re: How to use a SOAP component in a CPE ?

Posted by Baptiste GAILLARD <ba...@gmail.com>.
Ok, thanks,

I've tried with a SOAP AE and a local integrated CAS Consumer, it works.

But, If If use a SOAP AE an a SOAP Cas Consumer the following errors are
displayed:


org.apache.uima.resource.ResourceInitializationException: Initialization of
CAS Processor with name "WordsFilePrinterSoapService.xml" failed.
        at
org.apache.uima.collection.impl.CollectionProcessingEngine_impl.initialize
(CollectionProcessingEngine_impl.java:83)
        at
org.apache.uima.impl.UIMAFramework_impl._produceCollectionProcessingEngine
(UIMAFramework_impl.java:395)
        at org.apache.uima.UIMAFramework.produceCollectionProcessingEngine(
UIMAFramework.java:807)
        at org.apache.uima.tools.cpm.CpmPanel.startProcessing(CpmPanel.java
:538)
        at org.apache.uima.tools.cpm.CpmPanel.access$000(CpmPanel.java:96)
        at org.apache.uima.tools.cpm.CpmPanel$1.construct(CpmPanel.java:678)
        at org.apache.uima.tools.util.gui.SwingWorker$2.run(SwingWorker.java
:130)
        at java.lang.Thread.run(Thread.java:595)
Caused by: org.apache.uima.resource.ResourceConfigurationException:
Initialization of CAS Processor with name "WordsFilePrinterSoapService.xml"
failed.
        at
org.apache.uima.collection.impl.cpm.container.CPEFactory.produceIntegratedCasProcessor
(CPEFactory.java:1107)
        at
org.apache.uima.collection.impl.cpm.container.CPEFactory.getCasProcessors(
CPEFactory.java:550)
        at org.apache.uima.collection.impl.cpm.BaseCPMImpl.init(
BaseCPMImpl.java:253)
        at org.apache.uima.collection.impl.cpm.BaseCPMImpl.<init>(
BaseCPMImpl.java:127)
        at
org.apache.uima.collection.impl.CollectionProcessingEngine_impl.initialize
(CollectionProcessingEngine_impl.java:75)
        ... 7 more
Caused by: org.apache.uima.resource.ResourceInitializationException: The
Resource Factory does not know how to create a resource of class
org.apache.uima.analysis_engine.AnalysisEngine from
the given ResourceSpecifier. (Descriptor:
file:/D:/workspace/imp-helper-uima/src/main/resources/descriptors/soap/WordsFilePrinterSoapService.xml)
        at org.apache.uima.UIMAFramework.produceResource(UIMAFramework.java
:261)
        at org.apache.uima.UIMAFramework.produceResource(UIMAFramework.java
:303)
        at org.apache.uima.UIMAFramework.produceAnalysisEngine(
UIMAFramework.java:383)
        at
org.apache.uima.collection.impl.cpm.container.CPEFactory.produceIntegratedCasProcessor
(CPEFactory.java:1091)
        ... 11 more

So, it seams to work with SOAP AE but not SOAP CC.


Baptiste.


2007/11/29, Adam Lally <al...@alum.rpi.edu>:
>
> On Nov 29, 2007 10:37 AM, Baptiste GAILLARD <ba...@gmail.com>
> wrote:
> > <?xml version="1.0" encoding="UTF-8"?>
> >         <casProcessor deployment="remote"
> > name="WordsListAnnotatorSoapService">
> >             <descriptor>
> >                 <include
> >
> href="D:\workspace\imp-helper-uima\src\main\resources\descriptors\soap\WordsListAnnotatorSoapService.xml"/>
> >             </descriptor>
> <snip/>
>
> Use deployment="integrated" instead of deployment="remote".  I know
> that's confusing.  Using deployment="integrated" will actually work
> just fine for remote services.  deployment="remote" invokes some
> specialized processing specifically for Vinci services, but is not
> generally needed.
>
> -Adam
>

Re: How to use a SOAP component in a CPE ?

Posted by Adam Lally <al...@alum.rpi.edu>.
On Nov 29, 2007 10:37 AM, Baptiste GAILLARD <ba...@gmail.com> wrote:
> <?xml version="1.0" encoding="UTF-8"?>
>         <casProcessor deployment="remote"
> name="WordsListAnnotatorSoapService">
>             <descriptor>
>                 <include
> href="D:\workspace\imp-helper-uima\src\main\resources\descriptors\soap\WordsListAnnotatorSoapService.xml"/>
>             </descriptor>
<snip/>

Use deployment="integrated" instead of deployment="remote".  I know
that's confusing.  Using deployment="integrated" will actually work
just fine for remote services.  deployment="remote" invokes some
specialized processing specifically for Vinci services, but is not
generally needed.

-Adam

Re: How to use a SOAP component in a CPE ?

Posted by Baptiste GAILLARD <ba...@gmail.com>.
Ok, thank you for this quick response,

Yes, the following trace appear:

org.apache.uima.collection.metadata.CpeDescriptorException: The object
reference casProcessor name=NULL is invalid.  (Thread Name:
AWT-EventQueue-0)
        at
org.apache.uima.collection.impl.metadata.cpe.CasProcessorCpeObject.setName(
CasProcessorCpeObject.java:346)
        at org.apache.uima.tools.cpm.CpmPanel.addAE(CpmPanel.java:1268)
        at org.apache.uima.tools.cpm.CpmPanel.openCpeDescriptor(
CpmPanel.java:1626)
        at org.apache.uima.tools.cpm.CpmPanel.actionPerformed(CpmPanel.java
:812)
        at javax.swing.AbstractButton.fireActionPerformed(
AbstractButton.java:1995)
        at javax.swing.AbstractButton$Handler.actionPerformed(
AbstractButton.java:2318)
        at javax.swing.DefaultButtonModel.fireActionPerformed(
DefaultButtonModel.java:387)
        at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java
:242)
        at javax.swing.AbstractButton.doClick(AbstractButton.java:357)
        at javax.swing.plaf.basic.BasicMenuItemUI.doClick(
BasicMenuItemUI.java:1216)
        at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(
BasicMenuItemUI.java:1257)
        at java.awt.Component.processMouseEvent(Component.java:6038)
        at javax.swing.JComponent.processMouseEvent(JComponent.java:3265)
        at java.awt.Component.processEvent(Component.java:5803)
        at java.awt.Container.processEvent(Container.java:2058)
        at java.awt.Component.dispatchEventImpl(Component.java:4410)
        at java.awt.Container.dispatchEventImpl(Container.java:2116)
        at java.awt.Component.dispatchEvent(Component.java:4240)
        at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java
:4322)
        at java.awt.LightweightDispatcher.processMouseEvent(Container.java
:3986)
        at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3916)
        at java.awt.Container.dispatchEventImpl(Container.java:2102)
        at java.awt.Window.dispatchEventImpl(Window.java:2429)
        at java.awt.Component.dispatchEvent(Component.java:4240)
        at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
        at java.awt.EventDispatchThread.pumpOneEventForFilters(
EventDispatchThread.java:273)
        at java.awt.EventDispatchThread.pumpEventsForFilter(
EventDispatchThread.java:183)
        at java.awt.EventDispatchThread.pumpEventsForHierarchy(
EventDispatchThread.java:173)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java
:168)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java
:160)
        at java.awt.EventDispatchThread.run(EventDispatchThread.java:121)

If I try to use a CPE descriptor which just use SOAP Service descriptors :

-- CPE descriptor --

<?xml version="1.0" encoding="UTF-8"?>
<cpeDescription xmlns="http://uima.apache.org/resourceSpecifier">
    <collectionReader>
        <collectionIterator>
            <descriptor>
                <include
href="D:\workspace\imp-helper-uima\src\main\resources\descriptors\collection_reader\TextsListCollectionReader.xml"/>
            </descriptor>
        </collectionIterator>
    </collectionReader>
    <casProcessors casPoolSize="3" processingUnitThreadCount="1">
        <casProcessor deployment="remote"
name="WordsListAnnotatorSoapService">
            <descriptor>
                <include
href="D:\workspace\imp-helper-uima\src\main\resources\descriptors\soap\WordsListAnnotatorSoapService.xml"/>
            </descriptor>
            <deploymentParameters/>
            <errorHandling>
                <errorRateThreshold action="terminate" value="0/1000"/>
                <maxConsecutiveRestarts action="terminate" value="30"/>
                <timeout max="100000" default="-1"/>
            </errorHandling>
            <checkpoint batch="10000" time="1000ms"/>
        </casProcessor>
        <casProcessor deployment="remote"
name="WordsFilePrinterSoapService">
            <descriptor>
                <include
href="D:\workspace\imp-helper-uima\src\main\resources\descriptors\soap\WordsFilePrinterSoapService.xml"/>
            </descriptor>
            <deploymentParameters/>
            <errorHandling>
                <errorRateThreshold action="terminate" value="0/1000"/>
                <maxConsecutiveRestarts action="terminate" value="30"/>
                <timeout max="100000" default="-1"/>
            </errorHandling>
            <checkpoint batch="10000" time="1000ms"/>
        </casProcessor>
    </casProcessors>
    <cpeConfig>
        <numToProcess>-1</numToProcess>
        <deployAs>immediate</deployAs>
        <checkpoint batch="0" time="300000ms"/>
        <timerImpl/>
    </cpeConfig>
</cpeDescription>

-- WordsListAnnotatorSoapService.xml --
<?xml version="1.0" encoding="UTF-8" ?>

<uriSpecifier xmlns="http://uima.apache.org/resourceSpecifier">
    <resourceType>AnalysisEngine</resourceType>
    <uri>http://localhost:8070/axis/services/urn:WordsListAnnotator</uri>
    <protocol>SOAP</protocol>
</uriSpecifier>

-- WordsListAnnotatorSoapService.xml --
<?xml version="1.0" encoding="UTF-8" ?>
<uriSpecifier xmlns="http://uima.apache.org/resourceSpecifier">
    <resourceType>CasConsumer</resourceType>
    <uri>http://localhost:8070/axis/services/urn:WordsFilePrinter</uri>
    <protocol>SOAP</protocol>
</uriSpecifier>



... The following errors appear :


org.apache.uima.collection.impl.base_cpm.container.ServiceConnectionException:The
system is unable to connect to the Vinci Service
http://localhost:8070/axis/s
ervices/urn:WordsListAnnotator. (Thread Name: BaseCPMImpl-Thread)
        at
org.apache.uima.collection.impl.cpm.container.deployer.VinciTAP.connect(
VinciTAP.java:368)
        at
org.apache.uima.collection.impl.cpm.container.deployer.vinci.VinciCasProcessorDeployer.activateProcessor
(VinciCasProcessorDeployer.java:1307)
        at
org.apache.uima.collection.impl.cpm.container.deployer.vinci.VinciCasProcessorDeployer.attachToServices
(VinciCasProcessorDeployer.java:882)
        at
org.apache.uima.collection.impl.cpm.container.deployer.vinci.VinciCasProcessorDeployer.deployRemote
(VinciCasProcessorDeployer.java:665)
        at
org.apache.uima.collection.impl.cpm.container.deployer.vinci.VinciCasProcessorDeployer.deployBasedOnModel
(VinciCasProcessorDeployer.java:315)
        at
org.apache.uima.collection.impl.cpm.container.deployer.vinci.VinciCasProcessorDeployer.deployCasProcessor
(VinciCasProcessorDeployer.java:275)
        at
org.apache.uima.collection.impl.cpm.engine.CPMEngine.deployAnalysisEngines(
CPMEngine.java:1443)
        at
org.apache.uima.collection.impl.cpm.engine.CPMEngine.deployCasProcessors(
CPMEngine.java:1473)
        at org.apache.uima.collection.impl.cpm.BaseCPMImpl.run(
BaseCPMImpl.java:458)
        at java.lang.Thread.run(Thread.java:619)

Very strange, the VinciTAP (used to communicate with Vinci services) is
called, is it normal ?

My SOAP components are deployed via Jetty and AXIS, I can access the
services via my web browser so they must work.

Thanks,

Baptiste.



2007/11/29, Adam Lally <al...@alum.rpi.edu>:
>
> On Nov 29, 2007 8:31 AM, Baptiste GAILLARD <ba...@gmail.com>
> wrote:
> > I've read the following in the UIMA documentation:
> > Note
> >
> > The UIMA SDK also supports using unmanaged remote services via the
> > web-standard SOAP communications protocol (see Section 3.6.1, "Deploying
> as
> > SOAP Service"<
> http://incubator.apache.org/uima/downloads/releaseDocs/2.2.0-incubating/docs/html/tutorials_and_users_guides/tutorials_and_users_guides.html#ugr.tug.application.how_to_deploy_as_soap
> >.
> > This approach is based on a proxy implementation, where the proxy is
> > essentially running in an integrated mode. To use this approach with the
> > CPM, use the Integrated mode, with the component being an Aggregate
> which,
> > in turn, connects to a remote service.
> >
>
> I think this Note is actually incorrect (sorry).  I'm pretty sure that
> you can just add your SOAP Service Descriptor directly to your CPE.
> So you might want to give that a try. However, wrapping it an
> aggregate like you did should also work, of course.
>
> > But, when I try to add the Aggregate AE "
> > AggregateWordsListAnnotatorSoapService.xml" with the "cpeGui.bat" tool
> the
> > following error is displayed :
> >
> > org.apache.uima.collection.metadata.CpeDescriptionException: The object
> > reference casProcessor=NULL is invalid. (Thread Name: AWT-EventQueue-0).
> >
>
> Is there any more information, such as a stack trace, printed to the
> console?
>
> -Adam
>

Re: How to use a SOAP component in a CPE ?

Posted by Adam Lally <al...@alum.rpi.edu>.
On Nov 29, 2007 8:31 AM, Baptiste GAILLARD <ba...@gmail.com> wrote:
> I've read the following in the UIMA documentation:
> Note
>
> The UIMA SDK also supports using unmanaged remote services via the
> web-standard SOAP communications protocol (see Section 3.6.1, "Deploying as
> SOAP Service"<http://incubator.apache.org/uima/downloads/releaseDocs/2.2.0-incubating/docs/html/tutorials_and_users_guides/tutorials_and_users_guides.html#ugr.tug.application.how_to_deploy_as_soap>.
> This approach is based on a proxy implementation, where the proxy is
> essentially running in an integrated mode. To use this approach with the
> CPM, use the Integrated mode, with the component being an Aggregate which,
> in turn, connects to a remote service.
>

I think this Note is actually incorrect (sorry).  I'm pretty sure that
you can just add your SOAP Service Descriptor directly to your CPE.
So you might want to give that a try. However, wrapping it an
aggregate like you did should also work, of course.

> But, when I try to add the Aggregate AE "
> AggregateWordsListAnnotatorSoapService.xml" with the "cpeGui.bat" tool the
> following error is displayed :
>
> org.apache.uima.collection.metadata.CpeDescriptionException: The object
> reference casProcessor=NULL is invalid. (Thread Name: AWT-EventQueue-0).
>

Is there any more information, such as a stack trace, printed to the console?

-Adam