In this section, you will add a WSDL Document. In this example, you will add ftpTransfer.wsdl to the BPEL Module. Use the Partner view of the WSDL editor to configure the components of the WSDL Document. A WSDL is created to define a web service and is bound to the FTP transportation.
Expand the BPEL Module project node in the Projects tab.
For example, SendInventory
Right-click the project node or Process Files node. Select New —> WSDL Document...
This opens the New WSDL Document wizard.
Type the File Name in the File Name field.
For example, ftpTransfer.wsdl
Select Concrete WSDL Document.
When creating or editing a WSDL file, you may be prompted to select a binding type and a binding subtype. A binding contains protocol and data format information for the operations and messages of a port type. If you select the FTP binding type, then you must select one of the following binding subtypes. Both subtypes provide basic FTP functionality, such as a directory from which to read or write files, filename pattern matching, and message correlation.
FTP Message. Select this binding subtype if you plan to rely on default values.
FTP Transport. Select this binding subtype if you want to add customization such as specifying custom directories on the FTP server and specifying pre-transfer and post-transfer operations.
Choose the Binding — FTP from the drop-down list.
Choose any one of the following Types from the drop-down list.
Poll Request Message: Choose this scenario when the FTP BC polls for request message(s) from a dedicated sub-directory (inbox). In this example, the sub-directory is under the remote FTP directory (message repository) and invokes a JBI service with the message(s).
Poll Request Message and Put Response: Choose this scenario when the FTP BC polls for request message(s) from a dedicated sub-directory (inbox). In this example, the sub-directory is under the remote FTP directory (messaging repository) and invokes a JBI service. It puts the response(s) back to a dedicated sub-directory (outbox) under a remote FTP directory (messaging repository).
Put Request Message: Choose this scenario when a JBI service invokes FTP BC to put a request message to a dedicated sub-directory (outbox). In this example, the sub-directory is under the remote FTP directory (messaging repository).
Put Request Message and Poll Response: Choose this scenario when a JBI service invokes FTP BC to put request message(s) to a dedicated sub-directory (inbox). In this example, the sub-directory is under the remote FTP directory (messaging repository). It polls the response(s) back from a dedicated sub-directory (outbox) under a remote FTP directory (messaging repository).
On Demand Get Message: Outbound Get Messaging.
Receive Request: Choose this scenario when the FTP BC polls (receiving) for request message(s) from a remote FTP target (source) and invokes a JBI service with the message(s).
This option is more customized compared to option "Poll Request Message".
Receive Request and Send Response: Choose this scenario when the FTP BC polls (receiving) for a request message(s) from a remote FTP target (source). The FTP target invokes a JBI service and puts (sending) the response(s) back to another remote FTP target (destination).
This option is more customized compared to option "Poll Request Message and Put Response".
Send Request: Choose this scenario when a JBI service invokes FTP BC to put (sending) a message to a remote FTP target (destination).
This option is more customized compared to option "Poll Request Message".
Send Request and Receive Response: Choose this scenario when a JBI service invokes FTP BC to put (sending) request message(s) to a remote FTP target (destination). It polls (received) the response(s) back from another remote FTP target (source).
This option is more customized compared to option "Put Request Message and Poll Response".
On Demand Receive Transfer: Outbound Receiving Transferring.
Select Type — Put Request Message from the drop-down list.
Click Next.
This opens New WSDL Document — FTP Configuration wizard.
Click FTP Connection tab.
Enter the following:
Click Next.
This opens New WSDL Dcoument — Poll Request wizard.
Enter the following fields:
Message Repository: book_updates
Message Name: inventory%d.xml
Message Name Prefix: This is optional.
Enable Overwrite Protect: This option is selected, by default.
Enable Staging When Put Message: This option is selected, by default.
Payload Processing: The radio button xml is selected, by default.
Click Finish.
This action opens the Project tree structure. In the current example, this action displays the WSDL editor for ftpTransfer along with its properties.
Click Save All.
Double-click ftpTransfer.wsdl.
This action opens the WSDL Editor.
Expand Bindings —> OutboundOneWayMessagingBinding —> OutboundOneWayMessagingOperation —> input1 —> ftp:message.
Double-click ftp:message.
This action opens the ftp:message Properties window.
Choose Window —> Properties, if the Properties window is not visible.
Click Message Correlate. Choose the Property — false from the drop-down list.
Click Save All.
The table describes the various attributes.
Table 2 Poll Request
Attribute Name |
Description |
---|---|
Message Repository |
The Message Repository path pointing to a directory on the remote FTP server where messages will be processed and archived. For more information, see Table 3. For example, book_updates |
Message Name |
Message Name is the filename where a message is put into, usually in the form of a name pattern. Pattern is a string containing special characters preceded by a percentage sign. For more information, see Table 4.
|
Message Name Prefix |
Prefix for outbound (OB) message name. |
Enable Overwrite Protect |
Indicate if overwrite protection is required for message send, when true, existing message will be moved to dedicated directory before the current message is put to the target, otherwise, current message overwrites existing message. The checkbox is selected, by default. |
Enable Staging When Put Message |
Indicate if staging is enabled for message transfer. The check box is selected, by default. |
Payload Processing |
|
The table describes the various message repository directories.
Table 3 Message Repository Directories
Directory |
Description |
---|---|
/inbox |
This is the default location where the consumer puts the request message and the provider polls for a request message. |
/instage |
This is the default location where the consumer stages a request message before it is completely uploaded. |
/inprotect |
This is the default location where consumer moves an existing request message so that it is not overwritten by current request message. |
/inarchive |
This is the default location where provider archives request message after it is processed. |
/outbox |
This is the default location where the provider puts a response message and the consumer polls for the response message. |
/outstage |
This is the default location where the provider stages the response message before it is completely uploaded. |
/outprotect |
This is the default location where provider moves an existing response message to so that it is not overwritten by current response message. |
/outarchive |
This is the default location where consumer archives response message after it is processed. |
The table describes the various Java Timestamp Patterns.
Table 4 Java Timestamp Patterns
Letter |
Data or Time Component |
Presentation |
Examples |
---|---|---|---|
G |
Era designator |
Text |
AD |
y |
Year |
Year |
1996; 96 |
M |
Month in year |
Month |
July; Jul; 07 |
w |
Week in year |
Number |
27 |
W |
Week in month |
Number |
2 |
D |
Day in year |
Number |
189 |
d |
Day in month |
Number |
10 |
F |
Day of week in month |
Number |
2 |
E |
Day in week |
Text |
Tuesday; Tue |
a |
Am/pm marker |
Text |
PM |
H |
Hour in day (0-23) |
Number |
0 |
k |
Hour in day (1-24) |
Number |
24 |
K |
Hour in am/pm (0-11) |
Number |
0 |
h |
Hour in am/pm (1-12) |
Number |
12 |
m |
Minute in hour |
Number |
30 |
s |
Second in minute |
Number |
55 |
S |
Millisecond |
Number |
978 |
z |
Time zone |
General time zone |
Pacific Standard Time; PST; GMT-08:00 |
Z |
Time zone |
RFC 822 time zone |
-0800 |
The FTP Message Active/Passive element for the WSDL binding element functions the same as the FTP message element, but contains flags that allow you to set passive FTP messaging for both the consumer and the provider.
The Table lists the properties that enable passive FTP messaging for the FTP Message Active/Passive element.
Table 5 FTP MessageActivePassive Element
Attribute Name |
Description |
---|---|
consumerUsePassive |
Specifies whether to use passive FTP on the consumer side. Default value: true |
providerUsePassive |
Specifies whether to use passive FTP on the provider side. Default value: true |