In this post I will discuss about sending mails from OSB 11g. I will use Java Apache Mail Enterprise Server (JAMES) as a mail server.
First of all download Apache JAMES 2.3.2 Binary (ZIP Format) from here. Follow below links for installing it and doing initial configuration –
http://james.apache.org/server/head/installation_instructions.html
http://wiki.apache.org/james/JamesQuickstart
I configured a mail server anuj.com and created two users oracle@anuj.com and testuser@anuj.com
Now I will configure Oracle Service Bus. First of all create a SMTP Server resource in OSB configuration. For creating a SMTP server resource go to System Administration --> Global Resources --> SMTP Servers and click on “add” (You have to click on “Create” button in the change center to create a new session for your editing, otherwise “add” button will remain disabled)
Provide the details there as shown below-
After creating SMTP server, I will create one Email business service to send messages to JAMES. You may create a business service inside any OSB project.
I am creating a business service named “TestLocalMailServer” which is a “Messaging Service” type business service –
Click on next and it will ask you to provide message type configuration details(request and response message type) –
I select request message type as “Text” and Response message type as “None” (because no response is expected in email transport as it is a one way process)
Click on next and provide the transport configuration details. Select “email” in transport dropdown list and add an endpoint URI oracle@anuj.com –
Click on next and provide the Email transport configuration. In “SMTP Server” dropdown list, select the SMTP server you created earlier. Provide the “from” and “reply to” details as well –
Now click on “Last” (to choose default for rest of the settings) and you will see below configuration –
Save the business service details and activate the configuration using Change center.
You are done with the configuration part now and your business service is ready to be tested.
Open the OSB test console by clicking on the “bug” icon against the business service name. Provide the message/text you want to mail across and set the subject line-
Now click on “Execute” and if processing goes successful then you would see “There was no response.” text under “Response Document” section –
Now to check whether actually mail has been received on JAMES, go to james-2.3.2\apps\james\var\mail\inboxes\oracle directory and should see two files there (for one message) –
Open the file with extension “FileStreamStore” in any text editor and it will show you content below content –
So you are done with sending mails from Oracle Service Bus to Apache JAMES
Wednesday, September 29, 2010
Friday, September 24, 2010
OSB test console not working
In past few days I felt that most of the people working on Oracle Service Bus face a common problem - Test console is not working. In my last post OSB 11g (11.1.1.3) Test console not working I explained one of the few possible reasons why this problem may occur. Now in this post I would like to discuss it in detail.
There may be two kind of OSB domains -
1. Single Server Topology (where there is only one server in the domain - Admin server)
2. Clustered/Multi Server Topology (where OSB is deployed on a cluster which have one or more than one managed servers participating in it)
If test console is not opening up in a single server topology domain, then make sure -
i) Listen address of admin server is set to either of localhost/127.0.0.1/IP of machine/host name of machine
ii) All applications of OSB are properly deployed on admin server and in active mode (you may check it on Deployments section of weblogic admin console)
If test console is not opening up in a clustered topology, then make sure -
i) Listen address of cluster is set properly
ii) At least one server of the cluster is up and running
iii) All applications of OSB are deployed on cluster in active mode
Above checklist is applicable for both 10g and 11g.
There may be two kind of OSB domains -
1. Single Server Topology (where there is only one server in the domain - Admin server)
2. Clustered/Multi Server Topology (where OSB is deployed on a cluster which have one or more than one managed servers participating in it)
If test console is not opening up in a single server topology domain, then make sure -
i) Listen address of admin server is set to either of localhost/127.0.0.1/IP of machine/host name of machine
ii) All applications of OSB are properly deployed on admin server and in active mode (you may check it on Deployments section of weblogic admin console)
If test console is not opening up in a clustered topology, then make sure -
i) Listen address of cluster is set properly
ii) At least one server of the cluster is up and running
iii) All applications of OSB are deployed on cluster in active mode
Above checklist is applicable for both 10g and 11g.
Subscribe to:
Posts (Atom)