atom feed3 messages in org.codehaus.mule.user[mule-user] can't read file and http put
FromSent OnAttachments
Eric PalmerDec 17, 2010 3:15 am 
David DossotDec 17, 2010 8:57 am 
Eric PalmerDec 18, 2010 3:29 am 
Subject:[mule-user] can't read file and http put
From:Eric Palmer (mule@mulesource.com)
Date:Dec 17, 2010 3:15:54 am
List:org.codehaus.mule.user

Centos 5.4 32 bit JDK: 1.6.0_18 (Sun/Oracle) Fresh install yesterday community 3.0.1

*What I'm trying to do*

I'm building my first mule config file and am having problems getting it to work
correctly or even understanding how to do diagnose the issues.

I want to pole a directory and when a file is placed there, the file should be
stored in exist-db (an xml db). I want to store the file using an authenticated
http put request. I created the config file in eclipse (helios) configured for mule and patched
according to the lastest patches.

I'm able to read (pole) a folder and then move any file placed there to another
folder. But the httpd put seems to 1) either not be working or 2) confuses the
in file inbound-endpoint. The address for puting the file and the username and
password have been tested in a rest put client (firefox extension) so I know
that works.

<?xml version="1.0" encoding="UTF-8"?> <mule xmlns="http://www.mulesoft.org/schema/mule/core" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:file="http://www.mulesoft.org/schema/mule/file" xmlns:https="http://www.mulesoft.org/schema/mule/https" xmlns:http="http://www.mulesoft.org/schema/mule/http" xmlns:vm="http://www.mulesoft.org/schema/mule/vm" xsi:schemaLocation="http://www.mulesoft.org/schema/mule/core
http://www.mulesoft.org/schema/mule/core/3.0/mule.xsd
http://www.mulesoft.org/schema/mule/file
http://www.mulesoft.org/schema/mule/file/3.0/mule-file.xsd
http://www.mulesoft.org/schema/mule/https
http://www.mulesoft.org/schema/mule/https/3.0/mule-https.xsd
http://www.mulesoft.org/schema/mule/http
http://www.mulesoft.org/schema/mule/http/3.0/mule-http.xsd "> <model name="fileReadPutExample"> <service name="fileService"> <inbound> <file:inbound-endpoint fileAge="500" path="/root/testFile/in" pollingFrequency="5000"> </file:inbound-endpoint> </inbound> <outbound> <pass-through-router> <!-- <file:outbound-endpoint path="/root/testFile/out"> </file:outbound-endpoint>--> <http:outbound-endpoint method="PUT" user="admin" password="admin" name="putFileToExist" contentType="text/xml" mimeType="text/xml" responseTimeout="1000" address="http://localhost:8080/exist/rest/db/testMule/test.xml" > </http:outbound-endpoint> </pass-through-router> </outbound> </service> <service name="UserErrorHandler"> </service> </model> </mule>

I have also tried the above without a filename in the address

This is the output of the logfile

INFO 2010-12-17 06:10:52,600 [WrapperListener_start_runner]
org.mule.module.launcher.DeploymentService: Application directory check
interval: 5000 INFO 2010-12-17 06:11:49,635 [[readFulePut].connector.file.0.receiver.1]
org.mule.transport.file.FileMessageReceiver: Lock obtained on file:
/root/testFile/in/sample.xml INFO 2010-12-17 06:11:49,682 [[readFulePut].fileService.2]
org.mule.transport.service.DefaultTransportServiceDescriptor: Loading default
outbound transformer:
org.mule.transport.http.transformers.ObjectToHttpClientMethodRequest INFO 2010-12-17 06:11:49,688 [[readFulePut].fileService.2]
org.mule.transport.service.DefaultTransportServiceDescriptor: Loading default
response transformer:
org.mule.transport.http.transformers.MuleMessageToHttpResponse INFO 2010-12-17 06:11:49,688 [[readFulePut].fileService.2]
org.mule.transport.service.DefaultTransportServiceDescriptor: Loading default
outbound transformer:
org.mule.transport.http.transformers.ObjectToHttpClientMethodRequest INFO 2010-12-17 06:11:49,688 [[readFulePut].fileService.2]
org.mule.lifecycle.AbstractLifecycleManager: Initialising:
'connector.http.0.dispatcher.33059805'. Object is: HttpClientMessageDispatcher INFO 2010-12-17 06:11:49,691 [[readFulePut].fileService.2]
org.mule.lifecycle.AbstractLifecycleManager: Starting:
'connector.http.0.dispatcher.33059805'. Object is: HttpClientMessageDispatcher INFO 2010-12-17 06:11:54,877 [[readFulePut].connector.file.0.receiver.1]
org.mule.transport.file.FileMessageReceiver: Lock obtained on file:
/root/testFile/in/sample.xml INFO 2010-12-17 06:12:00,123 [[readFulePut].connector.file.0.receiver.1]
org.mule.transport.file.FileMessageReceiver: Lock obtained on file:
/root/testFile/in/sample.xml INFO 2010-12-17 06:12:05,274 [[readFulePut].connector.file.0.receiver.1]
org.mule.transport.file.FileMessageReceiver: Lock obtained on file:
/root/testFile/in/sample.xml INFO 2010-12-17 06:12:10,441 [[readFulePut].connector.file.0.receiver.1]
org.mule.transport.file.FileMessageReceiver: Lock obtained on file:
/root/testFile/in/sample.xml INFO 2010-12-17 06:12:15,737 [[readFulePut].connector.file.0.receiver.1]
org.mule.transport.file.FileMessageReceiver: Lock obtained on file:
/root/testFile/in/sample.xml INFO 2010-12-17 06:12:21,000 [[readFulePut].connector.file.0.receiver.1]
org.mule.transport.file.FileMessageReceiver: Lock obtained on file:
/root/testFile/in/sample.xml INFO 2010-12-17 06:12:26,269 [[readFulePut].connector.file.0.receiver.1]
org.mule.transport.file.FileMessageReceiver: Lock obtained on file:
/root/testFile/in/sample.xml

When I shutdown mule the file I moved to the poling folder is still there.

Can you help me understand how best to diagnose mule configurations (especially
thins one).

Thanks