Oracle SOA, AIA BPEL ESB and OSB knowledge base

Friday, January 23, 2009

Oracle Service Bus : Send Email

The first step is to create an SMTP Server configuration (it is the SMTP server that actually sends the email). To do this, you need to do the following:

- Click on the System Administration link in the left hand navigation in the service bus console

- Click on Create in the Change Center to create a new session in which you can make changes

- Click on Add and enter the details for your SMTP Server, e.g.

smtpserver

- Click Save.

Now we have an SMTP Server configuration we can use multiple times within Oracle Service Bus without entering this information again.

The next step is to create an email business service that uses this SMTP Server configuration:

- Click on the Project Explorer link in the left hand navigation

- Select (or create) the project and folder you want to create the email business service in

- From the Create Resource drop down select Business Service

- Enter a name and description for your business service and ensure you select the Service Type as Messaging Service:

emailBusinessService

- Click Next

- Select Text as the Request Message Type, leave the Response Message Type as none (sending email is a one-way service) and then click Next.

- On the next screen, select the Protocol as email and set the Endpoint URI to be mailto: and click Add:

emailBusinessService2

- Click Next

- Select your SMTP Server from the drop down list of SMTP Servers available and configure the rest of the settings on this screen appropriately, e.g.

emailBusinessService3

- Click Next, review the summary and then click Save.

- Click Activate to enforce these changes to Oracle Service Bus.

- Enter a description and click Submit.

You have now successfully created an email business service which you can use to send email from Oracle Service Bus. If you click on the bug icon in the Actions column alongside it, you can use the Test Console to prove this service does indeed send an email to the address you specified, with the settings you configured and the payload you specified in the Test Console.

In the second post of this set I will explain how a proxy service can make use of this email business service and some tips for customising the email sent.

3 comments:

Unknown said...

Do you have a sample of how to call this Biz service from a Proxy Service in OSB?

Abhishek Gupta said...

I would recommend to read any of the contents in my blog to see how to call business service from proxy service.

If you open OSB console and create new project you create business service by providing existing wsdl url or you create new business service based on adapters.

Then you create proxy service and call this business service by giving wsdl url of business service.

Zoe said...

Thanks for your description. How can I change the email address in corresponding proxy service? thanks!

FEEDJIT Live Traffic Map

My Blog List