You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by johper <ka...@hotmail.com> on 2007/03/13 09:18:38 UTC

servicemix-ftp marshaler fileName

Hi,
Would like to change fileName after polling a directory with
"servicemix-file" component.
Need to set fileName to: "original-file-name-with-no-file-extension" +
".tmp". 
Tried (see below) PropertyExpression, also with "concat(<property>, '.tmp'
)" with no luck.

If possible to solve this without coding Java?

  <ftp:sender service="postman:ftpSender" endpoint="endpoint" >
   	<!--property name="uri" value="ftp://myuserid:mypassword@localhost" /-->
   	<property name="clientPool">
	       <bean id="ftpClientPool"
class="org.apache.servicemix.ftp.FTPClientPool">
	                               <property name="host" value="localhost"/>
	                               <property name="username" value="myuserid"/>
	                               <property name="password"
value="mypassword"/>
	         </bean>
       </property>
   	<property name="marshaler">
		<bean class="org.apache.servicemix.components.util.BinaryFileMarshaler">
			<property name="fileName">
				 <bean class="org.apache.servicemix.expression.PropertyExpression">
				   <constructor-arg value="org.apache.servicemix.file.name"/>
                                 </bean> 
			</property>
		</bean>
	</property>  	            
  </ftp:sender>
-- 
View this message in context: http://www.nabble.com/servicemix-ftp-marshaler-fileName-tf3394492s12049.html#a9450029
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: [implentation on an internal system host] servicemix-ftp marshaler fileName

Posted by johper <ka...@hotmail.com>.
That works fine...thanks!


gnodet wrote:
> 
> If you use a JAXPStringXpathExpression, properties on the exchange
> can be accessed as variables, such as $property, so you should be able
> to write an xpath expression just the way you want.
> 
> On 3/13/07, johper <ka...@hotmail.com> wrote:
>>
>>
>> Hi,
>> Would like to change fileName after polling a directory with
>> "servicemix-file" component.
>> Need to set fileName to: "original-file-name-with-no-file-extension" +
>> ".tmp".
>> Tried (see below) PropertyExpression, also with "concat(<property>,
>> '.tmp'
>> )" with no luck.
>>
>> If possible to solve this without coding Java?
>>
>>   <ftp:sender service="postman:ftpSender" endpoint="endpoint" >
>>         <!--property name="uri"
>> value="ftp://myuserid:mypassword@localhost"
>> /-->
>>         <property name="clientPool">
>>                <bean id="ftpClientPool"
>> class="org.apache.servicemix.ftp.FTPClientPool">
>>                                        <property name="host"
>> value="localhost"/>
>>                                        <property name="username"
>> value="myuserid"/>
>>                                        <property name="password"
>> value="mypassword"/>
>>                  </bean>
>>        </property>
>>         <property name="marshaler">
>>                 <bean class="
>> org.apache.servicemix.components.util.BinaryFileMarshaler">
>>                         <property name="fileName">
>>                                  <bean class="
>> org.apache.servicemix.expression.PropertyExpression">
>>                                    <constructor-arg value="
>> org.apache.servicemix.file.name"/>
>>                                  </bean>
>>                         </property>
>>                 </bean>
>>         </property>
>>   </ftp:sender>
>> --
>> View this message in context:
>> http://www.nabble.com/servicemix-ftp-marshaler-fileName-tf3394492s12049.html#a9450029
>> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>>
>>
> 
> 
> -- 
> Cheers,
> Guillaume Nodet
> ------------------------
> Architect, LogicBlaze (http://www.logicblaze.com/)
> Blog: http://gnodet.blogspot.com/
> 
> 

-- 
View this message in context: http://www.nabble.com/servicemix-ftp-marshaler-fileName-tf3394492s12049.html#a9451350
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: servicemix-ftp marshaler fileName

Posted by Guillaume Nodet <gn...@gmail.com>.
If you use a JAXPStringXpathExpression, properties on the exchange
can be accessed as variables, such as $property, so you should be able
to write an xpath expression just the way you want.

On 3/13/07, johper <ka...@hotmail.com> wrote:
>
>
> Hi,
> Would like to change fileName after polling a directory with
> "servicemix-file" component.
> Need to set fileName to: "original-file-name-with-no-file-extension" +
> ".tmp".
> Tried (see below) PropertyExpression, also with "concat(<property>, '.tmp'
> )" with no luck.
>
> If possible to solve this without coding Java?
>
>   <ftp:sender service="postman:ftpSender" endpoint="endpoint" >
>         <!--property name="uri" value="ftp://myuserid:mypassword@localhost"
> /-->
>         <property name="clientPool">
>                <bean id="ftpClientPool"
> class="org.apache.servicemix.ftp.FTPClientPool">
>                                        <property name="host"
> value="localhost"/>
>                                        <property name="username"
> value="myuserid"/>
>                                        <property name="password"
> value="mypassword"/>
>                  </bean>
>        </property>
>         <property name="marshaler">
>                 <bean class="
> org.apache.servicemix.components.util.BinaryFileMarshaler">
>                         <property name="fileName">
>                                  <bean class="
> org.apache.servicemix.expression.PropertyExpression">
>                                    <constructor-arg value="
> org.apache.servicemix.file.name"/>
>                                  </bean>
>                         </property>
>                 </bean>
>         </property>
>   </ftp:sender>
> --
> View this message in context:
> http://www.nabble.com/servicemix-ftp-marshaler-fileName-tf3394492s12049.html#a9450029
> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>
>


-- 
Cheers,
Guillaume Nodet
------------------------
Architect, LogicBlaze (http://www.logicblaze.com/)
Blog: http://gnodet.blogspot.com/