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

Using Application Variables

Application variables allow you to define a list of variable names and values along with their type. The application variable name can then be used as a token in a WSDL extensibility element attribute for the eMail Binding Component. For example, you could define a string variable named ServerName with a value of MyHost.com. To reference this in the WSDL document, you would enter ${ServerName}. When you deploy an application that uses application variables, any variable that is referenced in the application's WSDL document is loaded automatically.


Note - If you start an application and a value is not defined for an application variable, an exception is thrown.


You can define the following four variable types:

Variables allow greater flexibility in WSDL documents. For example, you can use the same WSDL document for multiple runtime environments by using application variables to specify system-specific information. The variable values can be changed from the binding component runtime properties for each specific environment.

To Create an Application Variable

  1. On the NetBeans IDE Services window, expand Servers > GlassFish v2.x > JBI > Binding Components.
  2. Right-click sun-email-binding, and then select Properties.

    The Properties window appears.

  3. Click the ellipsis next to Application Variables.

    The Application Variables Editor appears.

  4. Click Add.

    A list of possible variable types appears.

  5. Select String, Number, Boolean, or Password, and then click OK.

    A new row appears in the application list.

  6. In the new row, enter a variable name and then do one of the following:
    • For a Boolean variable, select the check box if the variable value should be true; otherwise leave it deselected.
    • For all other variables types, enter the variable value.

      Note - If you created a password variable, the value you enter appears as asterisks.



      image:Figure shows the Application Variables Editor.
  7. On the Application Variable Editor, click OK; on the Properties window, click Close.
  8. Reference the variable from the appropriate extensibility element in the WSDL document, using a dollar sign and curly brackets to indicate the variable; for example, ${MyVariable}.

    You can see an example of this in the userName and password fields in the following image.


    image:Figure shows application variables entered into WSDL extensibility element properties.

    Here is an example of how the username and password variables in the above images appear in the WSDL source:

    <service name="wsdlEmailService">
       <port name="wsdlEmailPort" binding="tns:wsdlEmailBinding">
          <email:IMAPaddress
             emailServer="email.mycompany.com"
             useSSL="true"
             port="994"
             userName="${username}"
             password="${password}"
             mailFolder="Inbox"
             maxMessageCount="50"
             messageAckMode="automatic"
             messageAckOperation="markAsUnread"
             pollingInterval="1000"/>
        </port>
    </service>

To Change an Application Variable Value When the Application is Running

  1. On the NetBeans IDE Services window, expand Servers > GlassFish v2.x > JBI > Binding Components.
  2. Right-click sun-email-binding, and then select Properties.

    The Properties window appears.

  3. Click the ellipsis next to Application Variables.

    The Application Variables Editor appears.

  4. In the variable list, select the value you want to change and then enter the new value.
  5. On the Application Variable Editor, click OK; on the Properties window, click Close.
  6. On the Services window, expand Servers > GlassFish v2.x > Service Assemblies.
  7. Right-click the Service Assembly using the application variables, and click Stop.
  8. Right-click the Service Assembly again, and click Start.

    The new settings take effect.

To Use an Application Variable for Password Protection

To protect passwords that would otherwise appear as clear text in your WSDL document, you can define a Password application variable to use in the WSDL file as a token. In the following example, a password application variable is created that uses the name SECRET and the password PROTECT.

  1. On the NetBeans IDE Services window, expand Servers > GlassFish v2.x > JBI > Binding Components.
  2. Right-click sun-email-binding, and then select Properties.

    The Properties window appears.

  3. Click the ellipsis next to Application Variables.

    The Application Variables Editor appears.

  4. Click Add, select Password, and then click OK.

    A new row appears in the variable list.

  5. Enter SECRET as the name, and enter PROTECT as the value.

    Because this is a password type, the characters appear as asterisks.

  6. Use the application variable name ${SECRET} as the WSDL password attribute, using the dollar sign and curly braces.