file-sender: how to specify a network folder?
corrado.campisano Jan 9, 2009 6:51 AMHi,
I am having troubles in using a network folder on windows.
(I am using servicemix-web.3.3 deployed into tomcat)
I'd like to use a mapped drive like:
K:\myfolder
or the full path:
server\mypath\myfolder
what's the exact syntax for that?
Notice I externalized this configuration in an external property file, so my bean.xml looks like that:
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns:file="http://servicemix.apache.org/file/1.0"
xmlns:sme="http://servicemix.eu/tools/sMixCcbFrt/1.0"
xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://servicemix.apache.org/file/1.0 http://servicemix.apache.org/schema/servicemix-file-3.2.2.xsd
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">
<bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
<property name="locations">
<value>file:${catalina.home}/../apps/sMixCcbFrt/config/sMixCcbFrt.properties</value>
</property>
</bean>
<file:sender service="sme:fileWriter"
endpoint="endpoint"
directory="${sMixCcbFrt.outPath}">
<property name="marshaler">
<bean class="org.apache.servicemix.components.util.BinaryFileMarshaler" />
</property>
</file:sender>
</beans>
Notice the variable ${sMixCcbFrt.outPath}
is set in the external configuration file like this (here's several attempts I made):
1)
sMixCcbFrt.outPath = K:
test
this raises a javax.jbi.management.DeploymentException upon deployment: 'The directory property must be a directory but was K:\test'
at org.apache.servicemix.file.FileSenderEndpoint.validate(FileSenderEndpoint.java:64)
2)
sMixCcbFrt.outPath =
sgromds01
psd$
test
this is ok on deplyoment, but at runtime a folder is created in c:\sgromds01\psd$\testand files are placed there instead of in the network folder.
3)
sMixCcbFrt.outPath =file:
\sgromds01
psd$
test
again, this is ok on deplyoment, but at runtime a folder is created in c:\sgromds01\psd$\testand files are placed there instead of in the network folder.
Do you have any suggestions?
Best regards,
Corrado Campisano