Folder-listener/1.0
From WebLab Wiki
| Details | |
|---|---|
| Service Interfaces | QueueManager |
| Exchange model: | WebLab 1.2.2 |
| Versions: |
|
| Licence | LGPL 2.1 |
| Supported OS | Windows/Linux/MacOs |
| Integrated COTS | Commons-IO |
| Binary | folder-listener-1.0.war |
| Sources | folder-listener-1.0-sources.jar |
| Javadoc | folder-listener-1.0-javadoc.jar |
| SVN | folder-listener |
| Maven Artifact | |
|
<groupId>org.ow2.weblab.webservices</groupId> <artifactId>folder-listener</artifactId> <version>1.0</version> | |
| Release Note | |
This service browse a directory of files and create a WebLab Resource that refers to that file. This service can listen a directory and update automatically the list of files to process.
Contents |
Configuration
The configuration is done using the cxfBeanFile.xml file. Default configuration is:
<jaxws:endpoint id="folder-listener" implementor="#defaultFolderListener" address="/folder-listener" /> <bean id="defaultFolderListener" class="org.ow2.weblab.webservices.listener.DefaultFolderListener"> <constructor-arg ref="config" /> </bean> <bean id="config" class="org.ow2.weblab.webservices.listener.bean.FolderListenerConfigBean"> <property name="fileUrlPattern" value=".*" /> <property name="updateInterval" value="1000" /> <property name="folders"> <list> <bean class="java.io.File"> <constructor-arg> <value>toIndex</value> </constructor-arg> </bean> </list> </property>
The default folder listener allow to:
- fileUrlPattern : a regexp to allow filenames. By default all file are allowed: .*.
- updateInterval : the time in ms between two check of new files in a directory. By default: 1000ms.
- folders : contains the list of folders to listen to. By default: the toIndex.
UsageContext effects
Usage context has no effect.
Examples of SOAP Input/Output
QueueManager:nextResource
Input
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:que="http://weblab.ow2.org/core/1.2/services/queuemanager"> <soapenv:Header/> <soapenv:Body> <que:nextResourceArgs/> </soapenv:Body> </soapenv:Envelope>
Output
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> <soap:Body> <ns9:nextResourceReturn xmlns:ns2="http://weblab.ow2.org/core/1.2/services/analyser" xmlns:ns3="http://weblab.ow2.org/core/1.2/services/searcher" xmlns:ns4="http://weblab.ow2.org/core/1.2/services/configurable" xmlns:ns5="http://weblab.ow2.org/core/1.2/services/resourcecontainer" xmlns:ns6="http://weblab.ow2.org/core/1.2/model#" xmlns:ns7="http://weblab.ow2.org/core/1.2/services/trainable" xmlns:ns8="http://weblab.ow2.org/core/1.2/services/exception" xmlns:ns9="http://weblab.ow2.org/core/1.2/services/queuemanager" xmlns:ns10="http://weblab.ow2.org/core/1.2/services/sourcereader" xmlns:ns11="http://weblab.ow2.org/core/1.2/services/reportprovider" xmlns:ns12="http://weblab.ow2.org/core/1.2/services/indexer"> <resource xsi:type="ns6:Document" uri="weblab://folder-listener/file545844151145181" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <annotation uri="weblab://folder-listener/file545844151145181#a0"> <data> <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:wp="http://weblab.ow2.org/core/1.2/ontology/processing#"> <rdf:Description rdf:about="weblab://folder-listener/file545844151145181" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:dcterms="http://purl.org/dc/terms/"> <wp:hasNativeContent rdf:resource="file:/home/weblab/data/content/weblab.2361463621386300376.content"/> <wp:hasGatheringDate>2012-04-25T18:26:22+0200</wp:hasGatheringDate> <wp:hasOriginalFileName>Letters.pdf</wp:hasOriginalFileName> <wp:hasOriginalFileSize>505492</wp:hasOriginalFileSize> <dc:source>/home/weblab/toIndex/Letters.pdf</dc:source> <dcterms:extent>505492 bytes</dcterms:extent> <dcterms:modified>2010-11-04T11:36:42+0100</dcterms:modified> </rdf:Description> </rdf:RDF> </data> </annotation> </resource> </ns9:nextResourceReturn> </soap:Body> </soap:Envelope>
Known Limitations
N/A
Dependencies
List off all dependencies of this service:
org.ow2.weblab.webservices:folder-listener:war:1.0 +- commons-io:commons-io:jar:2.0.1:compile +- org.ow2.weblab.core:annotator:jar:1.2.4:compile | \- joda-time:joda-time:jar:1.6.2:compile +- org.ow2.weblab.components:content-manager:jar:1.8.3:compile +- org.ow2.weblab.core:model:jar:1.2.2:compile +- org.ow2.weblab.core:extended:jar:1.2.2:compile +- org.apache.cxf:cxf-rt-frontend-jaxws:jar:2.4.0:compile | +- xml-resolver:xml-resolver:jar:1.2:compile | +- asm:asm:jar:3.3:compile | +- org.apache.cxf:cxf-api:jar:2.4.0:compile | | +- org.apache.cxf:cxf-common-utilities:jar:2.4.0:compile | | +- org.apache.ws.xmlschema:xmlschema-core:jar:2.0:compile | | \- org.apache.neethi:neethi:jar:3.0.0:compile | | +- wsdl4j:wsdl4j:jar:1.6.2:compile | | \- org.codehaus.woodstox:woodstox-core-asl:jar:4.1.1:compile | | \- org.codehaus.woodstox:stax2-api:jar:3.0.2:compile | +- org.apache.cxf:cxf-rt-core:jar:2.4.0:compile | | +- com.sun.xml.bind:jaxb-impl:jar:2.1.13:compile | | \- org.apache.geronimo.specs:geronimo-javamail_1.4_spec:jar:1.7.1:compile | +- org.apache.cxf:cxf-rt-bindings-soap:jar:2.4.0:compile | | +- org.apache.cxf:cxf-tools-common:jar:2.4.0:compile | | \- org.apache.cxf:cxf-rt-databinding-jaxb:jar:2.4.0:compile | +- org.apache.cxf:cxf-rt-bindings-xml:jar:2.4.0:compile | +- org.apache.cxf:cxf-rt-frontend-simple:jar:2.4.0:compile | \- org.apache.cxf:cxf-rt-ws-addr:jar:2.4.0:compile +- org.apache.cxf:cxf-rt-transports-http:jar:2.4.0:compile | +- org.apache.cxf:cxf-rt-transports-common:jar:2.4.0:compile | \- org.springframework:spring-web:jar:3.0.5.RELEASE:compile | +- aopalliance:aopalliance:jar:1.0:compile | +- org.springframework:spring-beans:jar:3.0.5.RELEASE:compile | +- org.springframework:spring-context:jar:3.0.5.RELEASE:compile | | +- org.springframework:spring-aop:jar:3.0.5.RELEASE:compile | | +- org.springframework:spring-expression:jar:3.0.5.RELEASE:compile | | \- org.springframework:spring-asm:jar:3.0.5.RELEASE:compile | \- org.springframework:spring-core:jar:3.0.5.RELEASE:compile +- xalan:xalan:jar:2.7.1:compile | \- xalan:serializer:jar:2.7.1:compile | \- xml-apis:xml-apis:jar:1.3.04:compile +- commons-logging:commons-logging:jar:1.1.1:compile +- junit:junit:jar:4.8.2:test \- javax.servlet:servlet-api:jar:2.4:provided

