Hi,

Am working with ServiceMix-3.0-SNAPSHOT. Previously worked with vfs
filePoller and vfs fileWriter
components where i have used FTP protocol.

I want to keep polling an URL on a server via webdav. That server supports
webDAV protocol and
below are the details of that. I want to poll for files and want to write to
some local dir.

Now when i tried to use WEBDAV protocol it is throwing
java.net.MalformedURLException: unknown protocol: webdav

my config file looks like this :
=================

for filePoller
----------------
<sm:component>
             <bean class="org.apache.servicemix.components.vfs.FilePoller">
               <property name="workManager" ref="workManager"/>
               <property name="path" value="
webdav://admin:[EMAIL PROTECTED]:8080/udayweb/webdav/MyTest"/>
               <property name="period" value="1000"/>
           </bean>
         </sm:component>
-----------------

and here is fileWriter
------------
<bean class="org.apache.servicemix.components.vfs.FileWriter">
               <property name="path" value="
webdav://admin:[EMAIL PROTECTED]:8080/udayweb/webdav/MyTest"/>
               <property name="marshaler">
                  <bean class="
org.apache.servicemix.components.util.DefaultFileMarshaler">
                     <property name="fileName">
                         <bean class="
org.apache.servicemix.expression.JaxenStringXPathExpression">
                            <constructor-arg value="concat('sample_',
/sample/@id, '.xml')"/>
                         </bean>
                     </property>
                  </bean>
               </property>
              </bean>
-------------------------------

i have tried in both the filePoller and fileWriter components.

Exception stack trace is here
-------------------
INFO - JBIContainer.activateComponent(978) | Activating component for:
[container=ServiceMix,name=filePoller] with service: {
http://servicemix.apache.org/demo/}filePoller component:
[EMAIL PROTECTED]
INFO - ComponentMBeanImpl.init(184) | Initializing component: filePoller
DEBUG - ComponentContextImpl.activateEndpoint(133) | Component: filePoller
activated endpoint: {http://servicemix.apache.org/
demo/}filePoller : filePoller
DEBUG - EndpointRegistry.retrieveInterfacesFromDescription(229) | Endpoint
ServiceEndpoint[service={http://servicemix.apache.
org/demo/}filePoller,endpoint=filePoller] has no service description
INFO - JBIContainer.activateComponent(978) | Activating component for:
[container=ServiceMix,name=fileSender] with service: {
http://servicemix.apache.org/demo/}receiver component:
[EMAIL PROTECTED]
INFO - ComponentMBeanImpl.init(184) | Initializing component: fileSender
Caught: org.springframework.beans.factory.BeanCreationException: Error
creating bean with name 'jbi' defined in file [C:\uday
\AppTalk-
5.0.0_resources\ServiceMix\servicemix-3.0-SNAPSHOT\win_apps\vfs_polling_win.xml]:
Initialization of bean failed; nes
ted exception is javax.jbi.JBIException: Failed to initialize file system
manager: org.apache.commons.vfs.FileSystemException
: Badly formed URI "webdav://admin:[EMAIL PROTECTED]
:8080/udayweb/webdav/MyTest".
org.springframework.beans.factory.BeanCreationException: Error creating bean
with name 'jbi' defined in file [C:\uday\AppTalk
-
5.0.0_resources\ServiceMix\servicemix-3.0-SNAPSHOT\win_apps\vfs_polling_win.xml]:
Initialization of bean failed; nested exce
ption is javax.jbi.JBIException: Failed to initialize file system manager:
org.apache.commons.vfs.FileSystemException: Badly
formed URI "webdav://admin:[EMAIL PROTECTED]:8080/udayweb/webdav/MyTest".
javax.jbi.JBIException: Failed to initialize file system manager:
org.apache.commons.vfs.FileSystemException: Badly formed UR
I "webdav://admin:[EMAIL PROTECTED]:8080/udayweb/webdav/MyTest".
       at
org.apache.servicemix.components.vfs.FileObjectEditor.getFileObject(
FileObjectEditor.java:71)
       at org.apache.servicemix.components.vfs.FileWriter.init(
FileWriter.java:101)
       at org.apache.servicemix.components.util.PojoSupport.init(
PojoSupport.java:83)
       at org.apache.servicemix.jbi.framework.ComponentMBeanImpl.init(
ComponentMBeanImpl.java:192)
       at
org.apache.servicemix.jbi.container.JBIContainer.activateComponent(
JBIContainer.java:993)
       at
org.apache.servicemix.jbi.container.JBIContainer.activateComponent(
JBIContainer.java:957)
       at
org.apache.servicemix.jbi.container.JBIContainer.activateComponent(
JBIContainer.java:916)
       at
org.apache.servicemix.jbi.container.JBIContainer.activateComponent(
JBIContainer.java:864)
       at
org.apache.servicemix.jbi.container.SpringJBIContainer.afterPropertiesSet(
SpringJBIContainer.java:67)
       at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods
(AbstractAutowireCap
ableBeanFactory.java:1059)
       at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean
(AbstractAutowireCapableBea
nFactory.java:363)
       at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(
AbstractBeanFactory.java:226)
       at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(
AbstractBeanFactory.java:147)
       at
org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons
(DefaultListableBeanF
actory.java:275)
       at
org.springframework.context.support.AbstractApplicationContext.refresh(
AbstractApplicationContext.java:320)
       at org.apache.xbean.spring.context.FileSystemXmlApplicationContext
.<init>(FileSystemXmlApplicationContext.java:149)
       at org.apache.xbean.spring.context.FileSystemXmlApplicationContext
.<init>(FileSystemXmlApplicationContext.java:48)
       at org.apache.servicemix.Main.main(Main.java:74)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at sun.reflect.NativeMethodAccessorImpl.invoke(
NativeMethodAccessorImpl.java:39)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(
DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:585)
       at org.codehaus.classworlds.Launcher.launchStandard(Launcher.java
:410)
       at org.codehaus.classworlds.Launcher.launch(Launcher.java:344)
       at org.codehaus.classworlds.Launcher.main(Launcher.java:461)
Caused by: org.apache.commons.vfs.FileSystemException: Badly formed URI "
webdav://admin:[EMAIL PROTECTED]:8080/udayweb/webdav/MyTest".
       at org.apache.commons.vfs.provider.url.UrlFileProvider.findFile(
UrlFileProvider.java:81)
       at org.apache.commons.vfs.impl.DefaultFileSystemManager.resolveFile(
DefaultFileSystemManager.java:529)
       at org.apache.commons.vfs.impl.DefaultFileSystemManager.resolveFile(
DefaultFileSystemManager.java:483)
       at org.apache.commons.vfs.impl.DefaultFileSystemManager.resolveFile(
DefaultFileSystemManager.java:453)
       at
org.apache.servicemix.components.vfs.FileObjectEditor.getFileObject(
FileObjectEditor.java:58)
       ... 24 more
Caused by: java.net.MalformedURLException: unknown protocol: webdav
       at java.net.URL.<init>(URL.java:574)
       at java.net.URL.<init>(URL.java:464)
       at java.net.URL.<init>(URL.java:413)
       at org.apache.commons.vfs.provider.url.UrlFileProvider.findFile(
UrlFileProvider.java:65)
       ... 28 more
--------------------------------------------

Can anybody tell me where i am doing wrong ?

--
Thanks,
Uday Garikapati

Reply via email to