Oracle bpel file adapter 11g




















The JCA 1. This end-to-end invocation is synchronous. For detailed design-time and run-time tasks for each integration interface, see the individual interface chapter explained later in this book. Its infrastructure enables enterprises to deploy mission-critical applications in a robust, secure, highly available, and scalable environment and is an ideal foundation for building applications based on service-oriented architectures SOA.

SOA is a design methodology aimed at maximizing the reuse of application services. J2CA defines standard Java interfaces for simplifying the integration of a J2EE server with various back-end applications.

All client applications run within the Oracle WebLogic Server environment. The J2CA 1. This section describes the new features that have been added in Oracle Fusion Middleware Adapter for Oracle Applications 11 g Release 1 For example, if the FTP server is six hours ahead of your local time, you must add the following endpoint property to your service or reference:.

When a resource adapter makes an outbound connection with an Enterprise Information System EIS , it must sign on with valid security credentials. In accordance with the J2CA 1. At runtime, Oracle WebLogic Server determines the chosen sign-on mechanism, based on the information specified in either the invoking client component's deployment descriptor or the res-auth element of the resource adapter deployment descriptor.

A container-managed sign-on enables you to sign on to Oracle WebLogic Server and also be able to use applications that access EIS through a resource adapter without having to sign on separately to the EIS. Container-managed sign-on in Oracle WebLogic Server uses credential mappings. You can configure credential mappings for applicable security principals for any deployed resource adapter. To configure credential mappings, you can specify the user names and passwords in the weblogic-ra.

Click Deployments in the Domain Structure pane. The deployed applications and adapters are displayed, as shown in Figure Click the adapter for which you must create the security credentials. For example, click FtpAdapter. The Settings for FtpAdapter page is displayed, as shown in Figure Click the Security tab. Click New in the Credential Mappings pane. Click Next. For example, enter weblogic , which is the default user name. Click Finish. The new security credential mapping is created, as shown in Figure In the inbound direction, the Oracle File Adapter polls and reads files from a file system for processing.

This section provides an overview of the inbound file reading capabilities of the Oracle File Adapter. Figure Selecting the Read File Operation. The File Directories page of the Adapter Configuration Wizard shown in Figure enables you to specify information about the directory to use for reading inbound files and the directories in which to place successfully processed files. You can choose to process files recursively within directories.

You can also specify multiple directories. In the composite, logical properties are specified in the inbound JCA file and their logical-physical mapping is resolved by using binding properties. You specify the logical parameters once at design time, and you can later modify the physical directory name as needed.

In the composite. This resolves the mapping between the logical directory name and actual physical directory name. This option enables you to specify a directory in which to place successfully processed files.

You can also specify the archive directory as a logical name. In this case, you must follow the logical-to-physical mappings described in Section 4. This option enables you to specify whether to delete files after a successful retrieval. If this check box is not selected, processed files remain in the inbound directory but are ignored.

Only files with modification dates more recent than the last processed file are retrieved. If you place another file in the inbound directory with the same name as a file that has been processed but the modification date remains the same, then that file is not retrieved. The File Filtering page of the Adapter Configuration Wizard shown in Figure enables you to specify details about the files to retrieve or ignore.

The Oracle File Adapter acts as a file listener in the inbound direction. The Oracle File Adapter polls the specified directory on a local or remote file system and looks for files that match specified naming criteria. Specify the naming convention that the Oracle File Adapter uses to poll for inbound files.

You can also specify the naming convention for files you do not want to process. Two naming conventions are available for selection. The Oracle File Adapter matches the files that appear in the inbound directory. Retrieves all files that start with po and end with.

This convention conforms to Windows operating system standards. If you later select a different naming pattern, ensure that you also change the naming conventions you specify in the Include Files and Exclude Files fields. The Adapter Configuration Wizard does not automatically make this change for you. Be aware of any file length restrictions imposed by your operating system. For example, Windows operating system file names cannot be more than characters in length the file name, plus the complete directory path.

Some operating systems also have restrictions on the use of specific characters in file names. If you use regular expressions, the values you specify in the Include Files and Exclude Files fields must conform to JDK regular expression regex constructs. For both fields, different regex patterns must be provided separately. If you want the inbound Oracle File Adapter to pick up all file names that start with po and which have the extension txt , then you must specify the Include Files field as po.

In this regex pattern example:. If you have Include Files field and Exclude Files field expressions that have an overlap, then the exclude files expression takes precedence. Table Java Regular Expression Constructs.

X , at least n , but not more than m times. The FileList operation does not expose the java. IncludeFiles property. This property is configured while designing the adapter interaction and cannot be overridden via headers, for example:.

You can select whether incoming files have multiple messages, and specify the number of messages in one batch file to publish. When a file contains multiple messages and this check box is selected, this is referred to as debatching. Nondebatching is applied when the file contains only a single message and the check box is not selected. Debatching is supported for native and XML files.

The File Polling page of the Adapter Configuration Wizard shown in Figure enables you to specify the following inbound polling parameters:. The minimum file age of files to retrieve. For example, this polling parameter enables a large file to be completely copied into the directory before it is retrieved for processing.

The age is determined by the last modified time stamp. For example, if you know that it takes three to four minutes for a file to be written, then set the minimum age to five minutes. If a file is detected in the input directory and its modification time is less than five minutes older than the current time, then the file is not retrieved because it is still potentially being written to.

However, if you want more control over polling, then you can use a file-based trigger. Once the Oracle File or FTP Adapter finds the specified trigger file in a local or remote directory, it starts polling for the files in the inbound directory. If you want the second process to start polling the directory only after the first process has written all the files, then you can use a trigger file. You can configure the first process to create a trigger file at the end.

The second process starts polling the inbound directory once it finds the trigger file. The trigger file directory can be the same as the inbound polling directory or different from the inbound polling directory.

However, if your trigger file directory and the inbound polling directory are the same, then you should ensure that the name of the trigger file is not similar to the file filter specified in the Adapter Configuration page shown in Figure The content of a trigger file is never read and therefore should not be used as payload for an inbound receive activity. Table lists the parameters that you must specify in the inbound service JCA file:.

Table Trigger File Parameters. These parameters must be used only if the trigger file directory is different from the inbound polling directory. EndpointActivation: The adapter looks for the trigger file every time the composite is activated. Note: The composite gets activated every time you start the container or redeploy the application, or retire or activate the composite application from Oracle Enterprise Manager. Every time you restart the container, the composite application is not triggered until it sees the trigger file in the specified directory.

OnceOnly: The adapter looks for the trigger file only once in its lifetime. Once it finds the trigger file, it remember that across restarts and redeployments. EveryTime: The adapter looks for the trigger file on each polling cycle. The Oracle File Adapter supports several postprocessing options. After processing the file, files are deleted if specified in the File Polling page shown in Figure Files can also be moved to a completion archive directory if specified in the File Directories page shown in Figure This page enables you to select the XSD schema file for translation.

Figure Specifying the Schema - Messages Page. If native format translation is not required for example, a JPG or GIF image is being processed , then select the Native format translation is not required check box.

The file is passed through in base encoding. XSD files are required for translation. This starts the Native Format Builder wizard. For more information, see Section 6. The file is named after the service name you specified on the Service Name page of the Adapter Configuration Wizard. You can rerun the wizard later to change your operation definitions. The ActivationSpec parameter holds the inbound configuration information. The ActivationSpec property values are specified in the Adapter Configuration Wizard during design time and, as shown in Table The inbound Oracle File Adapter uses the following configuration properties:.

Apart from the payload, Oracle File Adapter publishes the following header metadata, from the inbound service, as shown in Figure :. BatchIndex : the batch index for each message within the batch for debatching. In the outbound direction, the Oracle File Adapter receives messages from the service engine and writes the messages to a file in a file system. This section provides an overview of the outbound file writing capabilities of the Oracle File Adapter. Figure Selecting the Write File Operation.

When you select this checkbox, the adapter WSDL will have an output message pointing to a header schema, shown by the bold highlight below. For the outbound operation, you can specify the outbound directory, outbound file naming convention to use, and, if necessary, the batch file conventions to use. The File Configuration page of the Adapter Configuration Wizard shown in Figure enables you to specify the directory for outgoing files and the outbound file naming convention.

You can specify outbound directory names as physical or logical paths. If you specify logical parameters, then the generated JCA file looks as follows for the logical outbound directory name OutputFileDir. Select the outbound adapter in the "External References" swim lane in JDeveloper wizard it is present in the composite.

Create a "Binding Property" in the Property Inspector for the outbound adapter you must scroll down to find it. The composite. You can specify outbound directory names as physical or logical paths in Mediator. You can specify the logical names at design time in the File Directories page shown in Figure and then provide logical-physical mapping by using the Endpoint properties.

For example, WriteFile is an outbound adapter service. You have specified OutDir as the logical directory name at design time. For outbound operation, you can specify a dynamic outbound directory name. You can set variables to specify dynamic outbound directory names. You must perform the following steps to specify the dynamic outbound directory name:. Create a variable MyDir of type xsd:string , as shown in Figure Figure Create Variable Dialog. Drag and drop an Assign activity from the Component Palette in between the Receive and Invoke activities in the design area.

Click Create and then Copy Operation. The Create Copy Operation dialog is displayed. In the Create Copy Operation dialog, select Expression from Type and specify the directory name and path, as shown in Figure The output file is written to this directory. Figure Create Copy Operation Dialog. Select the jca. Directory property from the Properties column and set the Value as MyDir the directory that you created in Step 4.

Ensure that the Type column is set to input , as shown in Figure Specify the naming convention to use for outgoing files. You cannot enter completely static names such as po. This is to ensure the uniqueness in names of outgoing files, which prevents files from being inadvertently overwritten. Instead, outgoing file names must be a combination of static and dynamic portions. Additionally, you can combine file naming conventions.

You cannot use a regular expression for outbound synchronous reads. In these cases, the exact file name must be known. A time stamp is specified by date and time pattern strings. Within date and time pattern strings, unquoted letters from 'A' to 'Z' and from 'a' to 'z' are interpreted as pattern letters representing the components of a date or time string.

Text can be quoted using single quotation marks ' to avoid interpretation. The characters "''" represent single quotation marks. All other characters are not interpreted.

Table Java Pattern Letters. For formatting, if the number of pattern letters is four or more, then the full form is used; otherwise, a short or abbreviated form is used if available. For parsing, both forms are accepted, independent of the number of pattern letters. For formatting, the number of pattern letters is the minimum number of digits, and shorter numbers are zero-padded to this number.

For parsing, the number of pattern letters is ignored unless it is needed to separate two adjacent fields. For formatting, if the number of pattern letters is two, then the year is truncated to two digits; otherwise, it is interpreted as a number. For parsing, if the number of pattern letters is more than two, then the year is interpreted literally, regardless of the number of digits.

For parsing with the abbreviated year pattern y or yy , the abbreviated year is interpreted relative to some century. The date is adjusted to be within 80 years before and 20 years after the time instance is created.

During parsing, only strings consisting of exactly two digits are parsed into the default century. Any other numeric string, such as a one-digit string, a three-or-more-digit string, or a two-digit string that is not all digits for example, -1 , is interpreted literally.

If the number of pattern letters is 3 or more, then the month is interpreted as text; otherwise, it is interpreted as a number.

Time zones are interpreted as text if they have names. For time zones representing a GMT offset value, the following syntax is used:.

Hours must be between 0 and 23 , and Minutes must be between 00 and The format is locale-independent and digits must be taken from the Basic Latin block of the Unicode standard. TwoDigitHours must be between 00 and Other definitions are the same as for general time zones. For outbound operation, you can specify a dynamic outbound file name. You can set variables to specify dynamic outbound file names. Create a variable file of type xsd:string , as shown in Figure The output file is written to this file.

FileName property from the Properties column and set the Value as file the file that you created in Step 4. In the simplest scenario, you specify writing a single file to a single message. You can also specify the outbound method for batch file writing. This method enables you to specify the number of messages to publish in one batch file.

The following batch file settings are provided in the File Configuration page shown in Figure :. For example, if you specify that elapsed time exceeds 15 seconds, then the first message that is received is not written out, even after 15 seconds, as batching conditions are not valid. If a second message is received, then batching conditions become valid for the first one, and an output file is created when the elapsed time exceeds 15 seconds.

Specify a file size which, when equaled, causes an outgoing file to be created. For example, assume that you specify a value of 3 for the number of messages received and a value of 1 MB for the file size. When you receive two messages that when combined equal or exceed 1 MB, or three messages that are less than 1 MB, an output file is created. If the Oracle File Adapter encounters some problem during batching, then it starts batching at the point at which it left off on recovery.

Figure Specifying the Schema. As with specifying the schema for the inbound direction, you can perform the following tasks in this page:. For more information about Messages page, see Section 4.

The files are named after the service name you specified on the Service Name page of the Adapter Configuration Wizard shown in Figure A sample outbound JCA file includes the information listed in Table :. Apart from the payload, the Oracle File Adapter receives the following headers from the component:. In the outbound direction, the Oracle File Adapter polls and reads the current contents of files.

This section provides an overview of the outbound synchronous file reading capabilities of the Oracle File Adapter. For reading a file synchronously, you select Synchronous Read File operation, as shown in Figure Figure Synchronous Read Operation Page.

You can specify the name of the file to be read in the File Name field, as shown in Figure Figure File Directories Page. This list of files is returned as an XML document and contains information such as file name, directory name, file size, and last modified time.

This section provides an overview of the file listing capabilities of the Oracle File Adapter. For listing files, you must select the List Files operation, as shown in Figure Figure List Files Operation Page. The File Directories page of the Adapter Configuration Wizard shown in Figure enables you to specify information about the directory to use for reading files names for the list operation.

You can choose to list files recursively within directories. In the composite, logical properties are specified in the JCA file, and their logical-physical mapping is resolved by using binding properties. You specify the logical directory once at design time, and you can later modify the directory name as needed. The Oracle File Adapter acts as a file listener and polls the specified directory on a local or remote file system and looks for files that match specified naming criteria.

Retrieve all files that start with po and end with. This convention conforms to operating system standards. If you want the inbound Oracle File Adapter to pick up all file names that start with po and which have the extension txt , you must specify the Include Files field as po.

In the inbound direction, the Oracle FTP Adapter works the same way as the Read File operations of the Oracle File Adapter in that it polls and gets files from a file system for processing. This name connects to the FTP server during run time.

After logging in, you select the Get File read operation and the type of file to deliver. Figure shows this selection. Figure Selecting the Get File Operation. The serverType property in the deployment descriptor is used to determine line separators when you transfer data. You can specify unix , win , or mac as property values.

These values represent the operating system on which the FTP server is running. By default, the serverType property contains unix. You must note that this property is used by the NXSD translator component to write the line separator during an outbound operation.

From this point onwards, pages of the Adapter Configuration Wizard for the Get File operation are the same as those for the Read File operation of the file. Table lists the pages that are displayed and provides references to sections that describe their functionality.

An additional Adapter Configuration Wizard page is also available for advanced users. This page is shown in Figure and appears only after you make either or both of the following selections on the File Polling page shown in Figure :.

Set the value of the Minimum File Age field to a value greater than 0. Figure File Modification Time. This page enables you to specify a method for obtaining the modification time of files on the remote FTP server:. However, this option is rarely used and is not supported by all FTP servers.

See your FTP server documentation to determine whether your server supports the file system listing command, which command-line syntax to use, and how to interpret the output. For example, if the file system listing command quote mdtm filename is supported and returns the following information:. To handle the time zone issue, you must also be aware of the time stamp difference. You must then convert the time difference between the FTP server and the system on which the Oracle FTP Adapter is running to milliseconds and add the value as a binding property in the composite.

For example, if the directory listing command ls -l returns the following information:. This option enables you to obtain the modification time from the file name. After the completion of the Adapter Configuration Wizard, configuration files are created in the Applications section of JDeveloper.

See Section 2. After logging in, you select the Put File write operation and the type of file to deliver. Figure Selecting the Put File Operation. Table lists the pages that display and provide references to sections that describe their functionality. In the outbound direction, the Oracle FTP Adapter works the same way as the Synchronous Read File operations of the Oracle File Adapter in that it polls and gets files from a file system and reads the current contents of the file.

For reading a file synchronously, you select Synchronous Get File operation, as shown in Figure The contents of the files are not read. This feature of the Oracle FTP Adapter lets you use an invoke activity to retrieve a list of files from a target directory. In the File Directories page of the Adapter Configuration Wizard, you must specify information about the directory to use for reading file names for the list operation.

The File Filtering page of the Adapter Configuration Wizard enables you to specify details of the files to retrieve or ignore. The Oracle FTP Adapter acts as a listener and polls the specified directory on a local or remote file system and looks for files that match specified naming criteria. You must configure these credentials by modifying the weblogic-ra.

Expand javax. ConnectionFactory and then select the instance that you are modifying. The requirements and procedure to configure the Oracle File and FTP Adapters for high availability for an active-active topology are discussed in the following sections:.

Before you configure the Oracle File or FTP Adapter for high availability, you must ensure that the following prerequisites are met:. Connection-factories must specify the same shared directory as the control directory, and their names must match. Fault-policies and fault-bindings must be created for remote faults to ensure that the adapter acts correctly. For more information on fault-policies and fault-bindings, see Section 2.

The Oracle File and FTP Adapters must ensure that only one node processes a particular file in a distributed topology. You can use the database table as a coordinator to ensure that Oracle File and FTP Adapters are highly available for inbound operations. You must use the following procedure to make an inbound Oracle File or FTP Adapter service highly available by using database table as a coordinator:.

You are not required to perform this step because the database schemas are pre-created as a part of soainfra. If you choose the Default Threading Model, you can set the thread count of global processor through the oracle. This pc. However, the Partition Threading Model is recommended over the Default Threading Model see below if you do have a need to define processor threads.

And as the name applies, you don't worry about any thread counts. Please note the value of the ThreadCount is closely related to the kind of threading model you choose:. Click to view our Accessibility Policy Skip to content. A-Team Chronicles. Exit Search Field. This is useful, thanks. TEST Service tab is disabled for this example.

How i can test this example in SOA 11g. Hello, I have the same problem as Usman. I deployed but the test button was disabled. How can I test it? Previous post.



0コメント

  • 1000 / 1000