Details
-
Improvement
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
None
-
None
-
Patch Available
Description
FilePoller currently does not use a target operation when sending a message to a target service. The operation must be set, for example, when sending a file to a Ode SU. If not set, Ode throws sort of NPE complaining operation is not set.
FilePoller should offer a targetOperation property configurable via XBeans.
This can be achieved by adding a targetOperation property to the org.apache.servicemix.file.FilePollerEndpoint.java class which will be passed to the exchange object if set. The following code would do (corresponding patch is appended):
...
private QName targetOperation = null;
...
public QName getTargetOperation()
public void setTargetOperation(QName targetOperation)
{ this.targetOperation = targetOperation; } ...
protected void processFile(File aFile) throws Exception
Then, the SU may be configured properly as follows:
<f:poller
service="proj:inbox"
endpoint="inbox"
targetService="process:receive"
targetOperation="process:receive"
file="file:///box/inbox"
...
</f:poller>
In case the attribute is not set in the xbean.xml, the current behaviour is not changed.