FTP Adapter in OSB
Hi Guys,
I have used an FTP adapter in OSB and it is working fine. What I want to do is to override the Delete File setting for the adapter.
I don't want to delete(or archive) the file/s (scenario e.g. is that I have to send the same file over and over again).
Please suggest. Thanks in advance.
Hi,
You can overide the Delete File setting by using a logical name instead of a physical path to the folder.
When you use logical names for the file read and archive locations, two properties are added to the service/reference binding with the name you have given them in the wizard.
The value between the tags can be overwritten. Initials they''re blank/empty.
<property name="fileDelLoc" type="xs:string" many="false" override="may">c:\temp\out</property>
<property name="fileLoc" type="xs:string" many="false" override="may">c:\temp\in</property>
These properties can be changed on deployment time with a configuration plan or on runtime via the EM in the settings page of the service binding.
<service name="ReadFileService">
<property name="fileDelLoc">
<replace></replace>
</property>
<property name="fileLoc">
<replace></replace>
</property>
<binding type="jca"/>
</service>
Cheers,
Robert van Mölken
Senior Oracle Integration Specialist
Similar Messages
-
FTP Adapter on OSB - how to specify logical directory path
I am using the ftp adapter on osb 11g (Oracle Service Bus Version: [Oracle Service Bus Server Side Dependencies 11.1 Thu Aug 19 02:10:08 PDT 2010 ] Oracle Weblogic Server Version: [WebLogic Server 10.3.4.0 Fri Dec 17 20:47:33 PST 2010 1384255 ])
I defined the ftp adapter using jdev and imported the jca artifacts into osb.
I created a business service using jca adapter to put the file to the ftp server.
The problem is the write directory on the ftp server is different for each environment - DEV, QA, PROD.
I used a physical directory specification when defining the adapter in JDEV because it wasn't clear from the help how i would override a logical directory during deployment to osb (it is clear if deploying to soa suite).
Is there a way to override this dynamically override this directory at runtime. Or even better a way to override during deployment time?You do it either way....
Import the SBConfig jar into the sbconsole and change the value in the JCA file
or
Re: Customizing JCA FTP Adapter properties in OSB -
Passing Streaming Content to a JCA FTP adapter in OSB
Hi,
Is there any way to pass streaming content represented by e.g.<con:binary-content ref="cid:1b6ff6d0:1416f7a74ab:-1d8a" xmlns:con="http://www.bea.com/wli/sb/context"/> to JCA FTP(business service) adapter?
My binary content already represents base64Binary format. Content is around 250Mb so there is no possibility to put it to memory(java.lang.OutOfMemoryError).
FTP Adapter wsdl
<wsdl:definitions
name="FTPAdapter"
targetNamespace="http://xmlns.oracle.com/pcbpel/adapter/ftp/Adapter/FTPAdapter/FTPAdapter"
xmlns:jca="http://xmlns.oracle.com/pcbpel/wsdl/jca/"
xmlns:tns="http://xmlns.oracle.com/pcbpel/adapter/ftp/Adapter/FTPAdapter/FTPAdapter"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:opaque="http://xmlns.oracle.com/pcbpel/adapter/opaque/"
xmlns:FTPAPP="http://xmlns.oracle.com/pcbpel/adapter/ftp/"
xmlns:plt="http://schemas.xmlsoap.org/ws/2003/05/partner-link/"
>
<plt:partnerLinkType name="SaveFile_plt" >
<plt:role name="SaveFile_role" >
<plt:portType name="tns:SaveFile_ptt" />
</plt:role>
</plt:partnerLinkType>
<wsdl:types>
<schema targetNamespace="http://xmlns.oracle.com/pcbpel/adapter/opaque/"
xmlns="http://www.w3.org/2001/XMLSchema" >
<element name="opaqueElement" type="base64Binary" />
</schema>
<schema targetNamespace="http://xmlns.oracle.com/pcbpel/adapter/ftp/" xmlns="http://www.w3.org/2001/XMLSchema"
attributeFormDefault="qualified"
elementFormDefault="qualified" >
<element name="OutboundFTPHeaderType" >
<complexType>
<sequence>
<element name="fileName" type="string" />
<element name="directory" type="string" />
</sequence>
</complexType>
</element>
</schema>
</wsdl:types>
<wsdl:message name="SaveFile_msg">
<wsdl:part name="opaque" element="opaque:opaqueElement"/>
</wsdl:message>
<wsdl:message name="Output_msg">
<wsdl:part name="body" element="FTPAPP:OutboundFTPHeaderType"/>
</wsdl:message>
<wsdl:portType name="SaveFile_ptt">
<wsdl:operation name="SaveFile">
<wsdl:input message="tns:SaveFile_msg"/>
<wsdl:output message="tns:Output_msg"/>
</wsdl:operation>
</wsdl:portType>
</wsdl:definitions>aren't the default cluster aware settings enough for this ?
http://docs.oracle.com/cd/E15523_01/integration.1111/e10231/adptr_db.htm
Scalability
you could enable a few in the adapter wizards -
Passing file name dynamically in Synchronous read operation of FTP adapter in OSB
Hi,
We are implementing the integration in OSB 11g and using FTP JCA adapters to check if the file exists in the FTP location or not. We are using Synchronous read operation of FTP adapters. We need to pass the file name dynamically at run time. In the JCA file we can hard code the file name. How that file name can be taken dynamically using OSB.
Regards,
SharmisthaHi Sandeep,
This is possible.
For creating filenames dynamically for your sender, you will have to crate a variable name ( eg: %VAR%) as you file name and then you will have to give the name of your file under variable substitution. Just check this link for more info,
http://help.sap.com/saphelp_nw04/helpdata/en/14/80243b4a66ae0ce10000000a11402f/frameset.htm
In the case of receiver file adapaters, you have 5 options for file creation like,
1.Create
2.Append
3. Add time stamp
4.Add Counter
5. Add Message ID
You can choose any of these options or you can do it dynamically from you payload. Just check out this help link for more info,
http://help.sap.com/saphelp_nw04/helpdata/en/14/80243b4a66ae0ce10000000a11402f/frameset.htm
Hope this helps -
Customizing JCA FTP Adapter properties in OSB
Hi,
I have requirement to read a file from one file system and write it on another file system.I have implemented this using jca FTP adapter in OSB.
The read and write directory will be different across environments in which I need to deploy the project.
The read and write directory info is present in the jca file as given below.
<activation-spec className="oracle.tip.adapter.ftp.inbound.FTPActivationSpec">
<property name="DeleteFile" value="true"/>
<property name="MinimumAge" value="0"/>
<property name="PhysicalDirectory" value="TEST/INPUT"/>
<property name="Recursive" value="true"/>
<property name="PollingFrequency" value="10"/>
<property name="FileType" value="ascii"/>
<property name="PhysicalArchiveDirectory" value="/PROJ/ARCHIVE"/>
<property name="IncludeFiles" value=".*\..*"/>
<property name="UseHeaders" value="false"/>
</activation-spec>
Is it possibel to cahnge this valueof <property name="PhysicalDirectory" value="TEST/INPUT"/> using customization files. From the OSB docs I undersatnd that only OSB predefined environment values can be changed using customization files.
Thanks,
Sai.Hi Prabu,
The directory name is not appearing in the configuration of the services.
I have specific reason for going with jca Adapter. Why writing the files to the destination if some failure happens ftp protocol may cause partially written files but I think JCA adapter will make sure either the file is completely transferred or not transferred at all.
If this cannot be done in OSB I think I need to go for BPEL implementation where the config plan supports the replacement of JCA properties.
Thanks,
Sai. -
OSB error while generating business service for FTP adapter Sync Get File
Hi All
I am trying to generate a business service from SOA Suite JCA FTP adapter Sync Get File, but i am getting this exception for no reasons (Rest operations list file, get file and put file are working)
Invalid JCA transport endpoint configuration, exception: java.lang.NullPointerException Unknown ALSB Conflict.
Is this a bug in eclipse, can any body help me. Thanks
Sorry Forgot to mention eclipse version...
Eclipse Platform
Version: 3.6.2
Build id: M20110210-1200Ok,
bcoz of this issue, i had to code the entire interface in OSB console. It runs fine in OSB console (i was able to test it successfully).
Is this a bug in eclipse or only i am facing this issue? Has anybody tried to create a business service from JCA FTP Get Synchronous jca file?
<adapter-config name="FTPReadMOMFileOnRMSDB" adapter="FTP Adapter"
wsdlLocation="../wsdl/FTPReadMOMFileOnRMSDB.wsdl"
xmlns="http://platform.integration.oracle/blocks/adapter/fw/metadata">
<connection-factory location="eis/ftp/RMSDBFtpAdapter" />
<endpoint-interaction portType="SynchRead_ptt"
operation="SynchRead">
<interaction-spec
className="oracle.tip.adapter.ftp.outbound.FTPReadInteractionSpec">
<property name="DeleteFile" value="true" />
<property name="PhysicalDirectory" value="/MOMFiles/output" />
<property name="FileName" value="*" />
<property name="FileType" value="binary" />
</interaction-spec>
</endpoint-interaction>
</adapter-config>
One more doubt? The PhysicalArchiveDirectory path can be on the FTP server something like: /MOMFiles/archive. Or do i have to use the Put operation to move it to /MOMFiles/archive directory. Currently OSB console and eclipse do not accept FTP path for this parameter and want me to specify a local directory on server. Thanks -
FTP adapter for Oracle Service Bus - retrieve file by dynamic file name.
Hi
I am newbie in OSB. I try to use FTP transport in Workshop, it must fill in "Prefix" and "Suffix" for destination file name.
But for us, the file name is sent by external systems.
The workflow is:
1. External system call our proxy services.
2. Proxy service get file name from SOAP message.
3. Proxy Service get the file from FTP server.
4. The file send to Business services.
Any suggestions to implement about workflows?Let me first put here what I understand about the flow:
External Sytem -->(filename)--> OSB HTTP PS --> (1) --> OSB FTP BS --> Read file based on filename
|--> (2) --> send file ontent to another system or return to the original system
If that is the flow, then I beileve ther is no straight forward way to implement it in OSB.
OSB FTP BS will only write a file to FTP Location.
If you create a JCA FTP Adapter for reading the file, then you can use it only to create a Proxy Service, and that proxy will not pick up the file when called from another service but only when a file is put on the source FTP location.
So, to implement the solution you will need to use Java Callout to a class which has code written to accept the file name as input, read the file from an FTP location and return the file content.
This is my understanding of how it is, may be there is another way to implement this or in fact may be the latest version of OSB 11.1.1.4 or 11.1.1.5 JCA adapter does support read operation within a flow instead of just at the start of the flow. -
Hi,
I have requirement to move files between two ftp servers. I have implemented this using OSB services configured with jca ftp adapter. After reading the files from the source system the adapter is configured to delete the file from source directory. While moving the files if the target system is unreachable the transaction should roll back and the file should remain in the source directory.
Can this be achievable using jca ftp adapter. Does ftp adapter have XA capability?
Thanks,
Sai.OSB's ftp transport is transactional on the inbound side ( proxy service side) .. So you could use this.. Make sure you are not configuring any reply actions in any of the error handlers.. When route error occurs make sure the error is allowed to propagate back to the system error handler.. .
By default osb's ftp transport will retry only once and then move the file to the error directory. If you want to change this behaviour say retry infinitely or retry after a delay , you have to change the dleivery failure settings for the internal JMS queue WLSAdmin Console --> JMSModules --> jmsResources --> wlsb.internal.transport.task.queue.ftp_auto_2 ( wlsb.internal.transport.task.queue.ftp_auto_3 and so on) Delivery Failure and change redelivery delay and redelivery limit.
Note OSB's ftp transport is not transactional outbound(business service) , so you might get only "At-least once" (and not "exactly-once") quality of service using this .. -
How to set 'error' status with DB poll Adapter in OSB
1. Configured DB Adapter to poll rows with status 'notprocessed' and set the status to 'processed'
2. Configured FTP Adapter to write fetched rows from DB into a CSV file
Now my requirement is if any error like FTP server is not available, how to set the status in DB table to 'error'Yes Vlad you are right, this will avoid another DB connection created in Error Handler.
I hope this will provide some lights on the usefulness of "Transaction"
http://www.nysolutionsltd.com/transaction-handling-in-oracle-service-bus/
http://kd-blog-tech.blogspot.com.au/2010/12/transaction-management-for-osb-service.html
Regards
RK
Edited by: RK.. on 27/03/2013 17:10 -
FTP Adapter restrict polling frequency active time frame in a day
Hi All,
Is there anyway I can restrict FTP adapter polling frequency to be active during a particular time frame of the day. Say, my service should poll the incoming location for Sales order data for every hour during business hours of the day.
Thanks,
AGHi
SOA Suite 12c will expose Oracle ESS as the scheduler.
ESS will allow you to schedule soa composites / OSB services etcand allow you to enable / disable them based on jobs, which is what you desire.
12c SOA Suite is expected later this Summer.
Cheers
iain -
How to use Oracle File Adapter in OSB
We are trying to use File Adapter in OSB 11g. Is it supported in this version? If yes then some one can specify a document which contains File Adapter - OSB integration steps.
according to the ESB JCA transport:
[ESB JCA|http://download.oracle.com/docs/cd/E14571_01/doc.1111/e15866/jca.htm#i1106345]
http://download.oracle.com/docs/cd/E14571_01/doc.1111/e15866/jca.htm#i1106345
there is only these adapters:
_25.2.1 Adapter Support_
The Oracle Service Bus JCA transport lets you interact with the following JCA-compliant adapters:
Oracle Adapter for Oracle Applications
Oracle JCA Adapter for AQ
Oracle JCA Adapter for Database
Oracle JCA Adapter for Files
Oracle BAM Adapter (Business Activity Monitoring)
PeopleSoft (Oracle Application Adapters 10g)
SAP R/3 (Oracle Application Adapters 10g)
Siebel (Oracle Application Adapters 10g)
J.D. Edwards (Oracle Application Adapters 10g)
See the following guides for more information on Oracle adapters:
I wanna use FTP Adapter and MQ Adapter in Oracle ESB 11.1.1.3, can we make it? -
Error while deploying a process with FTP Adapter
Hi All,
I am using JDev 10.1.3.3 and SOA 10.1.3.3
I am using FTP Adapter to get a file from a remote location in a empty Process.
I have checked delete files option and using logical directory.
While deploying i am getting the below error.
A problem occured while connecting to server "XXXX" using port "XXXX": bpel_APACSHPREQ940PassThroughBPELOB_1.0.jar failed to deploy. Exception message is: ORABPEL-09903
Could not initialize activation agent.
An error occured while initializing an activation agent for process "APACSHPREQ940PassThroughBPELOB", revision "1.0".
Please ensure that the activation agents are configured correctly in the bpel deployment descriptor (bpel.xml).
oracle.tip.adapter.fw.agent.jca.JCAActivationAgent: java.lang.reflect.InvocationTargetException
Please help me out....
Regards
PavanKumarHi Krishna,
Not Working
<definitions
name="GetPSOJapanPassThroughFile"
targetNamespace="http://xmlns.oracle.com/pcbpel/adapter/ftp/GetPSOJapanPassThroughFile/"
xmlns="http://schemas.xmlsoap.org/wsdl/"
xmlns:tns="http://xmlns.oracle.com/pcbpel/adapter/ftp/GetPSOJapanPassThroughFile/"
xmlns:plt="http://schemas.xmlsoap.org/ws/2003/05/partner-link/"
xmlns:jca="http://xmlns.oracle.com/pcbpel/wsdl/jca/"
xmlns:opaque="http://xmlns.oracle.com/pcbpel/adapter/opaque/"
xmlns:pc="http://xmlns.oracle.com/pcbpel/"
xmlns:hdr="http://xmlns.oracle.com/pcbpel/adapter/ftp/"
>
<import namespace="http://xmlns.oracle.com/pcbpel/adapter/ftp/" location="ftpAdapterInboundHeader.wsdl"/>
<types>
<schema targetNamespace="http://xmlns.oracle.com/pcbpel/adapter/opaque/"
xmlns="http://www.w3.org/2001/XMLSchema" >
<element name="opaqueElement" type="base64Binary" />
</schema>
</types>
<message name="Get_msg">
<part name="opaque" element="opaque:opaqueElement"/>
</message>
<portType name="Get_ptt">
<operation name="Get">
<input message="tns:Get_msg"/>
</operation>
</portType>
<binding name="Get_binding" type="tns:Get_ptt">
<pc:inbound_binding />
<operation name="Get">
<jca:operation
FileType="ascii"
LogicalDirectory="GETPSOPTFILE"
ActivationSpec="oracle.tip.adapter.ftp.inbound.FTPActivationSpec"
DeleteFile="true"
IncludeFiles="PSO.*\.dat"
PollingFrequency="6"
MinimumAge="0"
OpaqueSchema="true" >
</jca:operation>
<input>
<jca:header message="hdr:InboundHeader_msg" part="inboundHeader"/>
</input>
</operation>
</binding>
<service name="GetPSOJapanPassThroughFile">
<port name="Get_pt" binding="tns:Get_binding">
<jca:address location="eis/Ftp/APACFtp" UIincludeWildcard="PSO*.dat" />
</port>
</service>
<plt:partnerLinkType name="Get_plt" >
<plt:role name="Get_role" >
<plt:portType name="tns:Get_ptt" />
</plt:role>
</plt:partnerLinkType>
</definitions>
Working
<definitions
name="GetPSOPassthroughFile"
targetNamespace="http://xmlns.oracle.com/pcbpel/adapter/ftp/GetPSOPassthroughFile/"
xmlns="http://schemas.xmlsoap.org/wsdl/"
xmlns:tns="http://xmlns.oracle.com/pcbpel/adapter/ftp/GetPSOPassthroughFile/"
xmlns:plt="http://schemas.xmlsoap.org/ws/2003/05/partner-link/"
xmlns:jca="http://xmlns.oracle.com/pcbpel/wsdl/jca/"
xmlns:opaque="http://xmlns.oracle.com/pcbpel/adapter/opaque/"
xmlns:pc="http://xmlns.oracle.com/pcbpel/"
xmlns:hdr="http://xmlns.oracle.com/pcbpel/adapter/ftp/"
>
<import namespace="http://xmlns.oracle.com/pcbpel/adapter/ftp/" location="ftpAdapterInboundHeader.wsdl"/>
<types>
<schema targetNamespace="http://xmlns.oracle.com/pcbpel/adapter/opaque/"
xmlns="http://www.w3.org/2001/XMLSchema" >
<element name="opaqueElement" type="base64Binary" />
</schema>
</types>
<message name="Get_msg">
<part name="opaque" element="opaque:opaqueElement"/>
</message>
<portType name="Get_ptt">
<operation name="Get">
<input message="tns:Get_msg"/>
</operation>
</portType>
<binding name="Get_binding" type="tns:Get_ptt">
<pc:inbound_binding />
<operation name="Get">
<jca:operation
FileType="ascii"
LogicalDirectory="GetPSOFile"
ActivationSpec="oracle.tip.adapter.ftp.inbound.FTPActivationSpec"
DeleteFile="false"
IncludeFiles="PSO.*\.dat"
PollingFrequency="6"
MinimumAge="0"
FileModificationTime="FileSystem"
ModificationTimeFormat="4,18,yyyyMMddHHmmSS"
OpaqueSchema="true" >
</jca:operation>
<input>
<jca:header message="hdr:InboundHeader_msg" part="inboundHeader"/>
</input>
</operation>
</binding>
<service name="GetPSOPassthroughFile">
<port name="Get_pt" binding="tns:Get_binding">
<jca:address location="eis/Ftp/APACFtp" UIincludeWildcard="PSO*.dat" />
</port>
</service>
<plt:partnerLinkType name="Get_plt" >
<plt:role name="Get_role" >
<plt:portType name="tns:Get_ptt" />
</plt:role>
</plt:partnerLinkType>
</definitions> -
Getting filename in FTP Adapter in BPEL
How to retrieve the filename read by the FTP adapter in ora-bpel?
Just figured out how to do this.
1. Create a variable of type 'InboundHeader_msg' defined in 'ftpAdapterInboundHeader.wsdl'.
2. Reference this in the 'Adapters' tab of the FTP adapter receive activity. -
Getting filename in FTP Adapter in ESB
I am trying to get the filename on an inbound FTP adapter in an ESB. I've followed the directions I have found, by following these steps:
1. The namespace xmlns:ehdr="http://www.oracle.com/XSL/Transform/java/oracle.tip.esb.server.headers.ESBHeaderFunctions" is automatically generated in the xsl file.
2. Create a variable in the xsl file, with value ehdr:getRequestHeader('/fhdr:InboundFileHeaderType/fhdr:fileName','fhdr=http://xmlns.oracle.com/pcbpel/adapter/file/;'). Let's give it the name INFILENAME.
3. Reference the variable in some expression in the xsl file: $INFILENAME
4.Set UseHeaders="true" in the FTP inbound wsdl file
When I do this in a file adapter, I can use the value. When I do this in an ftp adapter, no value comes back.
Any ideas?Yes, that did it, thanks. I had a typo:
getRequestHeader('/fhdr:InboundFtpHeaderType/fhdr:fileName,'fhdr=http://xmlns.oracle.com/pcbpel/adapter/ftp/;')
which should have had "FTP" in upper case. The correct code is as you stated:
getRequestHeader('/fhdr:InboundFTPHeaderType/fhdr:fileName,'fhdr=http://xmlns.oracle.com/pcbpel/adapter/ftp/;') -
Retaining the FileName in the Receiver FTP adapter
Hi experts,
I have a situation here, were i need to retain the FileName in the message header in the receiver FTP adapter.
I have tried using variable subtitution but seems the FileName is not supported in variable substitution.
Please help
ThanksHello,
if you need file name to be retained in the receiver adapter from the sender side. then u can do that by dynamic configuration using adapter specific message attributes, check this blog for details-
/people/michal.krawczyk2/blog/2005/11/10/xi-the-same-filename-from-a-sender-to-a-receiver-file-adapter--sp14
if you dont have a mapping in your interface to use dynamic configuration, then you can do it via adapter module also- have a look here, /people/sap.user72/blog/2005/07/15/copy-a-file-with-same-filename-using-xi
regards,
francis
Maybe you are looking for
-
Lock-ups while inserting to a remote database using a dblink
Our application runs across multiple instances of Oracle 8i - 8.1.6. Throughout the day we run some batch processes to transfer data across these instances using dblinks. Ocassionally the process locks up and further investigation shows that the serv
-
Trial Balance Cost Center Wise
We have created the Cost Elements, in the system for assigning the Cost Centers to these as and when the transactions are recorded. While we can generate the Cost Reports based on the Cost Centers used for capturing the transactions, there is a requi
-
I can't rename or move RAW files in Bridge (Mac)
Permissions are all set to read/write in finder and other file formats are fine. Batch rename just does nothing, trying to move it gets the error message "The operation cannot be completed because you do not have sufficient permissions" Running Mac O
-
Changes in XML from Extended IDOC Basic type
Hi Experts, We have an outbound PO IDOC (ORDERS05) that is converted to XML. If we are going to extend the IDOC, do we need to change anything in the XML as well? Or the new data will already be there in the XML? Br, LM
-
"move to new window" opens blank window (no content)
On a tab with content I right click and select "move to new window". A new window opens with an empty "New Tab". The content is still in the old window. Feature worked fine in 3.xx