JavaScript is required to for searching.
Skip Navigation Links
Exit Print View
Oracle Java CAPS Email Binding Component User's Guide     Java CAPS Documentation
search filter icon
search icon

Document Information

Using the eMail Binding Component

About the eMail Binding Component

eMail Binding Component Features

eMail Binding Component Protocols

eMail Binding Component Property Configuration

eMail BC Sample Projects

Working With the eMail Binding Component WSDL Document

Creating the eMail BC WSDL Document

To Create a WSDL Document to Read email (IMAP or POP3)

To Create a WSDL Document to Send email (SMTP)

New WSDL Wizard Properties for the eMail BC

Configuring eMail BC WSDL Attributes

To Configure eMail BC WSDL Attributes

To Send email Messages with Attachments

eMail Binding and Service Level WSDL Attributes

Receiving eMail BC Attributes

Sending eMail BC Attributes

Configuring the eMail Binding Component Runtime Properties

To Configure eMail Binding Component Runtime Properties

eMail Binding Component Runtime Property Descriptions

Creating Application Configurations for Connectivity Parameters

To Create Application Configurations

To Add the Application Configuration to the Endpoint

To Change Application Configuration Values

Using Application Variables

To Create an Application Variable

To Change an Application Variable Value When the Application is Running

To Use an Application Variable for Password Protection

Using eMail BC Normalized Message Properties in a Business Process

Using Predefined Normalized Message Properties

To Define Normalized Message Properties in Mapper View

To Define Normalized Message Properties in Source View

Normalized Message Properties for the eMail Binding Component

General Normalized Message Properties

eMail Binding Component Normalized Message Properties

Working With the eMail Binding Component WSDL Document

The WSDL document defines an eMail interface for the project. You create and configure the WSDL document using the New WSDL Wizard, and you can further configure the interface using the WSDL Editor in NetBeans.

The following topics provides instructions for working with the WSDL document for the eMail BC:

Creating the eMail BC WSDL Document

The following topics provide instructions for creating email WSDL documents for reading and sending email messages under different protocols.

For information about the fields you need to fill in on the New WSDL Wizard, see New WSDL Wizard Properties for the eMail BC.

To Create a WSDL Document to Read email (IMAP or POP3)

  1. In the NetBeans Projects window, right-click the project or a folder within the project where you want to add the WSDL document.
  2. Point to New and then select WSDL Document.

    The New WSDL Document Wizard appears.

  3. Enter a name for the WSDL document, and verify or update the folder location for the file.
  4. Select Concrete WSDL Document.

    The Binding and Type fields appear.

  5. For the Binding, select EMAIL; for the Type, do one of the following:
    • If your email server uses IMAP, select Read Email (using IMAP).
    • If your email server uses POP3, select Read Email (using POP3).

    image:Figure shows the Name and Location window of the WSDL wizard.
  6. Click Next.

    The IMAP Settings or POP3 Settings window appears.

  7. Fill in the settings according to your email client's IMAP or POP3 server.

    For information about these fields, see New WSDL Wizard Properties for the eMail BC.


    image:Figure shows the IMAP Setting window of the WSDL wizard.
  8. After you enter the email server connection information, click Test Credentials to be sure you can connect to the server.
  9. On the New WSDL Document Wizard, click Finish.

To Create a WSDL Document to Send email (SMTP)

  1. In the NetBeans Projects window, right-click the project or a folder within the project where you want to add the WSDL document.
  2. Point to New and then select WSDL Document.

    The New WSDL Document Wizard appears.

  3. Enter a name for the WSDL document, and verify or update the folder location for the file.
  4. Select Concrete WSDL Document.

    The Binding and Type fields appear.

  5. For the Binding, select EMAIL; for the Type, select Send Email (using SMTP).
    image:Figure shows the Name and Location window of the WSDL wizard.
  6. Click Next.

    The SMTP Settings window appears.

  7. For the Mail To field, click “mailto:” fields, and, in the dialog that appears, enter the email addresses and email subject for the email messages sent by the eMail Binding Component.
    image:Figure shows the mailto attribute dialog box.
  8. Fill in the remaining settings according to your email client's SMTP server.

    For information about the SMTP Settings fields, see New WSDL Wizard Properties for the eMail BC.


    image:Figure shows the SMTP Settings window of the WSDL wizard.

    Note - When you select different message types, the available Payload Processing fields change to accommodate the type.


  9. If you select a message type of XML or encoded data, you need to specify the element or type to use. Click the ellipsis button to display a list of options to select from.
    image:Figure shows the Select Element or Type dialog box for XML or encoded data.
  10. If you select a message type of encoded data, you need to specify the encoding style used; for example, hl7encoder-1.0 for HL7 encoding, customencoder-1.0 for a custom encoding, or cocoencoder-1.0 for COBOL Copybook encoding.
  11. After you enter the email server connection information, click Test Credentials to be sure you can connect to the server.
  12. On the New WSDL Document Wizard, click Finish.

New WSDL Wizard Properties for the eMail BC

The following tables list and describe the read and send properties for the eMail BC. These properties are accessed from the protocol settings page of the New WSDL Wizard.

Table 1 Read email Settings (POP3 and IMAP)

Property
Description
Email Server
The name of the computer that hosts the email server from which you want to read email messages.
Port
The port number of the email server.
User Name
The user name to use to connect to the email server.
Password
The password that corresponds to the user name entered above.
Authentication
An indicator of whether to use SSL authentication. Select the check box to use SSL; otherwise leave it deselected.
Polling Interval
The time period (in milliseconds) the eMail BC will wait between polling for new incoming email messages.
Mail Folder
The name of the email folder from which to read messages.
Maximum Message Count
The maximum number of messages to return from the email server.
Message Ack Mode
An indicator of how the message acknowledgement is handled based on the response from the Normalized Message Router (NMR). Choose either automatic or manual. When the method is automatic, you need to select an operation to perform.
Message Ack Operation
The type of operation to perform on the incoming email messages upon message acknowledgement. Select either markAsRead or delete.
Attachments Directory
A local directory where you want to store any attachments from the incoming email messages being processed. The file name is derived from the attachment name.

Table 2 Send email Settings (SMTP)

Property
Description
Mail To
The recipients of email messages sent from the eMail Binding Component. This field uses the standard mailto URL scheme (RFC 2368). Special characters must be encoded (see RFC 2368 and RFC 1378). The corresponding message parts (if any) take precedence over location headers.
SMTP Server
The name of the email server for sending email messages.
Port
The port number of the email server for sending email messages.

This property is optional.

User Name
The user name to use to connect to the email server.
Password
The password that corresponds to the user name entered above.
Use SSL
An indicator of whether to use SSL authentication. Select the check box to use SSL; otherwise leave it deselected.
Message Type
The type of message being processed. Select one of the following options:
  • text

  • binary

  • xml

  • encoded data

Character Encoding
The encoding to use for body and header text. Select the encoding type from the list of available options. This setting only appears when the Message Type is text.
Send Option
The format of the email content. Select one of the following options:
  • Text Only

  • HTML Only

  • XML Only

  • Both Text and HTML

  • Both Text and XML

Image Handling
An indicator of whether images are resolved and embedded in an HTML document (with the tag <img src="absolute_URL_to_image">. The URL must be the absolute URL in order to be embedded.

This setting only appears when the Send Option is HTML or Both Text and HTML.

XSD Element/Type
The element or type from the schema definition (XSD) for XML or encoded data. Click the ellipsis button to select from a list of elements and types. Note that for encoded data, you must select an element and not a type.

This setting only appears when the Message Type is xml or encoded data.

Encoding Style
The encoding style to use. This field only appears when the Message Type is encoded data.

Normalized Message Attachments

An indicator of whether normalized message attachments are included with the email as message attachments. Select the check box to include them as message attachments; otherwise leave the check box deselected.

Configuring eMail BC WSDL Attributes

Once you create the eMail BC WSDL document, you can add and update the WSDL attributes that are specific to the email configuration. The eMail BC includes both service-level WSDL elements and binding-level WSDL elements.

Perform the following tasks to configure the eMail Binding Component WSDL file after it is generated by the wizard.

To Configure eMail BC WSDL Attributes

  1. In the NetBeans IDE, double-click the WSDL document you want to configure.

    The document appears in the WSDL Editor in WSDL view.

  2. To configure binding-level attributes, do the following:
    1. Expand the Bindings node, the binding name, the operation, and then the input.
    2. Click the email:* node.

      The name of this node begins with “email:” and the rest varies depending on the type of protocol and whether it is receiving or sending. A list of properties appears in the right panel.


      image:Figure shows the Properties Panel for a binding operation for reading email messages.
    3. Modify the value of any of the properties.

      For more information about these properties, see Receiving eMail BC Attributes.

    4. In the NetBeans toolbar, click Save.
  3. To configure service attributes, do the following:
    1. Expand the Services node, the service name, and then the service port.
    2. Click on the email address node.

      The name of this node varies depending on the type of protocol. A list of properties appears in the right panel.


      image:Figure shows the Properties window for a service for reading email messages.
    3. Modify the value of any of the properties.

      For more information about these properties, see Sending eMail BC Attributes.

    4. In the NetBeans toolbar, click Save.

To Send email Messages with Attachments

  1. In the NetBeans IDE, double-click the WSDL document you want to configure.

    The document appears in the WSDL Editor in WSDL view.

  2. Expand the Bindings node, the binding name, the operation, and then the input.
  3. Right-click the email:* node, and select Add SMTPattachment.

    The name of the email: node varies depending on the type of protocol and whether it is receiving or sending.

  4. In the Properties Panel on the right, enter values for the attachment properties.

    For more information about these properties, see Table 7.


    image:Figure shows the Properties Panel for an outgoing SMTP email attachment.

eMail Binding and Service Level WSDL Attributes

The service-level WSDL elements and attributes define connectivity to the email server along with certain processing information. The binding-level WSDL elements and attributes define and configure the operation performed along with information about the email messages and content.

Receiving eMail BC Attributes

The eMail Binding Component binding-level WSDL elements include the binding and services extensibility elements. When you create a WSDL file in the NetBeans IDE, the New WSDL Wizard generates both the binding element and the service elements based on information you supplied in the wizard.

For receiving email messages, the binding element defines where to find specific information in the incoming message and how to handle attachments. The binding element also specifies that the WSDL document is configured for an email server and also indicates the protocol. The service element defines connectivity information, such as the server name, port number, and user authentication. It also defines how often to check for messages, how many messages to poll, and how to handle acknowledgements.

Table 3 Binding–Level Attributes for Receiving email Messages

Attribute
Description
message
The name of the message part that contains the body of the email.
subject
The name of the message part that contains the subject line of the email.
from
The name of the message part that contains the email address of the sender.
to
The name of the message part that contains the list of email addresses of the recipients.
cc
The name of the message part that contains the list of recipients who are copied on the email.
bcc
The name of the message part that contains the list of recipients who are blind copied on the email.
newsgroups
The name of the message part that contains the names of recipient news groups.
saveAttachmentsToDir
A local directory where you want to store any attachments from the incoming email messages being processed. Attachments are only saved if this property is defined. The file name is derived from the attachment name.

The following example illustrates the binding element for receiving email messages from an IMAP server:

<binding name="wsdlEmailBinding" type="tns:wsdlEmailPortType">
   <email:IMAPbinding/>
   <operation name="ReceiveEmails">
      <email:IMAPoperation/>
      <input name="input1">
         <email:IMAPinput 
            message="message"
            subject="subject"
            from="sender"
            to="recipients"
            saveAttachmentsToDir="C:\EmailProject\email\attachments"/>
      </input>
   </operation>
</binding>

Table 4 Service–Level Attributes for Receiving email Messages

Attribute
Description
emailServer
The name of the computer that hosts the email server from which you want to read email messages.
port
The port number of the server.
userName
The user name to use to connect to the email server.
password
The password that corresponds to the user name entered above.
useSSL
An indicator of whether to use SSL authentication. Specify true to use SSL; otherwise specify false.
mailFolder
The name of the email folder from which to read messages.
maxMessageCount
The maximum number of messages to return from the email server.
messageAckMode
An indicator of how the message acknowledgement is handled based on the response from the Normalized Message Router (NMR). Choose either automatic or manual. When the method is automatic, you need to select an operation to perform.
messageAckOperation
The type of operation to perform on the incoming email messages upon message acknowledgement. Select either markAsRead or delete.
pollingInterval
The time period (in milliseconds) the eMail BC will wait between polling for new incoming email messages.

The following example illustrates the service element for receiving email messages from an IMAP server:

<service name="wsdlEmailService">
   <port name="wsdlEmailPort" binding="tns:wsdlEmailBinding">
      <email:IMAPaddress
         emailServer="email.mycompany.com"
         useSSL="true"
         port="994"
         userName="gsmythe@mycompany.com"
         password="1qazMKO"
         mailFolder="Inbox"
         maxMessageCount="50"
         messageAckMode="automatic"
         messageAckOperation="markAsUnread"
         pollingInterval="1000"/>
    </port>
</service>
Sending eMail BC Attributes

The sending eMail Binding Component binding-level WSDL elements include the binding and services extensibility elements. The eMail binding extensibility element specifies that the WSDL document is configured for an email server and also indicates the protocol. When you create a WSDL file in the NetBeans IDE, the New WSDL Wizard generates both the binding element and the service elements based on information you supplied in the wizard.

For sending email messages, the binding element defines where to find specific information in the incoming message, encoding options, character sets, and how to handle attachments and images. The service element defines connectivity information, such as the server name, port number, and user authentication.

Table 5 Binding–Level Attributes for Sending email Messages

Attribute
Description
message
The name of the message part that contains the body of the email.
subject
The name of the message part that contains the subject line of the email.
from
The name of the message part that contains the email address of the sender.
to
The name of the message part that contains the list of email addresses of the recipients.
cc
The name of the message part that contains the list of recipients who are copied on the email.
bcc
The name of the message part that contains the list of recipients who are blind copied on the email.
newsgroups
The name of the message part that contains the names of recipient news groups.
charset
The encoding to use for body and header text. This setting is only applicable when the message type is next.
use
Either literal or encoded.
encodingStyle
The encoding style to use. Only use this property when the use property is set to encoded.
sendOption
The format of the email content. Select one of the following options:
  • Text Only

  • HTML Only

  • XML Only

  • Both Text and HTML

  • Both Text and XML

embedImagedInHTML
An indicator of whether images are resolved and embedded in an HTML document (with the tag <img src="absolute_URL_to_image">. The URL must be the absolute URL in order to be embedded.

Only use this property when the sendOption is HTML or Both Text and HTML.

handleNMAttachments

An indicator of whether normalized message attachments are included with the email as message attachments. Select the true to include them as message attachments; otherwise select false.

The following example illustrates the binding element for sending email messages from an SMTP server:

<binding name="wsdlSendEmailBinding" type="tns:wsdlSendEmailPortType">
   <email:SMTPbinding/>
   <operation name="SendEmail">
      <email:SMTPoperation
      <input name="input1">
         <email:SMTPinput 
            message="message"
            subject="subject"
            from="sender"
            to="recipients"
            charset="Big5"
            use="literal"
            sendOption="Text Only"
            handleNMAttachments="true"/>
      </input>
   </operation>
</binding>

Table 6 eMail BC Send WSDL Service Attributes

Attribute
Description
location
The recipients of email messages sent from the eMail Binding Component. This field uses the standard mailto URL scheme (RFC 2368). Special characters must be encoded (see RFC 2368 and RFC 1378). The corresponding message parts (if any) take precedence over location headers.
emailServer
The name of the email server for sending email messages.
port
The port number for the email server.
userName
The user name to use to connect to the email server.
password
The password that corresponds to the user name entered above.
useSSL
An indicator of whether to use SSL authentication. Specify trueto use SSL; otherwise specify false.

The following example illustrates the service element for sending email messages from an SMTP server:

<service name="wsdlSendEmailService">
   <port name="wsdlSendEmailPort" binding="tns:wsdlSendEmailBinding">
      <email:SMTPaddress
         emailServer="email.mycompany.com"
         location="mailto:msharpe@mycompany.com?subject=Response+from+JBI&
                   cc=tmiller@mycompany.com"
         useSSL="true"
         port="465"
         userName="gsmythe@mycompany.com"
         password="1qazMKO"
   </port>
</service>

Table 7 eMail BC SMTP Attachment WSDL Attributes

Attribute
Description
attachmentContentPart
The name of the message part that contains the attachment content. Select from the following options:
  • from

  • to

  • subject

  • message

If both the attachmentContentPart and readFromFile attributes are defined, the attachmentContentPart takes precedence.

attachmentFileNamePart
The part of the message to use to name the attachment file. If no value is specified, then the value of the attachmentContentPart property is used for the file name.
readFromFile
The name of the file that contains the attachment content. If a value is specified for the attachmentContentPart, it overrides the value specified here.
contentType
The type of content in the attachment. It might be useful for the receiver to know what type of content is contained in the attachment in order to read it. Example of content types are text/html, message/rfc822, text/plain;charset=UTF-8, and so on.

If the content type is invalid, unknown, or empty, the content is treated as application/octet-stream.

disposition
The disposition of the attachment in the content. Select either ATTACHMENT or INLINE.

The following example illustrates the binding element with the SMTP attachment configuration:

<binding name="wsdlSendEmailBinding" type="tns:wsdlSendEmailPortType">
   <email:SMTPbinding/>
   <operation name="SendEmail">
      <email:SMTPoperation
      <input name="input1">
         <email:SMTPinput 
            message="message"
            subject="subject"
            from="sender"
            to="recipients"
            charset="Big5"
            use="literal"
            sendOption="Text Only"
            handleNMAttachments="true">
             <email:SMTPattachment attachmentContentPart="message"
 attachmentFileNamePart="subject"
 disposition="ATTACHMENT"/>
         </email:SMTPinput>
      </input>
   </operation>
</binding>