-
1. Re: NotifyFiles: File names generated at runtime?
kconner Jul 12, 2010 11:09 AM (in response to malmit)It may be that the docs are in error in that case, as this should be possible. What is it that you want to do?
Kev
-
2. Re: NotifyFiles: File names generated at runtime?
malmit Jul 12, 2010 4:25 PM (in response to kconner)I'm working with a system that uses xml file based input and output and would like to use JBoss ESB so that It can take an arbitrary input file from a directory, have it run through the action processing chain calling a external Axis2 WSDL based web service, and then transform the SOAP response into a resulting XML and writing that out using NotifyFiles. I would like to, if possible, make the output filename the same as the input filename, but there doesn't seem to be any good documentation to support this. I did some searching and have seen people using property substitution in jboss-esb.xml but can't seem to find out how property substitution works and if there are "well-known" properties that I might be able to leverage. Also if it's possible to create custom properties that I could use in jboss-esb.xml. If this is documented somehow it would save people like me a bunch of time searching all over the place to do this. Any help would be appreciated. Thanks!
-
3. Re: NotifyFiles: File names generated at runtime?
kconner Jul 13, 2010 4:59 AM (in response to malmit)There are two different aspects to your last comments
- property substitution in jboss-esb.xml
- dynamic names for file creation
The properties in the first case are purely System properties and take effect at deploy time. The server defines a number of these, usually logged in the boot.log file, but you can obviously add your own to this.
The second case can use dynamic substitution based on the contents of the message and is interpreted as follows
- If the file URI contains elements contained in {} then see if they exist in message.getProperties and substitute.
- If the URI represents the location of on object in the message (see ObjectMapper) and is a String/URI then use this value
- Use the value as is
The example you need seems to be something like the following, which works with the service in the helloworld_file_action QS
<action name="notificationAction"> <property name="okMethod" value="notifyOK" /> <property name="notification-details"> <NotificationList type="ok"> <target> <file append="false" URI="@OUTPUTDIR@/{org.jboss.soa.esb.gateway.original.file.name}.result.kev"/> </target> </NotificationList> </property> </action>
(org.jboss.soa.esb.gateway.original.file.name is a property on the message, created by the file gateway)
Kev
-
4. Re: NotifyFiles: File names generated at runtime?
malmit Jul 13, 2010 9:01 AM (in response to kconner)Thanks for the help! You wouldn't believe how much searching and experimenting I've wasted trying to search for this.
-
5. Re: NotifyFiles: File names generated at runtime?
tomeicher Jul 22, 2010 5:23 AM (in response to malmit)Tim, if the documentations is wrong or imcomplete, why not open a JIRA task to provide your additions or corrections ? Cheers, Tom.