Tuesday, November 11, 2014

Using UMS In SOA


     I'll try to explain how to use UMS which is an email adapter in SOA Suite environment today. We'll use Apache James Server as the email server and you can get the information about the installation and the configuration of Apache James Server in this previous write.Let's first start with the configuration of enterprise manager and console.

Configuring Enterprise Manager and Console:

     You first start your weblogic server and then to go http://localhost:7101/console.Click on the "Deploymenys" link in the left "Domain Structure" menu and choose the UMSAdapter in the right side.You may have to click the next button many times.Then go to the "Targets" tab and check the DefaultServer to target our Ums adapter to our server.See in Figure 1 and 2. 

Using UMS In SOA
Figure 1

Using UMS In SOA
Figure 2

Now we can go to http://localhost:7101/em and right click to the User Messaging Service -> usermessagingdriver-email and choose "Driver Properties".You will see the screen in Figure 3 and 4.At this point you have to configure the Apache James server and create two email users admin and test.To do that you can refer to the following write. After configuring James server and creating email users, you will enter the required values to the screen below like sender address as admin@localhost, mail server as localhost, mail server port as 1125, incoming mail server port as 1110.See in Figure 3 and 4.

Using UMS In SOA
Figure 3

Using UMS In SOA
Figure 4

Creating the Bpel Process with Ums Adapter:

     Create a bpel process and in the right external references part right click and create an UMS Adapter.In the first page of the create wizard choose the JNDI Name eis/ums/UMSAdapterOutbound as in Figure 5.

Using UMS In SOA
Figure 5

In the next page choose Outbound Send Nofitication as the operation type.

Using UMS In SOA
Figure 6

Now you will choose Email as the type of notification and enter the Subject , From and To configuraton variables. At this point we'll do a trick and enter the admin and test email addresses ending with .com, although they are not ending with .com. That's necessary since the wizard doesn't allow you to continue if the email addresses doesn't contain .com or any other email extensions.However we have to delete this .com parts at the end of the wizard in the jca source file, otherwise Apache James server will not accept those email addresses.

Using UMS In SOA
Figure 7

Choose the message as String type as in Figure 8.

Using UMS In SOA
Figure 8

Delete the .com parts in the jca source file.

Using UMS In SOA
Figure 9

Now drag and drop an assign activity after the ReceiveInput and build the email text using concat as in the following figure.

Using UMS In SOA
Figure 10

Drag and drop an invoke activity referencing it to the Ums adapter and creating the input values like in Figure 11.

Using UMS In SOA
Figure 11

The final bpel process should now look like as in Figure 12.

Using UMS In SOA
Figure 12

Test the application using the Jdeveloper Debug tool and enter the input value in the Http analyzer screen.See in Figure 13.

Using UMS In SOA
Figure 13

Inspect the Sent Email:

     Open a command window and type the following commands in Figure 14 and 15.You will see your email content like in Figure 16.

Using UMS In SOA
Figure 14

Using UMS In SOA
Figure 15

Using UMS In SOA
Figure 16


     Today I try to explain the usage of UMS adapter in SOA Suite environment using Apache James Server.As you can see, with the help of the UMS adapter it is quite straightforward to use email functionality in SOA applications.

You can download the source code from here.

1 comment:

  1. Borgata Hotel Casino & Spa - MapyRO
    Borgata 밀양 출장안마 Hotel 아산 출장마사지 Casino & Spa · 5. Borgata Hotel Casino & Spa. 1 논산 출장안마 Borgata Way 제주 출장안마 Atlantic City, 영천 출장안마 NJ 08401.