<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
    <title>Chris Tomkins&apos; Blog</title>
    <link rel="alternate" type="text/html" href="http://dev2dev.bea.com/blog/ctomkins/" />
    <link rel="self" type="application/atom+xml" href="http://dev2dev.bea.com/blog/ctomkins/atom.xml" />
   <id>tag:dev2dev.bea.com,2008:/blog/ctomkins//279</id>
    <updated>2008-06-11T11:43:02Z</updated>
    
    <generator uri="http://www.sixapart.com/movabletype/">Movable Type 3.31</generator>
 
<entry>
    <title>ACTION REQUIRED - This blog is moving to http://blogs.oracle.com</title>
    <link rel="alternate" type="text/html" href="http://dev2dev.bea.com/blog/ctomkins/archive/2008/06/action_required_this_blog_is_m.html" />
    <id>http://dev2dev.bea.com/blog/ctomkins/archive/2008/06/action_required_this_blog_is_m.html</id>
    
    <published>2008-06-11T11:42:36Z</published>
    <updated>2008-06-11T11:43:02Z</updated>
    
    <summary>As you will probably have noticed from some of the other Dev2Dev bloggers (particularly Bob Rhubart), following the Oracle takeover of BEA, the blogs on this site (including this one) are going to be removed later on this month. The...</summary>
    <author>
        <name>ctomkins</name>
        
    </author>
    
    <content type="html" xml:lang="en" xml:base="http://dev2dev.bea.com/blog/ctomkins/">
        <![CDATA[<p>As you will probably have noticed from some of the other Dev2Dev bloggers (particularly <a href="http://dev2dev.bea.com/blog/brhubart/archive/2008/05/follow_that_blo.html" target="_blank">Bob Rhubart</a>), following the <a href="http://www.oracle.com" target="_blank">Oracle</a> takeover of BEA, the blogs on this site (including this one) are going to be removed later on this month. The choice seems to be to either move these posts, and any subsequent posts, to my personal blog (<a href="http://www.ctomkins.co.uk">http://www.ctomkins.co.uk</a>) or to create a new blog at <a href="http://blogs.oracle.com">http://blogs.oracle.com</a>. I have decided to do the latter in order to keep my work related blogging and personal blogging separate (although if you are interested in my ramblings on life, the environment and a multitude of other things then by all means subscribe to my <a href="http://www.ctomkins.co.uk/feed" target="_blank">personal blog feed</a> too!). </p>  <p>Once the new blog is up and running, I will migrate the posts from this blog to it and will describe my new role at Oracle, what I am going to be working on, and what you can expect to see me talk about in the future.</p>  <p>Thanks for reading and I look forward to seeing you over at <a href="http://blogs.oracle.com">http://blogs.oracle.com</a> soon!</p>]]>
        
    </content>
</entry>
<entry>
    <title>Load balancing in AquaLogic Service Bus v3.0 (Part 2)</title>
    <link rel="alternate" type="text/html" href="http://dev2dev.bea.com/blog/ctomkins/archive/2008/06/load_balancing_in_aqualogic_se_1.html" />
    <id>http://dev2dev.bea.com/blog/ctomkins/archive/2008/06/load_balancing_in_aqualogic_se_1.html</id>
    
    <published>2008-06-06T13:59:29Z</published>
    <updated>2008-06-06T13:59:55Z</updated>
    
    <summary>In the last post I demonstrated how to configure a business service in AquaLogic Service Bus to support load balancing across multiple service endpoints. What we didn&apos;t consider was what would happen if one of these endpoints was unavailable for...</summary>
    <author>
        <name>ctomkins</name>
        
    </author>
            <category term="Product: AquaLogic Service Bus" />
            <category term="Technology: Service-oriented Architecture" />
    
    <content type="html" xml:lang="en" xml:base="http://dev2dev.bea.com/blog/ctomkins/">
        <![CDATA[<p>In the <a href="http://dev2dev.bea.com/blog/ctomkins/archive/2008/04/load_balancing_in_aqualogic_se.html" target="_blank">last post</a> I demonstrated how to configure a business service in <a title="AquaLogic Service Bus" href="http://dev2dev.bea.com/alservicebus/" target="_blank">AquaLogic Service Bus</a> to support load balancing across multiple service endpoints. What we didn't consider was what would happen if one of these endpoints was unavailable for some reason - perhaps due to a network or hardware failure, or just down for maintenance. If we leave things as they are then if a service request gets directed to a service endpoint which is currently offline, then this service request will fail. This is almost certainly not what we want to happen - we would prefer this service request to be redirected to an online service endpoint (if one is available) rather than the offline one. Luckily, AquaLogic Service Bus v3.0 comes to the rescue with its new endpoint failover feature. This enables us to automatically mark an endpoint as offline, either temporarily or permanently, and hence ensure service requests are only sent to available online endpoints.</p>  <p>To apply this logic to our business service we need to make a couple of changes to our configuration.</p>  <p>The first step is to enable a retry on our business service so that if the endpoint we attempt to invoke is offline we try to invoke an alternative endpoint. To configure this we need to do the following:</p>  <p>- Open up the business service definition for LoadBalancedService</p>  <p>- Switch to the Transport tab</p>  <p>- Set the Retry Count field to 1</p>  <p><a href="http://dev2dev.bea.com/blog/ctomkins/WindowsLiveWriter/LoadbalancinginAquaLogicServiceBu.0Part2_73C2/retryCount_2.jpg"><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="220" alt="retryCount" src="http://dev2dev.bea.com/blog/ctomkins/WindowsLiveWriter/LoadbalancinginAquaLogicServiceBu.0Part2_73C2/retryCount_thumb.jpg" width="244" border="0" /></a> </p>  <p>This is an improvement over our original configuration. Now, if a service request gets directed to an offline endpoint, service bus will recognise this as an error and try to send the service request to an alternate endpoint. However, if this alternate endpoint is also offline then the service request will fail at this stage, even though there could possibly be an online endpoint available. To handle this case as well, we need to enable the offline endpoint URI capability in <a title="AquaLogic Service Bus" href="http://dev2dev.bea.com/alservicebus/" target="_blank">AquaLogic Service Bus</a>.</p>  <p>To do this:</p>  <p>- Right click on the server you have defined in the Servers view of Workspace Studio and choose Launch ALSB Administration Console</p>  <p>- Click on the Resource Browser tab in the left hand navigation</p>  <p>- Select the Business Services link</p>  <p>- Click on your LoadBalancedService business service</p>  <p>- Choose the Operational Settings tab</p>  <p>- Click Create in Change Center to start a new session so you can make a change</p>  <p>- Select the checkbox to enable Offline Endpoint URIs and set a retry interval of 10 seconds</p>  <p><a href="http://dev2dev.bea.com/blog/ctomkins/WindowsLiveWriter/LoadbalancinginAquaLogicServiceBu.0Part2_73C2/enableOfflineEndpointURIs_2.jpg"><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="170" alt="enableOfflineEndpointURIs" src="http://dev2dev.bea.com/blog/ctomkins/WindowsLiveWriter/LoadbalancinginAquaLogicServiceBu.0Part2_73C2/enableOfflineEndpointURIs_thumb.jpg" width="244" border="0" /></a> </p>  <p>- Click Update</p>  <p>- Click Activate in Change Center, enter a description of the change you have made and click Submit to apply your changes</p>  <p>That's all there is to it. </p>  <p>What we have done is configured our business service so that if a service request is sent to an endpoint which happens to be offline, service bus marks this endpoint offline and attempts to send the service request to an alternate endpoint (in accordance with the retry count).&#160; Subsequent service requests will not be sent to the offline endpoint until the offline endpoint URI retry interval has elapsed, at which stage service bus will attempt to start sending service requests to the endpoint. If the endpoint is still offline the cycle will repeat, if it is online the service request will be sent to it.</p>  <p>Note: If you wish to mark an endpoint permanently offline, set the offline endpoint URI retry interval to be 0 hours, 0 mins and 0 seconds. In order to mark this endpoint online again, you will need to do this manually through the service bus console.</p>  <p>Note: If you are using the offline endpoint URI setting, you may well want to consider configuring an alert rule to notify you that an endpoint has gone offline so that you can address this. You can do this by following the instructions <a href="http://edocs.bea.com/alsb/docs30/operations/endpointurimgmt.html#wp1080030" target="_blank">here</a>. </p>  <p>To test this works, we need to perform the following tests:</p>  <p>- Using the Test Console, invoke the service twice - this should exercise both endpoints. To check this, simply go to the Operations section of the administration console, click on Service Health, then click on LoadBalancedService (if you do not see this in the list, you need to go back and enable monitoring on your business service) and finally on Endpoint URIs. You should see something like the following (provided you have waited for the monitoring aggregation interval):</p>  <p><a href="http://dev2dev.bea.com/blog/ctomkins/WindowsLiveWriter/LoadbalancinginAquaLogicServiceBu.0Part2_73C2/endpointURIsTest1_2.jpg"><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="117" alt="endpointURIsTest1" src="http://dev2dev.bea.com/blog/ctomkins/WindowsLiveWriter/LoadbalancinginAquaLogicServiceBu.0Part2_73C2/endpointURIsTest1_thumb.jpg" width="698" border="0" /></a> </p>  <p>- Now make the first endpoint unavailable (how you do this depends on the service you are calling and where it is hosted - for my example, I will just undeploy the application to simulate the endpoint being unavailable). </p>  <p>- Now, using the Test Console, invoke the service again - this request should be routed to the first endpoint as we are using the round-robin load balancing algorithm but since this endpoint is offline, we should see the service request redirected to the other endpoint. To prove this is the case, take a look at the Endpoint URIs monitoring screen again, which should now look something like:</p>  <p><a href="http://dev2dev.bea.com/blog/ctomkins/WindowsLiveWriter/LoadbalancinginAquaLogicServiceBu.0Part2_73C2/endpointURIsTest2_2.jpg"><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="115" alt="endpointURIsTest2" src="http://dev2dev.bea.com/blog/ctomkins/WindowsLiveWriter/LoadbalancinginAquaLogicServiceBu.0Part2_73C2/endpointURIsTest2_thumb.jpg" width="707" border="0" /></a> </p>  <p>- From this we can clearly see that service bus attempted to send the request to the EchoService endpoint and it failed (hence an Error Count of 1) because the endpoint was offline. We can also see that EchoService2 received this request as it is still online.</p>  <p>- Now re-enable the EchoService endpoint and invoke the business service again using the Test Console. If we look at the Endpoint URIs monitoring screen again, we should see that this service request has been directed to the now online again EchoService endpoint.</p>  <p><a href="http://dev2dev.bea.com/blog/ctomkins/WindowsLiveWriter/LoadbalancinginAquaLogicServiceBu.0Part2_73C2/endpointURIsTest3_2.jpg"><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="115" alt="endpointURIsTest3" src="http://dev2dev.bea.com/blog/ctomkins/WindowsLiveWriter/LoadbalancinginAquaLogicServiceBu.0Part2_73C2/endpointURIsTest3_thumb.jpg" width="707" border="0" /></a> </p>  <p>We now have a business service which load balances across a set of endpoints and handles the majority of communication related issues we may have with these endpoints. The great thing about this is that this business service can now be used across the rest of the service bus, in any proxy service, in exactly the same way as any other business service.</p>  <div class="wlWriterSmartContent" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:e7f4c3a3-3911-4c5a-b207-5574fba9409a" style="padding-right: 0px; display: inline; padding-left: 0px; padding-bottom: 0px; margin: 0px; padding-top: 0px">Technorati Tags: <a href="http://technorati.com/tags/aqualogic%20service%20bus" rel="tag">aqualogic service bus</a>,<a href="http://technorati.com/tags/esb" rel="tag">esb</a>,<a href="http://technorati.com/tags/soa" rel="tag">soa</a>,<a href="http://technorati.com/tags/load%20balancing" rel="tag">load balancing</a></div>]]>
        
    </content>
</entry>
<entry>
    <title>Load balancing in AquaLogic Service Bus v3.0 (Part 1)</title>
    <link rel="alternate" type="text/html" href="http://dev2dev.bea.com/blog/ctomkins/archive/2008/04/load_balancing_in_aqualogic_se.html" />
    <id>http://dev2dev.bea.com/blog/ctomkins/archive/2008/04/load_balancing_in_aqualogic_se.html</id>
    
    <published>2008-04-17T16:54:23Z</published>
    <updated>2008-04-17T16:54:46Z</updated>
    
    <summary>Do you have a service which is overloaded with requests? If so, then you might want to consider introducing a new instance of that service and load balancing across them. This post explains how this can be achieved using AquaLogic Service Bus.</summary>
    <author>
        <name>ctomkins</name>
        
    </author>
            <category term="Product: AquaLogic Service Bus" />
            <category term="Technology: Service-oriented Architecture" />
    
    <content type="html" xml:lang="en" xml:base="http://dev2dev.bea.com/blog/ctomkins/">
        <![CDATA[<p>If you have a service you expect to receive heavy usage you may want to consider introducing multiple instances of the service (i.e. multiple service endpoints) and distributing service requests across them in order to share the workload - this is known as load balancing. Out of the box AquaLogic Service Bus supports a number of different load balancing algorithms:</p>  <p><strong>Round robin</strong> - the first request goes to the first service endpoint, the second request to the second service endpoint and so on until all endpoints have been exercised and then the sequence repeats.</p>  <p><strong>Random</strong> - each request gets distributed to any one of your service endpoints - over time you would expect each service endpoint to get a similar share of the load</p>  <p><strong>Random weighted</strong> - each service endpoint is given a weighting and then service requests are distributed randomly amongst the service endpoints - over time you would expect service requests to be distributed to the service endpoints according to the weighting you have defined</p>  <p>Configuring a load balancing policy for multiple instances of a service in AquaLogic Service Bus is simple - all you need to do is create a single business service, choose a load balancing algorithm from the list above and define the service endpoints. </p>  <p>Lets walk through how to do this using the Workspace Studio IDE (If you've never used the Workspace Studio IDE before then check out my <a href="http://dev2dev.bea.com/blog/ctomkins/archive/2008/04/aqualogic_service_bus_v30_gett.html" target="_blank">AquaLogic Service Bus v3.0 - Getting started with Workspace Studio</a> post before you start):</p>  <p>- Create an ALSB Project (File&gt;New&gt;ALSB Project) and give it a name - if you have an existing ALSB Configuration Project choose it from the list, if not leave the default setting and one will be created for you. </p>  <p>- Right click on the ALSB Project you have just created and choose New&gt;Business Service</p>  <p>- Give your business service a name, and choose where you want to place your business service in terms of your project and folder structure - by default it will be in the root of the project you right clicked on:</p>  <p><a href="http://dev2dev.bea.com/blog/ctomkins/WindowsLiveWriter/TeamdevelopmentinWorkspaceStudio_FF17/newBusinessServiceWizard_4.jpg"><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="220" alt="newBusinessServiceWizard" src="http://dev2dev.bea.com/blog/ctomkins/WindowsLiveWriter/TeamdevelopmentinWorkspaceStudio_FF17/newBusinessServiceWizard_thumb_1.jpg" width="244" border="0" /></a> </p>  <p>- Then click Next</p>  <p>- Choose the type of service you are creating - for the purpose of this example, I'll choose a WSDL Web Service and select a simple Echo service I have created which simply returns the input message.</p>  <p><a href="http://dev2dev.bea.com/blog/ctomkins/WindowsLiveWriter/TeamdevelopmentinWorkspaceStudio_FF17/newBusinessServiceWizard2_14.jpg"><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="244" alt="newBusinessServiceWizard2" src="http://dev2dev.bea.com/blog/ctomkins/WindowsLiveWriter/TeamdevelopmentinWorkspaceStudio_FF17/newBusinessServiceWizard2_thumb_6.jpg" width="232" border="0" /></a> </p>  <p>- Click Next</p>  <p>- It is on this page of the wizard you choose your load balancing algorithm and define the multiple endpoints you have. In this case I have chosen round-robin as the load balancing algorithm and defined 2 endpoints:</p>  <p><a href="http://dev2dev.bea.com/blog/ctomkins/WindowsLiveWriter/TeamdevelopmentinWorkspaceStudio_FF17/newBusinessServiceWizard3_6.jpg"><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="242" alt="newBusinessServiceWizard3" src="http://dev2dev.bea.com/blog/ctomkins/WindowsLiveWriter/TeamdevelopmentinWorkspaceStudio_FF17/newBusinessServiceWizard3_thumb_2.jpg" width="244" border="0" /></a> </p>  <p>- For the purpose of this example, we do not need to perform anymore configuration of our business service so we can just click Finish to complete our business service. To perform more configuration of your business service, select Next.</p>  <p>- Now we've defined our business service we need to publish it to the server, which we do by right clicking on the server in the Servers view and selecting Publish. Note you will need to make sure your endpoints are available too - if you have developed these in Workspace Studio as well then simply right click on the server and choose to Add and Remove projects.</p>  <p>So now we've defined our load balanced business service and deployed it to the runtime - the next step is to test it, right?</p>  <p>Not quite - before we launch the Test Client to try this out lets enable monitoring so we can see our load balancing in action and make sure our requests are correctly being distributed between our service endpoints. </p>  <p>To do this, right click on the server in the Servers view and choose Launch ALSB Administration Console. </p>  <p>Once the ALSB Administration Console opens you need to perform the following steps:</p>  <p>- Click on Create in Change Center to start a new session</p>  <p>- Navigate (either via Resource Browser or Project Explorer) to the business service you have just created and click on it.</p>  <p>- Click on the Operational Settings tab and choose to Enable Monitoring.</p>  <p>- Choose an aggregation interval - this is the time over which monitoring statistics will be aggregated (to calculate things such as average response time) and hence the time you will need to wait to see your metrics in the console - for the purpose of this demo lets choose an aggregation interval of 1 minute.</p>  <p>- Click Update</p>  <p>- Click Activate in the Change Center to complete your session and apply your changes to the server</p>  <p>Now lets test the business service by clicking on the bug icon in the Actions column alongside your business service in the console (you can also launch the Test Client from Workspace Studio by right clicking on the business service and choosing Run As&gt;Run on Server) </p>  <p>- Choose the operation you wish to invoke, enter some valid input data and click Execute. If your business service is a request/response service you should see a response returned.</p>  <p>- Click Back.</p>  <p>- Invoke the test a second time - this should mean that both endpoints are exercised since we have chosen the round-robin load balancing algorithm.</p>  <p>Now click on the Operations link in the left hand navigation of the ALSB Administrative Console. Click on the Service Health tab and you should see your business service listed along with some statistics:</p>  <p><a href="http://dev2dev.bea.com/blog/ctomkins/WindowsLiveWriter/TeamdevelopmentinWorkspaceStudio_FF17/echoServiceHealth_2.jpg"><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="108" alt="echoServiceHealth" src="http://dev2dev.bea.com/blog/ctomkins/WindowsLiveWriter/TeamdevelopmentinWorkspaceStudio_FF17/echoServiceHealth_thumb.jpg" width="962" border="0" /></a>&#160; </p>  <p>Note: If you don't see your service listed, check you have enabled monitoring. </p>  <p>Note: If you see your service listed, but don't see any statistics then make sure you have waited for your aggregation interval period.</p>  <p>- Click on the word Online in the Endpoint URI Status column for your business service to drill down to see the metrics for the individual endpoints:</p>  <p><a href="http://dev2dev.bea.com/blog/ctomkins/WindowsLiveWriter/TeamdevelopmentinWorkspaceStudio_FF17/echoServiceHealthDrillDown_2.jpg"><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="121" alt="echoServiceHealthDrillDown" src="http://dev2dev.bea.com/blog/ctomkins/WindowsLiveWriter/TeamdevelopmentinWorkspaceStudio_FF17/echoServiceHealthDrillDown_thumb.jpg" width="976" border="0" /></a>&#160; </p>  <p>- In this case we chose a load balancing algorithm of round-robin, have 2 distinct service endpoints and have submitted 2 service requests so, as expected, we see each endpoint has serviced 1 message. </p>  <p>Note: If you have chosen a different load balancing algorithm such as random-weighted you will need to submit more requests and probably set a longer aggregation interval to see the number of requests accurately reflect the load balancing algorithm.</p>  <p></p>  <p>So, we have successfully configured, deployed and tested a load balanced business service (and this can be used in the same way as any other business service) - in the next part of this post I will explain how to configure load balancing to automatically handle unreliable service endpoints which may be either online or offline - this is a new feature of AquaLogic Service Bus v3.0.</p>  <p>&#160;</p>  <div class="wlWriterSmartContent" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:4a13e013-2b7d-4182-af88-a74b2302e5a6" style="padding-right: 0px; display: inline; padding-left: 0px; padding-bottom: 0px; margin: 0px; padding-top: 0px">Technorati Tags: <a href="http://technorati.com/tags/aqualogic%20service%20bus" rel="tag">aqualogic service bus</a>,<a href="http://technorati.com/tags/esb" rel="tag">esb</a>,<a href="http://technorati.com/tags/soa" rel="tag">soa</a>,<a href="http://technorati.com/tags/load%20balancing" rel="tag">load balancing</a></div>]]>
        
    </content>
</entry>
<entry>
    <title>AquaLogic Service Bus v3.0 - Getting started with Workspace Studio</title>
    <link rel="alternate" type="text/html" href="http://dev2dev.bea.com/blog/ctomkins/archive/2008/04/aqualogic_service_bus_v30_gett.html" />
    <id>http://dev2dev.bea.com/blog/ctomkins/archive/2008/04/aqualogic_service_bus_v30_gett.html</id>
    
    <published>2008-04-11T15:41:07Z</published>
    <updated>2008-04-11T15:41:24Z</updated>
    
    <summary>One of the major changes in AquaLogic Service Bus v3.0 was to enable you to create service bus artifacts in Workspace Studio as well as the web-based console. This post explains how to get started with Workspace Studio including - how to add a server, how to create an ALSB project, how to start creating ALSB resources and how to deploy and test them.</summary>
    <author>
        <name>ctomkins</name>
        
    </author>
            <category term="Product: AquaLogic Service Bus" />
            <category term="Technology: Service-oriented Architecture" />
    
    <content type="html" xml:lang="en" xml:base="http://dev2dev.bea.com/blog/ctomkins/">
        <![CDATA[<p>One of the major changes in AquaLogic Service Bus v3.0 was to enable you to create service bus artifacts in Workspace Studio as well as the web-based console. This post explains how to get started with Workspace Studio including - how to add a server, how to create an ALSB project, how to start creating ALSB resources and how to deploy and test them.</p>  <p><strong>Launching Workspace Studio</strong></p>  <p>When you first launch Workspace Studio, the first dialog box you get presented with is the Workspace Launcher:</p>  <p><a href="http://dev2dev.bea.com/blog/ctomkins/WindowsLiveWriter/AquaLogicServiceBusv3DoingthingsinWorksp_E094/workspaceLauncher_2.jpg"><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="115" alt="workspaceLauncher" src="http://dev2dev.bea.com/blog/ctomkins/WindowsLiveWriter/AquaLogicServiceBusv3DoingthingsinWorksp_E094/workspaceLauncher_thumb.jpg" width="244" border="0" /></a> </p>  <p>This is asking you where you want your workspace (the place where your Workspace Studio work will be stored) to be located on your file system. Once you have selected a location, click OK and Workspace Studio will finish launching.</p>  <p>Note: If you always want your work to be stored in this location, then tick the box to make this the default location (you can always change this setting from within Workspace Studio by going to Window&gt;Preferences&gt;General&gt;Startup and Shutdown).</p>  <p>Once Workspace Studio has launched, you should see the Welcome screen:</p>  <p><a href="http://dev2dev.bea.com/blog/ctomkins/WindowsLiveWriter/AquaLogicServiceBusv3DoingthingsinWorksp_E094/welcomeScreen_2.jpg"><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="184" alt="welcomeScreen" src="http://dev2dev.bea.com/blog/ctomkins/WindowsLiveWriter/AquaLogicServiceBusv3DoingthingsinWorksp_E094/welcomeScreen_thumb.jpg" width="244" border="0" /></a> </p>  <p>This provides links to an overview of the product, samples, tutorials and other web based resources - if this is your first time using the product it is definitely worth spending some time on these.</p>  <p>Once you have finished looking at the links from the Welcome screen then click the Go to the Workspace button - you are now ready to start doing some work.</p>  <p><strong>Defining your AquaLogic Service Bus server</strong></p>  <p>Before we start creating actual service bus resources we need to define a local server instance which we can use to deploy our resources to. To do this, click on the Servers view tab in the lower half of the screen and then right click in this view and choose New&gt;Server. </p>  <p><a href="http://dev2dev.bea.com/blog/ctomkins/WindowsLiveWriter/AquaLogicServiceBusv3DoingthingsinWorksp_E094/defineNewServer_2.jpg"><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="244" alt="defineNewServer" src="http://dev2dev.bea.com/blog/ctomkins/WindowsLiveWriter/AquaLogicServiceBusv3DoingthingsinWorksp_E094/defineNewServer_thumb.jpg" width="243" border="0" /></a> </p>  <p>- Keep the default of BEA WebLogic Server v10.0 (AquaLogic Service Bus v3.0 is built on this version of WebLogic Server) and click the Next button.</p>  <p><a href="http://dev2dev.bea.com/blog/ctomkins/WindowsLiveWriter/AquaLogicServiceBusv3DoingthingsinWorksp_E094/defineNewServer2_2.jpg"><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="244" alt="defineNewServer2" src="http://dev2dev.bea.com/blog/ctomkins/WindowsLiveWriter/AquaLogicServiceBusv3DoingthingsinWorksp_E094/defineNewServer2_thumb.jpg" width="243" border="0" /></a> </p>  <p>- Optional: Modify the Server name to be AquaLogic Service Bus v3.0 @ localhost - I find this makes it easier to work out which server I am working with.</p>  <p>- Click the browse button to navigate to an existing AquaLogic Service Bus v3.0 domain or click the link to launch the Configuration Wizard to create a new one.</p>  <p>- Click Finish</p>  <p>You should now see the service bus server you created has been added to the Servers view and is currently in the Stopped state:</p>  <p><a href="http://dev2dev.bea.com/blog/ctomkins/WindowsLiveWriter/AquaLogicServiceBusv3DoingthingsinWorksp_E094/serversView_2.jpg"><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="35" alt="serversView" src="http://dev2dev.bea.com/blog/ctomkins/WindowsLiveWriter/AquaLogicServiceBusv3DoingthingsinWorksp_E094/serversView_thumb.jpg" width="244" border="0" /></a> </p>  <p>- To start the server, simply click on the green arrow or right click on the server and select Start.</p>  <p><strong>Creating an AquaLogic Service Bus Project and AquaLogic Service Bus Configuration</strong></p>  <p>Now we have a server, the next step is to create an ALSB Project which will contain our service bus resources. To do this, right click on the whitespace in the Project Explorer view on the left hand side, and choose New&gt;ALSB Project: </p>  <p><a href="http://dev2dev.bea.com/blog/ctomkins/WindowsLiveWriter/AquaLogicServiceBusv3DoingthingsinWorksp_E094/newALSBProject_2.jpg"><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="212" alt="newALSBProject" src="http://dev2dev.bea.com/blog/ctomkins/WindowsLiveWriter/AquaLogicServiceBusv3DoingthingsinWorksp_E094/newALSBProject_thumb.jpg" width="244" border="0" /></a> </p>  <p>Give the project a name and leave the &lt;Default ALSB Configuration&gt; option selected. By default the project contents will reside in a folder with the same name as the project, under the directory you selected for the workspace when you launched Workspace Studio, although you can select a different location if you wish.</p>  <p>Click Finish. When prompted as to whether you want to switch to the AquaLogic Service Bus perspective, tick the Remember my decision check box and click Yes.</p>  <p><a href="http://dev2dev.bea.com/blog/ctomkins/WindowsLiveWriter/AquaLogicServiceBusv3DoingthingsinWorksp_E094/workspaceWithALSBProject_2.jpg"><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="206" alt="workspaceWithALSBProject" src="http://dev2dev.bea.com/blog/ctomkins/WindowsLiveWriter/AquaLogicServiceBusv3DoingthingsinWorksp_E094/workspaceWithALSBProject_thumb.jpg" width="244" border="0" /></a> </p>  <p>You should see 2 projects have been created for you - an ALSB Project with the name you defined and an ALSB Configuration project called ALSB Configuration. You typically have one ALSB Configuration project per server instance and it handles access to the server, the automatic creation of sessions (to manage changes through Change Center) and is where cross project resources - such as SMTP server, JNDI provider and UDDI registry connections reside.</p>  <p>The ALSB Project you created is where resources such as business and proxy service definitions, XML Schema, XSLT and XQuery transformations etc. reside. For those of you familiar with earlier versions of service bus - this is analogous to a project in the project explorer view in the web based console.</p>  <p><strong>Creating resources</strong></p>  <p>To create resources simply right click on either the ALSB Configuration project (if you want to create a cross project resource) or on the ALSB Project (if you want to create a project resource - this is what you will be doing most often) and select New and then the type of resource you want to create. This will launch the appropriate wizard to help you create the resource. If you already have existing resources you can import these by choosing one of the import options. To demonstrate how to do this, here is a simple example where we import a WSDL file from a URL, create a business service from it and then create a proxy service from it:</p>  <p>- Right click on the ALSB project and select Import&gt;Resources from URL and complete the necessary information to identify the WSDL we are interested in:</p>  <p><a href="http://dev2dev.bea.com/blog/ctomkins/WindowsLiveWriter/AquaLogicServiceBusv3DoingthingsinWorksp_E094/importResourceFromURL_2.jpg"><img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="158" alt="importResourceFromURL" src="http://dev2dev.bea.com/blog/ctomkins/WindowsLiveWriter/AquaLogicServiceBusv3DoingthingsinWorksp_E094/importResourceFromURL_thumb.jpg" width="244" border="0" /></a> </p>  <p>- Right click on the ALSB project and choose New&gt;Business Service</p>  <p>- Accept the default location (i.e. in the root of this project) and give the business service a name:</p>  <p><a href="http://dev2dev.bea.com/blog/ctomkins/WindowsLiveWriter/AquaLogicServiceBusv3DoingthingsinWorksp_E094/createBusinessService_2.jpg"><img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="244" alt="createBusinessService" src="http://dev2dev.bea.com/blog/ctomkins/WindowsLiveWriter/AquaLogicServiceBusv3DoingthingsinWorksp_E094/createBusinessService_thumb.jpg" width="232" border="0" /></a> </p>  <p>- Click Next</p>  <p>- Choose the Service Type to be WSDL Web Service and browse to the WSDL you just imported, selecting the port you need (I have chosen the SOAP one for my example) and click Finish (note if you want to perform any more configuration of the business service click Next instead of Finish).</p>  <p>- To create the proxy service, right click on the ALSB Project and choose New&gt;Proxy Service.</p>  <p>- Accept the default location (i.e. the root of this project) and give the proxy service a name:</p>  <p><a href="http://dev2dev.bea.com/blog/ctomkins/WindowsLiveWriter/AquaLogicServiceBusv3DoingthingsinWorksp_E094/createProxyService_2.jpg"><img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="244" alt="createProxyService" src="http://dev2dev.bea.com/blog/ctomkins/WindowsLiveWriter/AquaLogicServiceBusv3DoingthingsinWorksp_E094/createProxyService_thumb.jpg" width="230" border="0" /></a> </p>  <p>- Choose to create this proxy from a business service and select the business service you have just created:</p>  <p><a href="http://dev2dev.bea.com/blog/ctomkins/WindowsLiveWriter/AquaLogicServiceBusv3DoingthingsinWorksp_E094/createProxyService2_2.jpg"><img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="244" alt="createProxyService2" src="http://dev2dev.bea.com/blog/ctomkins/WindowsLiveWriter/AquaLogicServiceBusv3DoingthingsinWorksp_E094/createProxyService2_thumb.jpg" width="230" border="0" /></a> </p>  <p>- Click Finish to accept all the defaults (if you need to customise any of the options for your proxy service, just click on Next instead of Finish)</p>  <p>This completes the construction of the service bus resources needed for this example - if you wish to further customise the business service or proxy service you can double click on them in the Project Explorer view and modify their properties via the various tabs (these correspond to the various panels you would see if you completed every panel in the creation wizard).</p>  <p><strong>Deploying and </strong><strong>Testing</strong></p>  <p>Right click on the proxy service and choose Run As&gt;Run on Server which will publish the resources to the server and also launch the test client. </p>  <p>Note: If you want to just publish the resources, you can do so by right clicking on your server and choosing publish or clicking the publish icon (next to the red square stop server icon).</p>  <p><a href="http://dev2dev.bea.com/blog/ctomkins/WindowsLiveWriter/AquaLogicServiceBusv3DoingthingsinWorksp_E094/runOnServer_2.jpg"><img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="244" alt="runOnServer" src="http://dev2dev.bea.com/blog/ctomkins/WindowsLiveWriter/AquaLogicServiceBusv3DoingthingsinWorksp_E094/runOnServer_thumb.jpg" width="195" border="0" /></a> </p>  <p>- Check the &quot;Set server as project default (do not ask again)&quot; option so that you are not prompted with this screen for each subsequent publish.</p>  <p>- Click Finish (if you need to customise which applications are deployed to the server, click Next instead of Finish)</p>  <p>- You should now see the Test Client launch and be able to test your proxy service by entering sample data and clicking execute:</p>  <p><a href="http://dev2dev.bea.com/blog/ctomkins/WindowsLiveWriter/AquaLogicServiceBusv3DoingthingsinWorksp_E094/testClient_2.jpg"><img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="213" alt="testClient" src="http://dev2dev.bea.com/blog/ctomkins/WindowsLiveWriter/AquaLogicServiceBusv3DoingthingsinWorksp_E094/testClient_thumb.jpg" width="244" border="0" /></a> </p>  <p>Note: If you would prefer to see the Test Client launched in your own web browser rather than in Workspace Studio, you can configure this by going to Window&gt;Preferences&gt;General&gt;Web Browser.</p>  <p>Congratulations - you have just developed, deployed and tested your first proxy service from within the Workspace Studio IDE.</p>  <p>Note: To enable operational settings, SLAs etc. you will still need to use the web based console - this can easily be launched by right clicking on the server you created and choosing Launch ALSB Administration Console.</p>  <div class="wlWriterSmartContent" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:8a05dabe-583c-4398-b45d-363dfeaabfd2" style="padding-right: 0px; display: inline; padding-left: 0px; padding-bottom: 0px; margin: 0px; padding-top: 0px">Technorati Tags: <a href="http://technorati.com/tags/aqualogic%20service%20bus" rel="tag">aqualogic service bus</a>,<a href="http://technorati.com/tags/esb" rel="tag">esb</a>,<a href="http://technorati.com/tags/service%20orientation" rel="tag">service orientation</a>,<a href="http://technorati.com/tags/soa" rel="tag">soa</a>,<a href="http://technorati.com/tags/eclipse" rel="tag">eclipse</a>,<a href="http://technorati.com/tags/bea" rel="tag">bea</a></div>]]>
        
    </content>
</entry>
<entry>
    <title>AquaLogic Service Bus v3.0 is here!</title>
    <link rel="alternate" type="text/html" href="http://dev2dev.bea.com/blog/ctomkins/archive/2008/03/aqualogic_service_bus_v30_is_h.html" />
    <id>http://dev2dev.bea.com/blog/ctomkins/archive/2008/03/aqualogic_service_bus_v30_is_h.html</id>
    
    <published>2008-03-03T13:52:48Z</published>
    <updated>2008-03-03T13:53:06Z</updated>
    
    <summary>The new version of AquaLogic Service Bus, v3.0, is finally here - I&apos;ve been playing around with early versions for a while now internally, but have not been able to write about it, but now I can! Some of the...</summary>
    <author>
        <name>ctomkins</name>
        
    </author>
            <category term="Product: AquaLogic Service Bus" />
            <category term="Technology: Eclipse" />
            <category term="Technology: Service-oriented Architecture" />
    
    <content type="html" xml:lang="en" xml:base="http://dev2dev.bea.com/blog/ctomkins/">
        <![CDATA[<p>The new version of <a title="AquaLogic Service Bus" href="http://www.bea.com/framework.jsp?CNT=index.htm&amp;FP=/content/products/aqualogic/service_bus/" target="_blank">AquaLogic Service Bus</a>, <a href="http://www.bea.com/framework.jsp?CNT=index.htm&amp;FP=/content/products/aqualogic/service_bus/" target="_blank">v3.0</a>, is finally here - I've been playing around with early versions for a while now internally, but have not been able to write about it, but now I can!</p>  <p>Some of the key new features are:</p>  <p><strong>Eclipse-based design tools for WorkSpace Studio</strong></p>  <p>Before v3.0 the design of all AquaLogic Service Bus assets (such as business services and proxy services) took place in the web-based console. In v3.0 you can still choose to use the console, but you can now choose to design all your assets in WorkSpace Studio using the <a href="http://edocs.bea.com/alsb/docs30/eclipsehelp/index.html" target="_blank">new Eclipse plugin</a>. Those of you familiar with previous versions of AquaLogic Service Bus should find it pretty easy to understand - plus existing service bus configurations can be imported into WorkSpace Studio which will give you a real headstart and the opportunity to see what older configurations look like in the new tool.</p>  <p><strong>Business Service Overload Protection (Throttling)</strong></p>  <p>Some business services, typically legacy ones, are often not designed to cope with the high throughputs demanded by today's SOA environments. In order to protect these services from being overloaded, AquaLogic Service Bus v3.0 has introduced business service overload protection, or throttling, capabilities. Using these you can define the maximum number of messages that can be handled concurrently by your business service. If this limit is exceeded, additional messages are placed on a queue until the number of messages being handled by the business service has fell below the maximum concurrent message limit or you have chosen to expire them after a set period of time. Throttling metrics such as maximum, minimum and average throttling time can be used to generate alerts and also in the construction of service level agreements. Read more about throttling <a href="http://edocs.bea.com/alsb/docs30/operations/throttling.html" target="_blank">here</a>.</p>  <p><strong>Large Message Processing</strong></p>  <p>If you have a proxy service which expects to receive large messages then you may want to take a look at the new streaming mode option AquaLogic Service Bus v3.0 provides. This allows large message content to be streamed rather than all loaded into memory - an expensive option for very large messages, especially if you only need limited access to the payload (e.g. if you are performing header based routing). Options are provided to allow you to stream the content to memory or to disk. Read more about the streaming capabilities <a href="http://edocs.bea.com/alsb/docs30/userguide/context.html#wp1110499" target="_blank">here</a>.</p>  <p><strong></strong></p>  <p><strong>Split/Join</strong></p>  <p>A common business integration use case is to take a service request, split it up into a number of parts, perform one or more service invocations for each part concurrently, and then aggregate (or join) the responses from these invocations into a single response message. A good example of this is an order processing service which might well perform the following steps:</p>  <ul>   <li>Receive an order </li>    <li>Check whether each item in the order is in stock (by invoking a stock check service)</li>    <li>Return a summary of the item availability</li> </ul>  <p>AquaLogic Service Bus v3.0 now provides support for both static (the number of parts is known at design time) and dynamic (the number of parts is only known at runtime) split/join patterns. Read more <a href="http://e-docs.bea.com/alsb/docs30/userguide/splitjoin.html" target="_blank">here</a>.</p>  <p><strong>Service Pooling and Endpoint Failover</strong></p>  <p>If you have a business service which has multiple endpoints AquaLogic Service Bus v3.0 will automatically remove non-responding endpoints from the pool and automatically add them back in when available. Alerts are also generated when this happens, so you can quickly see when a problem has occurred and deal with it rapidly.</p>  <p><strong>Improved standard support and connectivity</strong></p>  <p>In AquaLogic Service Bus v3.0 we now support <a href="www.oasis-open.org/committees/wsrm/" target="_blank">WS-ReliableMessaging</a> and have new transports for native MQ Series connectivity, secure FTP and an improved custom transport SDK (read more on the <a href="http://edocs.bea.com/alsb/docs30/transports.html" target="_blank">transports</a> page). We also now have enhanced support for native ERP transports (such as SAP and Siebel) through our new product <a href="http://www.bea.com/framework.jsp?CNT=smartconnect.htm&amp;FP=/content/products/aqualogic/service_bus/" target="_blank">SmartConnect</a>. Check out <a href="http://dev2dev.bea.com/blog/quinton_wall/" target="_blank">Quinton Wall</a>'s <a href="http://dev2dev.bea.com/blog/quinton_wall/archive/2007/12/smartconnect_on.html" target="_blank">introductory video to SmartConnect</a> on <a href="http://www.youtube.com" target="_blank">YouTube</a>.</p>  <p>&#160;</p>  <p>In addition to these there is improved integration with other products in the <a href="http://www.bea.com/framework.jsp?CNT=index.htm&amp;FP=/content/products/aqualogic/&amp;WT.ac=topnav_products_aqualogic" target="_blank">AquaLogic family</a> and numerous performance improvements and bug fixes. If you haven't got hold of a copy yet - what are you waiting for?</p>  <p>&#160;</p>  <div class="wlWriterSmartContent" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:31186a83-8edb-4e82-841a-5c14dfd60ff5" style="padding-right: 0px; display: inline; padding-left: 0px; padding-bottom: 0px; margin: 0px; padding-top: 0px">Technorati Tags: <a href="http://technorati.com/tags/aqualogic%20service%20bus" rel="tag">aqualogic service bus</a>,<a href="http://technorati.com/tags/esb" rel="tag">esb</a>,<a href="http://technorati.com/tags/service%20orientation" rel="tag">service orientation</a>,<a href="http://technorati.com/tags/soa" rel="tag">soa</a>,<a href="http://technorati.com/tags/eclipse" rel="tag">eclipse</a>,<a href="http://technorati.com/tags/smartconnect" rel="tag">smartconnect</a>,<a href="http://technorati.com/tags/bea" rel="tag">bea</a></div>]]>
        
    </content>
</entry>
<entry>
    <title>Reusing data type definitions in AquaLogic Service Bus</title>
    <link rel="alternate" type="text/html" href="http://dev2dev.bea.com/blog/ctomkins/archive/2008/01/reusing_data_type_definitions.html" />
    <id>http://dev2dev.bea.com/blog/ctomkins/archive/2008/01/reusing_data_type_definitions.html</id>
    
    <published>2008-01-21T13:47:46Z</published>
    <updated>2008-01-21T13:47:59Z</updated>
    
    <summary>One of the main goals of Service Oriented Architecture is to promote reuse, not just of services but also of things like data type definitions - after all, once you&apos;ve defined something once you don&apos;t typically want to have to do it again. One common web services practice however, actually prevents the reuse of data type definitions. In the remainder of this post I will describe the practice, how it prevents reuse and explain an improved practice which allows these data type definitions to be reused in other services.</summary>
    <author>
        <name>ctomkins</name>
        
    </author>
            <category term="Product: AquaLogic Service Bus" />
            <category term="Technology: Service-oriented Architecture" />
            <category term="Technology: Web Services" />
    
    <content type="html" xml:lang="en" xml:base="http://dev2dev.bea.com/blog/ctomkins/">
        <![CDATA[<p>One of the main goals of Service Oriented Architecture is to promote reuse, not just of services but also of things like data type definitions - after all, once you've defined something once you don't typically want to have to do it again. One common web services practice however, actually prevents the reuse of data type definitions. In the remainder of this post I will describe the practice, how it prevents reuse and explain an improved practice which allows these data type definitions to be reused in other services.</p>  <p>Web services are described by a <a href="http://www.w3.org/TR/wsdl" target="_blank">WSDL (Web Services Description Language)</a> document, one of the the key elements of which is the <a href="http://www.w3.org/TR/wsdl#_types" target="_blank">types section</a>, where the data type definitions for the request and response messages for your web service are described, in XML schema syntax. In the interest of simplicity these definitions are often placed <strong>inline</strong>, i.e. described within the WSDL file, which is fine for your web service but prevents these definitions from being reused elsewhere. </p>  <p>The alternative approach is to define your data types in a separate XML schema file and add a line into the WSDL document which imports this schema into the types section of the WSDL. This not only gives you better encapsulation - your data type definitions are described in one file and your web service in another - but also allows you to use these data type definitions in other services.</p>  <p>Lets work through a simple scenario to demonstrate why you might want to do this:</p>  <p>Imagine you have an existing SOAP/HTTP web service (we'll use the free <a href="http://www.webservicex.net/WCF/ServiceDetails.aspx?SID=18" target="_blank">CurrencyConverter</a> service provided by <a href="http://www.webservicex.net" target="_blank">WebServiceX</a>) which you need to expose to a JMS messaging system. In order to keep things simple you decide to make the message definitions used by the JMS messaging system the same as those expected by the web service.</p>  <p>The steps you would follow are described below:</p>  <p>1 - Save a copy of the <a href="http://www.webservicex.net/CurrencyConvertor.asmx?wsdl" target="_blank">CurrencyConverter WSDL</a> document to your machine and extract the types definitions from it into a separate schema. To do this, open the CurrencyConverter.wsdl file and copy and paste the contents of the &lt;wsdl:types&gt; element into a separate file called CurrencyConverterTypes.xsd. </p>  <p>2 - Next we need to ensure the namespaces are correct. Modify the first line of the CurrencyConverterTypes.xsd file to say:</p>  <p><font face="courier">&lt;s:schema elementFormDefault=&quot;qualified&quot; targetNamespace=&quot;</font><a href="http://www.webserviceX.NET/"><font face="courier">http://www.webserviceX.NET/</font></a><font face="courier">&quot; xmlns:tns=&quot;</font><a href="http://www.webserviceX.NET/"><font face="courier">http://www.webserviceX.NET/</font></a><font face="courier">&quot; xmlns:s=&quot;</font><a title="http://www.w3.org/2001/XMLSchema" href="http://www.w3.org/2001/XMLSchema"><font face="courier">http://www.w3.org/2001/XMLSchema</font></a><font face="cour"><font face="courier">&quot;&gt;</font> </font></p>  <p><font face="cour">3 - Now modify the &lt;wsdl:types&gt; section of CurrencyConverter.wsdl to import CurrencyConverterTypes.xsd:</font></p>  <p><font face="Courier">&lt;wsdl:types&gt;</font></p>  <p><font face="Courier">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;s:schema&gt;      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;s:import namespace=&quot;</font><a href="http://www.webserviceX.NET/" ?="?"><font face="Courier">http://www.webserviceX.NET/&quot;</font></a><font face="Courier"> schemaLocation=&quot;CurrencyConverterTypes.xsd&quot; /&gt;      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;/s:schema&gt;</font></p>  <p><font face="Courier">&lt;/wsdl:types&gt;</font></p>  <p>We have now extracted the inline data type definitions from our WSDL. In the remainder of the steps we will create the business service representing our SOAP/HTTP web service and the JMS messaging proxy service which exposes this to the JMS messaging system.</p>  <p>4 - Add the modified CurrencyConverter.wsdl and CurrencyConverterTypes.xsd to a zip file called CurrencyConverter.zip (this is not essential but will make it easier to import them into AquaLogic Service Bus and also save us having to manually create a reference between the XML schema and the WSDL).</p>  <p>5 - Login to your AquaLogic Service Bus domain and create a new project (remember to click Create in Change Center if you haven't already created a new session).</p>  <p>6 - Navigate into this project using Project Explorer and import the zip file created in step 4 using the Zipped Resources option from the Create Resource drop down. </p>  <p><a href="http://dev2dev.bea.com/blog/ctomkins/WindowsLiveWriter/Contentbasedrouting_F2F9/importZipFile_2.jpg"><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="114" alt="importZipFile" src="http://dev2dev.bea.com/blog/ctomkins/WindowsLiveWriter/Contentbasedrouting_F2F9/importZipFile_thumb.jpg" width="244" border="0" /></a> </p>  <p>You will need to browse to the zip file on the system and click Open, then click Next and Import.</p>  <p>7 - In the same project, create a WSDL Web Service business service called CurrencyConverterBS from the imported WSDL (the basic steps can be found in <a href="http://dev2dev.bea.com/blog/ctomkins/archive/2007/11/adding_a_service_to_aqualogic.html" target="_blank">my earlier blog post</a>).</p>  <p>8 - In the same project, create a new proxy service called CurrencyConverterPS by selecting Proxy Service from the Create Resource drop down and selecting the Service Type to be Messaging Service. Click Next.</p>  <p>9 - Set the Request Message Type to be XML and click the adjacent Browse button.</p>  <p>10 - Select the CurrencyConversionTypes schema by clicking on it and then select the ConversionRate element (this is the data type definition for the request message) and click Submit.</p>  <p>11 - Repeat steps 9 and 10 for the Response Message Type ensuring you select the ConversionRateResponse element as the data type definition for the response message and click Next.</p>  <p>Note: If you had left the data type definitions inline in the original WSDL file, you would not have been able to select the request and response message type definitions as you have done in steps 9-11.</p>  <p>12 - Choose the protocol to be JMS and ensure the hostname part of the Endpoint URI points to your host (or localhost, if you have not specified a fully qualified domain name for your AquaLogic Service Bus domain). Copy the Endpoint URI as you will need it later and then click Next. </p>  <p>Note: The last part of the URI refers to the JNDI name of the JMS input queue of your proxy service.</p>  <p>13 - Paste the Endpoint URI you copied into the Response URI field and modify the last part of the URI to be CurrencyConverterPSResponse (the JNDI name of the response JMS queue). Click Last and then Save.</p>  <p>14 - Open up the Message Flow of the CurrencyConverterPS proxy service by click on the Message Flow icon <a href="http://dev2dev.bea.com/blog/ctomkins/WindowsLiveWriter/Contentbasedrouting_F2F9/messageFlowIcon_2.jpg"><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="24" alt="messageFlowIcon" src="http://dev2dev.bea.com/blog/ctomkins/WindowsLiveWriter/Contentbasedrouting_F2F9/messageFlowIcon_thumb.jpg" width="13" border="0" /></a> .</p>  <p>15 - Click on the CurrencyConverterPS node and choose Add Route (give the route node a more sensible name and a description by left clicking on it and choosing Edit Name and Description).</p>  <p><a href="http://dev2dev.bea.com/blog/ctomkins/WindowsLiveWriter/Contentbasedrouting_F2F9/selectAddRoute_2.jpg"><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="153" alt="selectAddRoute" src="http://dev2dev.bea.com/blog/ctomkins/WindowsLiveWriter/Contentbasedrouting_F2F9/selectAddRoute_thumb.jpg" width="237" border="0" /></a> </p>  <p>16 - Click the route node and choose edit Route</p>  <p>17 - Click Add an Action and choose Communication&gt;Routing.</p>  <p><a href="http://dev2dev.bea.com/blog/ctomkins/WindowsLiveWriter/Contentbasedrouting_F2F9/chooseRouting_2.jpg"><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="59" alt="chooseRouting" src="http://dev2dev.bea.com/blog/ctomkins/WindowsLiveWriter/Contentbasedrouting_F2F9/chooseRouting_thumb.jpg" width="351" border="0" /></a> </p>  <p>18 - Set the Service attribute to be the CurrencyConverterBS business service.</p>  <p>19 - Select ConversionRate as the invoking Operation from the drop down.</p>  <p><a href="http://dev2dev.bea.com/blog/ctomkins/WindowsLiveWriter/Contentbasedrouting_F2F9/routingAction_6.jpg"><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="147" alt="routingAction" src="http://dev2dev.bea.com/blog/ctomkins/WindowsLiveWriter/Contentbasedrouting_F2F9/routingAction_thumb_2.jpg" width="376" border="0" /></a> </p>  <p>20 - Click Save All.</p>  <p>22 - Activate your changes.</p>  <p>We now have a JMS messaging proxy service which fronts our SOAP/HTTP web service and uses the same data type definitions for the request and response messages. To test this, you can either use the test console by clicking on the bug icon (change the FromCurrency to GBP and the ToCurrency to USD as a good example) or by placing a message on the request queue as pointed to by the request endpoint URI (see step 12 above) ensuring your request message is in the right format. Note AquaLogic Service Bus has created the JMS resources required for your proxy service automatically so you will not need to create them yourself.</p>  <p>In summary, if you have data type definitions you expect to reuse in other services then you should aim to put them in external XML schemas rather than defining them inline in WSDL documents. If you have types that are specific to your web service and you don't envisage using them again, then it is fine to define them inline in the WSDL. If you wish, you can choose to have a mixture of both.</p>  <div class="wlWriterSmartContent" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:e292f983-67f5-4006-b096-2e4c1f3b2d69" style="padding-right: 0px; display: inline; padding-left: 0px; padding-bottom: 0px; margin: 0px; padding-top: 0px">Technorati Tags: <a href="http://technorati.com/tags/aqualogic%20service%20bus" rel="tag">aqualogic service bus</a>,<a href="http://technorati.com/tags/esb" rel="tag">esb</a>,<a href="http://technorati.com/tags/wsdl" rel="tag">wsdl</a>,<a href="http://technorati.com/tags/web%20services" rel="tag">web services</a>,<a href="http://technorati.com/tags/xml%20schema" rel="tag">xml schema</a></div>]]>
        
    </content>
</entry>
<entry>
    <title>Oracle here we come.....</title>
    <link rel="alternate" type="text/html" href="http://dev2dev.bea.com/blog/ctomkins/archive/2008/01/oracle_here_we_come.html" />
    <id>http://dev2dev.bea.com/blog/ctomkins/archive/2008/01/oracle_here_we_come.html</id>
    
    <published>2008-01-16T14:41:42Z</published>
    <updated>2008-01-16T14:41:52Z</updated>
    
    <summary>When I joined BEA last September I had no idea I would be working for another company so soon but it has just been announced that Oracle has agreed to purchase BEA for $7.85 billion (this time its official) and...</summary>
    <author>
        <name>ctomkins</name>
        
    </author>
            <category term="Product: AquaLogic Service Bus" />
    
    <content type="html" xml:lang="en" xml:base="http://dev2dev.bea.com/blog/ctomkins/">
        <![CDATA[<p>When I joined <a href="http://ww.bea.com" target="_blank">BEA</a> last September I had no idea I would be working for another company so soon but it has just been announced that <a href="http://us.rd.yahoo.com/finance/news/topnews;_ylt=Agy0Snom4y7qShR_Ec_dbPW7YWsA/*http://biz.yahoo.com/ap/080116/oracle_bea.html" target="_blank">Oracle has agreed to purchase BEA for $7.85 billion</a> (this time its official) and so it looks like that will be the case.</p>  <p>I for one am looking forward to the new challenges ahead and seeing how we can combine the best of BEA with the best of Oracle to give our customers the best solution, especially when it comes to ESBs. Bring it on!</p>  <p>I reckon this merger will also make me a record breaker, the only person to have worked for IBM, BEA and Oracle in just over 100 days!</p>  <div class="wlWriterSmartContent" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:645e4585-f86d-430b-84c9-3d11d8d43755" style="padding-right: 0px; display: inline; padding-left: 0px; padding-bottom: 0px; margin: 0px; padding-top: 0px">Technorati Tags: <a href="http://technorati.com/tags/bea" rel="tag">bea</a>,<a href="http://technorati.com/tags/oracle" rel="tag">oracle</a></div>]]>
        
    </content>
</entry>
<entry>
    <title>Sending an Email from AquaLogic Service Bus - Part 2</title>
    <link rel="alternate" type="text/html" href="http://dev2dev.bea.com/blog/ctomkins/archive/2007/12/sending_an_email_from_aqualogi_1.html" />
    <id>http://dev2dev.bea.com/blog/ctomkins/archive/2007/12/sending_an_email_from_aqualogi_1.html</id>
    
    <published>2007-12-19T16:51:12Z</published>
    <updated>2007-12-19T16:51:29Z</updated>
    
    <summary>Discover how AquaLogic Service Bus can be used to create a flexible and reusable email service.</summary>
    <author>
        <name>ctomkins</name>
        
    </author>
            <category term="Product: AquaLogic Service Bus" />
            <category term="Technology: Service-oriented Architecture" />
    
    <content type="html" xml:lang="en" xml:base="http://dev2dev.bea.com/blog/ctomkins/">
        <![CDATA[<p>In my <a href="http://dev2dev.bea.com/blog/ctomkins/archive/2007/12/sending_an_email_from_aqualogi.html" target="_blank">previous post</a> I showed how easy it was to create a business service in <a title="AquaLogic Service Bus" href="http://dev2dev.bea.com/alservicebus/" target="_blank">AquaLogic Service Bus</a> which could be used to send email. If you completed the steps and created this service in your own AquaLogic Service Bus environment you may have noticed a few limitations:</p>  <p>- It only ever sends email to one address</p>  <p>- The email sent doesn't have the subject field populated</p>  <p>As pointed out in a comment on my first post (thanks nugs) - one way of addressing the first limitation is to create a separate business service for each email address - not exactly a scalable approach if you have 3000 different email addresses to send email to! Thankfully there is a better way to address both limitations - the <a href="http://e-docs.bea.com/alsb/docs26/consolehelp/proxyactions.html#wp1274176" target="_blank">Transport Headers action</a> which allows you to modify the transport specific headers of the outbound request and/or inbound response from within a proxy service. In our case, we are interested in setting the email transport specific headers in the outbound request. </p>  <p>In order to demonstrate this, lets make our existing email business service more useful by fronting it with a proxy service which sets the email subject, content and destination email address dynamically based on information in an incoming request of the form:</p>  <p><font face="Courier">&lt;email&gt;</font></p>  <p><font face="Courier">&#160; &lt;to&gt;The destination email address&lt;/to&gt;</font></p>  <p><font face="Courier">&#160; &lt;subject&gt;The subject of the email&lt;/subject&gt;</font></p>  <p><font face="Courier">&#160; &lt;content&gt;The content of the email&lt;/content&gt;</font></p>  <p><font face="Courier">&lt;/email&gt;</font></p>  <p>Lets start by creating a simple XML schema to represent our incoming request:</p>  <p>- In the service bus console, click <em>Create</em> in the Change Center to start a new session</p>  <p>- Navigate to the project you created your email business service in</p>  <p>- In the field Enter New Folder Name box type <strong>XML Schema</strong> and click <em>Add Folder</em></p>  <p>- Click on the newly created XML Schema folder </p>  <p>- From the Create Resource drop down select XML Schema and complete the screen as follows:</p>  <p><a href="http://dev2dev.bea.com/blog/ctomkins/WindowsLiveWriter/SendinganEmailfromAquaLogicServiceBusPar_CACC/emailServiceConfiguration2_2.jpg"><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="100" alt="emailServiceConfiguration2" src="http://dev2dev.bea.com/blog/ctomkins/WindowsLiveWriter/SendinganEmailfromAquaLogicServiceBusPar_CACC/emailServiceConfiguration2_thumb.jpg" width="244" border="0" /></a> </p>  <p>Make sure you enter the XML schema which is:</p>  <p><font face="Courier">&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;      <br />&lt;schema xmlns=&quot;</font><a href="http://www.w3.org/2001/XMLSchema" ?="?"><font face="Courier">http://www.w3.org/2001/XMLSchema&quot;</font></a><font face="Courier"> targetNamespace=&quot;</font><a href="http://www.example.org/EmailRequest" ?="?"><font face="Courier">http://www.example.org/EmailRequest&quot;</font></a><font face="Courier"> xmlns:tns=&quot;</font><a href="http://www.example.org/EmailRequest" ?="?"><font face="Courier">http://www.example.org/EmailRequest&quot;</font></a><font face="Courier"> elementFormDefault=&quot;qualified&quot;&gt; </font></p>  <p><font face="Courier">&#160;&#160;&#160; &lt;element name=&quot;Email&quot; type=&quot;tns:EmailType&quot;&gt;&lt;/element&gt;      <br />&#160;&#160;&#160; &lt;complexType name=&quot;EmailType&quot;&gt;       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;sequence&gt;       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;element name=&quot;to&quot; type=&quot;string&quot;&gt;&lt;/element&gt;       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;element name=&quot;subject&quot; type=&quot;string&quot;&gt;&lt;/element&gt;       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;element name=&quot;content&quot; type=&quot;string&quot;&gt;&lt;/element&gt;       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;/sequence&gt;       <br />&#160;&#160;&#160; &lt;/complexType&gt;       <br />&lt;/schema&gt;</font></p>  <p>- Click <em>Save</em></p>  <p>The next step is to create the proxy service which accepts an XML message conforming to the schema you have just created:</p>  <p>- Add a new folder to your project called Proxy Services and navigate to this folder</p>  <p>- From the Create Resource drop down choose to create a new Proxy Service</p>  <p>- Complete the first screen as follows:</p>  <p><a href="http://dev2dev.bea.com/blog/ctomkins/WindowsLiveWriter/SendinganEmailfromAquaLogicServiceBusPar_CACC/emailServiceConfiguration1_2.jpg"><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="128" alt="emailServiceConfiguration1" src="http://dev2dev.bea.com/blog/ctomkins/WindowsLiveWriter/SendinganEmailfromAquaLogicServiceBusPar_CACC/emailServiceConfiguration1_thumb.jpg" width="244" border="0" /></a> </p>  <p>- Click <em>Next</em></p>  <p>- Select XML as the Request Message Type and select Browse</p>  <p>- Select the EmailRequest schema you have just created</p>  <p>- Select the Email element and click <em>Submit</em></p>  <p>- Click <em>Last</em> as we do not need to modify any other settings for this service</p>  <p>- Check the summary screen looks like the one below:</p>  <p><a href="http://dev2dev.bea.com/blog/ctomkins/WindowsLiveWriter/SendinganEmailfromAquaLogicServiceBusPar_CACC/emailServiceConfiguration3_2.jpg"><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="152" alt="emailServiceConfiguration3" src="http://dev2dev.bea.com/blog/ctomkins/WindowsLiveWriter/SendinganEmailfromAquaLogicServiceBusPar_CACC/emailServiceConfiguration3_thumb.jpg" width="244" border="0" /></a> </p>  <p>Note: By clicking the <em>Last</em> button we have accepted the defaults and created an XML over HTTP service (although we could equally well have chosen to create a WSDL based service too).</p>  <p>- Click <em>Save</em></p>  <p>The next step is to create the message flow for the proxy service:</p>  <p>- Click on the message flow icon in the Actions column and you should see a very simple message flow:</p>  <p><a href="http://dev2dev.bea.com/blog/ctomkins/WindowsLiveWriter/SendinganEmailfromAquaLogicServiceBusPar_CACC/messageFlow1_2.jpg"><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="70" alt="messageFlow1" src="http://dev2dev.bea.com/blog/ctomkins/WindowsLiveWriter/SendinganEmailfromAquaLogicServiceBusPar_CACC/messageFlow1_thumb.jpg" width="118" border="0" /></a> </p>  <p>- Click on the EmailService node and select Add Route</p>  <p>- Click on the route node created and choose Edit Name and Description. Give the route node a sensible name and description and click <em>Save</em></p>  <p>- Click on the route node again and select Edit Route</p>  <p>- Click on Add an Action and select Communication&gt;Routing</p>  <p>- In the Route to action just created, click on Service, select the email business service you created previously, and click <em>Submit</em></p>  <p>- Back in the Route to action add a request action by clicking on Add an Action under Request actions and select Communication&gt;Transport Headers</p>  <p>- Click on Add Header</p>  <p>- From the drop down select email&gt;Subject</p>  <p>- Set the Set Header to Expression to <font face="cour">$body/ema:Email/ema:subject/text()</font> (you can use the Variable Structures section on the left hand side to select the correct structure)</p>  <p>- Click on the document icon to the left of the Subject radio button and select Add Header</p>  <p>- Repeat the Add Header steps to set the To field to <font face="Courier">$body/ema:Email/ema:to/text()</font></p>  <p>Next we have to replace the main body of the message with just the content part to ensure our email contains the content rather than the original XML request sent to the proxy service:</p>  <p>- Click on the icon to the left of Set Transport Headers and select Add an Action&gt;Message Processing&gt;Replace</p>  <p>- Ignore the XPath field (by default it selects everything which is what we want in this case)</p>  <p>- In the variable field enter <strong>body</strong></p>  <p>- Set the Expression field to be <font face="Courier">$body/ema:Email/ema:content/text()</font></p>  <p>- Ensure the Replace node contents radio button is selected</p>  <p>- The completed Route to part of the flow should look like:</p>  <p><a href="http://dev2dev.bea.com/blog/ctomkins/WindowsLiveWriter/SendinganEmailfromAquaLogicServiceBusPar_CACC/messageFlow2_2.jpg"><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="210" alt="messageFlow2" src="http://dev2dev.bea.com/blog/ctomkins/WindowsLiveWriter/SendinganEmailfromAquaLogicServiceBusPar_CACC/messageFlow2_thumb.jpg" width="244" border="0" /></a> </p>  <p>- Click <em>Save All</em></p>  <p>- Click <em>Activate</em>, enter a description and click <em>Submit</em> to enforce your changes.</p>  <p>The final step is to test our new proxy service. Click on the bug icon to launch the Test Console and modify the contents of the to, subject and content XML fields and click <em>Execute</em>. Check your email to make sure it has been sent and is formatted correctly. </p>  <p>In summary, in this post we have taken a simple email business service and fronted it with a proxy service. This has turned our limited email service into a much more flexible service which can easily be reused by other services. We have also showed how to expose a service using a different transport protocol (in this case we have exposed our email business service as an XML/HTTP proxy service) and ensured our service consumers are not tightly coupled to our email business service making it easier for us to make changes.</p>  <div class="wlWriterSmartContent" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:1c137260-4d64-4a2b-95f6-1aa519e00741" style="padding-right: 0px; display: inline; padding-left: 0px; padding-bottom: 0px; margin: 0px; padding-top: 0px">Technorati Tags: <a href="http://technorati.com/tags/aqualogic%20service%20bus" rel="tag">aqualogic service bus</a>,<a href="http://technorati.com/tags/esb" rel="tag">esb</a>,<a href="http://technorati.com/tags/email" rel="tag">email</a>,<a href="http://technorati.com/tags/service" rel="tag">service</a></div>]]>
        
    </content>
</entry>
<entry>
    <title>Sending an Email from AquaLogic Service Bus - Part 1</title>
    <link rel="alternate" type="text/html" href="http://dev2dev.bea.com/blog/ctomkins/archive/2007/12/sending_an_email_from_aqualogi.html" />
    <id>http://dev2dev.bea.com/blog/ctomkins/archive/2007/12/sending_an_email_from_aqualogi.html</id>
    
    <published>2007-12-12T14:12:19Z</published>
    <updated>2007-12-12T14:12:56Z</updated>
    
    <summary>AquaLogic Service Bus treats sending an email in much the same way as sending a service request to any other service provider. In this post I describe how to create an email business service which can be reused by any proxy service hosted on your service bus. In the next post in this set I describe how to use this business service from a proxy service and some tips for customising the email sent.</summary>
    <author>
        <name>ctomkins</name>
        
    </author>
            <category term="Product: AquaLogic Service Bus" />
            <category term="Role: Platform Admin" />
            <category term="Technology: Service-oriented Architecture" />
    
    <content type="html" xml:lang="en" xml:base="http://dev2dev.bea.com/blog/ctomkins/">
        <![CDATA[<div class="wlWriterSmartContent" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:e6afe779-764a-418b-bfdf-34c96f89cf27" style="padding-right: 0px; display: inline; padding-left: 0px; padding-bottom: 0px; margin: 0px; padding-top: 0px">Technorati Tags: <a href="http://technorati.com/tags/aqualogic%20service%20bus" rel="tag">aqualogic service bus</a>,<a href="http://technorati.com/tags/email" rel="tag">email</a>,<a href="http://technorati.com/tags/business%20service" rel="tag">business service</a></div>  <p>The first step is to create an <a href="http://en.wikipedia.org/wiki/Simple_Mail_Transfer_Protocol" target="_blank">SMTP</a> Server configuration (it is the SMTP server that actually sends the email). To do this, you need to do the following:</p>  <p>- Click on the System Administration link in the left hand navigation in the service bus console</p>  <p>- Click on <em>Create</em> in the Change Center to create a new session in which you can make changes</p>  <p>- Click on <em>Add</em> and enter the details for your SMTP Server, e.g.</p>  <p><a href="http://dev2dev.bea.com/blog/ctomkins/WindowsLiveWriter/Emailbusinessservice_7955/smtpserver_2.jpg"><img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="149" alt="smtpserver" src="http://dev2dev.bea.com/blog/ctomkins/WindowsLiveWriter/Emailbusinessservice_7955/smtpserver_thumb.jpg" width="244" border="0" /></a> </p>  <p>- Click <em>Save</em>.</p>  <p>Now we have an SMTP Server configuration we can use multiple times within AquaLogic Service Bus without entering this information again.</p>  <p>The next step is to create an email business service that uses this SMTP Server configuration:</p>  <p>- Click on the Project Explorer link in the left hand navigation</p>  <p>- Select (or create) the project and folder you want to create the email business service in</p>  <p>- From the Create Resource drop down select Business Service</p>  <p>- Enter a name and description for your business service and ensure you select the Service Type as Messaging Service:</p>  <p><a href="http://dev2dev.bea.com/blog/ctomkins/WindowsLiveWriter/Emailbusinessservice_7955/emailBusinessService_4.jpg"><img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="126" alt="emailBusinessService" src="http://dev2dev.bea.com/blog/ctomkins/WindowsLiveWriter/Emailbusinessservice_7955/emailBusinessService_thumb_1.jpg" width="244" border="0" /></a> </p>  <p>- Click <em>Next</em></p>  <p>- Select Text as the Request Message Type, leave the Response Message Type as none (sending email is a one-way service) and then click <em>Next</em>.</p>  <p>- On the next screen, select the Protocol as email and set the Endpoint URI to be mailto:<em>&lt;email address you want the service to send email to&gt; </em>and click <em>Add:</em></p>  <p><a href="http://dev2dev.bea.com/blog/ctomkins/WindowsLiveWriter/Emailbusinessservice_7955/emailBusinessService2_2.jpg"><img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="78" alt="emailBusinessService2" src="http://dev2dev.bea.com/blog/ctomkins/WindowsLiveWriter/Emailbusinessservice_7955/emailBusinessService2_thumb.jpg" width="244" border="0" /></a> </p>  <p>- Click <em>Next</em></p>  <p>- 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.</p>  <p><a href="http://dev2dev.bea.com/blog/ctomkins/WindowsLiveWriter/Emailbusinessservice_7955/emailBusinessService3_2.jpg"><img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="110" alt="emailBusinessService3" src="http://dev2dev.bea.com/blog/ctomkins/WindowsLiveWriter/Emailbusinessservice_7955/emailBusinessService3_thumb.jpg" width="244" border="0" /></a> </p>  <p>- Click <em>Next</em>, review the summary and then click <em>Save</em>.</p>  <p>- Click <em>Activate</em> to enforce these changes to AquaLogic Service Bus.</p>  <p>- Enter a description and click <em>Submit</em>.</p>  <p>You have now successfully created an email business service which you can use to send email from AquaLogic 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.</p>  <p>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.</p>]]>
        
    </content>
</entry>
<entry>
    <title>Exposing a new service via AquaLogic Service Bus</title>
    <link rel="alternate" type="text/html" href="http://dev2dev.bea.com/blog/ctomkins/archive/2007/12/exposing_a_new_service_via_aqu.html" />
    <id>http://dev2dev.bea.com/blog/ctomkins/archive/2007/12/exposing_a_new_service_via_aqu.html</id>
    
    <published>2007-12-06T16:48:25Z</published>
    <updated>2007-12-06T16:48:47Z</updated>
    
    <summary>In my previous post I discussed how to add a service to AquaLogic Service Bus. This post takes the example one step further and discusses how you may expose this as a new service with a different endpoint.</summary>
    <author>
        <name>ctomkins</name>
        
    </author>
            <category term="Product: AquaLogic Service Bus" />
            <category term="Technology: Service-oriented Architecture" />
    
    <content type="html" xml:lang="en" xml:base="http://dev2dev.bea.com/blog/ctomkins/">
        <![CDATA[<p>In my <a href="http://dev2dev.bea.com/blog/ctomkins/archive/2007/11/adding_a_service_to_aqualogic.html" target="_blank">previous post</a> I talked about how to add a service to <a title="AquaLogic Service Bus" href="http://dev2dev.bea.com/alservicebus/" target="_blank">AquaLogic Service Bus</a>. In this post I am going to explain the typical next step: how to take this business service and expose it as a new service. </p>  <p>&quot;But why can't my service consumers connect directly to my business service, without the need for AquaLogic Service Bus?&quot; I hear you say. The answer is - they could, however the result is a <a href="http://www.serviceoriented.org/tightly_coupled.html" target="_blank">tightly coupled</a>, point-to-point solution where any change to either the service consumer or business service will almost certainly require a change in the other - not very practical if you have a number of service consumers or you are not in control of both the service consumer(s) and business service.</p>  <p>AquaLogic Service Bus addresses this problem through the notion of a <a href="http://e-docs.bea.com/alsb/docs26/consolehelp/proxyservices.html" target="_blank">Proxy Service</a> - a new service created on the bus which describes how your business service(s) are exposed to your service consumer(s). As well as providing <a href="http://www.serviceoriented.org/loosely_coupled.html" target="_blank">loose coupling</a> between the service consumer(s) and business service(s), proxy services are a good place to implement any mediation of service requests (and/or responses), such as validation, enrichment, transformation (of both data and protocol) and routing. Encapsulating this mediation logic within the proxy service allows it to be changed more easily than if it was part of the service consumer or business service and helps maximises the reusability of both service consumer and business service.</p>  <p>Now we understand the purpose and benefits of having a proxy service, lets continue with the example from my previous post and create a proxy service for our Currency Converter business service (feel free to follow similar steps for your own business service). In this proxy service we are going to expose a service with the same interface but with a different service (endpoint) address - a simple example but one which demonstrates the concepts and reflects a common business scenario.</p>  <p>The first step is to start a new session so we can make changes which we do by clicking <em>New</em> in Change Center.</p>  <p>Next, using Project Explorer we navigate to the project we created (Adding a service to AquaLogic Service Bus) and create a new folder called Proxy Services by entering Proxy Services in the Enter New Folder Name box and clicking <em>Add Folder</em>. You should now have a screen that looks like:</p>  <p><a href="http://dev2dev.bea.com/blog/ctomkins/WindowsLiveWriter/ExposinganewserviceviaAquaLogicServiceBu_D266/folderViewShowingProxyServicesFolder_2.jpg"><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="116" alt="folderViewShowingProxyServicesFolder" src="http://dev2dev.bea.com/blog/ctomkins/WindowsLiveWriter/ExposinganewserviceviaAquaLogicServiceBu_D266/folderViewShowingProxyServicesFolder_thumb.jpg" width="244" border="0" /></a> </p>  <p>Move into the newly created directory by clicking on Proxy Services and select the Proxy Service option from the Create Resource drop down.</p>  <p>This is the page where we can name the proxy service, provide a description of it and most importantly describe what type of service it is - whether it is a web service, a messaging service, an XML service or a SOAP service without a concrete interface. AquaLogic Service Bus also provides a convenient option to create a proxy service based on an existing business service which will create a proxy service with the same interface as the business service. This is the option we are going to use here. Complete the screen as follows:</p>  <p><a href="http://dev2dev.bea.com/blog/ctomkins/WindowsLiveWriter/ExposinganewserviceviaAquaLogicServiceBu_D266/createProxyService_2.jpg"><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="132" alt="createProxyService" src="http://dev2dev.bea.com/blog/ctomkins/WindowsLiveWriter/ExposinganewserviceviaAquaLogicServiceBu_D266/createProxyService_thumb.jpg" width="244" border="0" /></a> </p>  <p>Note:&#160; To complete the create from existing business service box just select the <em>Browse</em> button and select the business service - CurrencyConverterBS.</p>  <p>Click <em>Next</em>.</p>  <p>On the next screen you will be asked some more questions about your proxy service, such as which protocol should it use (in this case we choose http, the same as the business service), the endpoint URI (this is the service endpoint address we are going to modify) and whether you need access to the header information within the service request (in this case we don't). The completed screen should look like:</p>  <p><a href="http://dev2dev.bea.com/blog/ctomkins/WindowsLiveWriter/ExposinganewserviceviaAquaLogicServiceBu_D266/createProxyService2_2.jpg"><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="80" alt="createProxyService2" src="http://dev2dev.bea.com/blog/ctomkins/WindowsLiveWriter/ExposinganewserviceviaAquaLogicServiceBu_D266/createProxyService2_thumb.jpg" width="244" border="0" /></a> </p>  <p>Note: Feel free to set the endpoint URI to something of your choice.</p>  <p>This is all we need to configure for our proxy service so just go ahead and click the <em>Last</em> button and check your summary looks something like:</p>  <p><a href="http://dev2dev.bea.com/blog/ctomkins/WindowsLiveWriter/ExposinganewserviceviaAquaLogicServiceBu_D266/proxyServiceSummary_2.jpg"><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="139" alt="proxyServiceSummary" src="http://dev2dev.bea.com/blog/ctomkins/WindowsLiveWriter/ExposinganewserviceviaAquaLogicServiceBu_D266/proxyServiceSummary_thumb.jpg" width="244" border="0" /></a> </p>  <p>Click <em>Save.</em></p>  <p>So what has happened here? AquaLogic Service Bus has created a new service for us with the same interface and transport protocol as the original business service, but with a different endpoint address. It has also created a message flow which routes any requests sent to the new proxy service to the backend business service. </p>  <p>Open up the message flow for the newly created proxy service to see how this is done. Using Project Explorer, find the proxy service and then click on the message flow icon (<a href="http://dev2dev.bea.com/blog/ctomkins/WindowsLiveWriter/ExposinganewserviceviaAquaLogicServiceBu_D266/messageFlowIcon_2.jpg"><img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="24" alt="messageFlowIcon" src="http://dev2dev.bea.com/blog/ctomkins/WindowsLiveWriter/ExposinganewserviceviaAquaLogicServiceBu_D266/messageFlowIcon_thumb.jpg" width="13" border="0" /></a> ) and you should see something like the simple message flow below:</p>  <p><a href="http://dev2dev.bea.com/blog/ctomkins/WindowsLiveWriter/ExposinganewserviceviaAquaLogicServiceBu_D266/messageFlow_2.jpg"><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="145" alt="messageFlow" src="http://dev2dev.bea.com/blog/ctomkins/WindowsLiveWriter/ExposinganewserviceviaAquaLogicServiceBu_D266/messageFlow_thumb.jpg" width="196" border="0" /></a></p>  <p>The CurrencyConverterPS node handles the messages coming into and being emitted by the proxy service and the RouteTo_CurrencyConverterBS handles the routing to the existing business service.&#160; Since this is a simple use case there is just a direct wire between them - in more advanced message flows you would see more complex logic here.</p>  <p>If you left click on the RouteTo_CurrencyConverterBS node and select Edit Route you should see the details of the route node. You can see that you have the ability to add extra actions here that occur on either the request or response, but for this simple example there is no need. Simply check the box to &quot;Use inbound operation for outbound&quot; which does exactly what it says on the tin - uses the inbound operation name as the outbound operation name invoked on the business service. It also forces the <a href="http://www.w3.org/TR/2000/NOTE-SOAP-20000508/#_Toc478383528" target="_blank">SOAPAction</a> field to be set which happens to be required by this backend web service as it is implemented using <a href="http://msdn2.microsoft.com/en-gb/netframework/default.aspx" target="_blank">.NET</a>. Then click <em>Save All</em> to save your changes, and then <em>Activate</em> in the Change Center to enforce your changes to AquaLogic Service Bus. Make sure you enter a description and click <em>Submit</em>.</p>  <p>You can now test this new proxy service in the same way as my previous post, by clicking on the bug icon in the Actions column. Modify the fromCurrency to GBP and the toCurrency to USD and marvel at how many US dollars you can currently get to the British pound!</p>  <p>In this post, I've hopefully demonstrated how easy it is to expose a new service on the bus. Obviously this is a simple example, but it is a quite often used one and has demonstrated a number of the key concepts. In future posts, I will talk about some more advanced features of the product and provide some tips and also some solutions to some commonly faced problems.</p>  <div class="wlWriterSmartContent" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:15b1f769-6e31-4e1f-ba96-b74d178f5ef4" style="padding-right: 0px; display: inline; padding-left: 0px; padding-bottom: 0px; margin: 0px; padding-top: 0px">Technorati Tags: <a href="http://technorati.com/tags/Aqualogic%20service%20bus" rel="tag">Aqualogic service bus</a>,<a href="http://technorati.com/tags/esb" rel="tag">esb</a>,<a href="http://technorati.com/tags/soa" rel="tag">soa</a>,<a href="http://technorati.com/tags/services" rel="tag">services</a></div>]]>
        
    </content>
</entry>
<entry>
    <title>Adding a service to AquaLogic Service Bus</title>
    <link rel="alternate" type="text/html" href="http://dev2dev.bea.com/blog/ctomkins/archive/2007/11/adding_a_service_to_aqualogic.html" />
    <id>http://dev2dev.bea.com/blog/ctomkins/archive/2007/11/adding_a_service_to_aqualogic.html</id>
    
    <published>2007-11-15T04:05:23Z</published>
    <updated>2007-11-15T04:05:37Z</updated>
    
    <summary>Just starting with AquaLogic Service Bus and need to add a service to the bus? This post will take you through the basic steps and offer some best practices around how to do this.</summary>
    <author>
        <name>ctomkins</name>
        
    </author>
            <category term="Product: AquaLogic Service Bus" />
    
    <content type="html" xml:lang="en" xml:base="http://dev2dev.bea.com/blog/ctomkins/">
        <![CDATA[<p>A common first task for people who have installed <a href="http://www.bea.com/alsb" target="_blank">AquaLogic Service Bus</a> is to add an existing service to the bus - after all what is the point of a service bus without any services! In the remainder of this post I'll explain the basic process for doing this as it will give you a good introduction to a number of AquaLogic Service Bus concepts, which I am sure I will talk about in more detail in future posts.</p>  <p>First things first, you need to start the server by clicking on the <strong>Start Server for AquaLogic Service Bus Domain</strong> Windows shortcut under <strong>All Programs&gt;BEA Products&gt;User Projects&gt;<em>Name of your domain </em></strong>(on other platforms run the <font face="Courier New">startWebLogic</font> script from the corresponding directory on your filesystem).</p>  <p>Next you need to launch the service bus console which you can do by pointing your web browser at <a href="http://localhost:7001/sbconsole">http://localhost:7001/sbconsole</a> (note the server name and port may differ if you have changed the defaults during the install process):</p>  <p><a href="http://dev2dev.bea.com/blog/ctomkins/WindowsLiveWriter/BusinessservicevsProxyservice_CE8D/alsb-dashboard_2.jpg"><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="150" alt="alsb-dashboard" src="http://dev2dev.bea.com/blog/ctomkins/WindowsLiveWriter/BusinessservicevsProxyservice_CE8D/alsb-dashboard_thumb.jpg" width="244" border="0" /></a> </p>  <p>In order to start making any changes to the service bus you need to use the <a href="http://e-docs.bea.com/alsb/docs26/consolehelp/changecenter.html" target="_blank">Change Center</a> to activate a session (a topic for another blog post I'm sure, but basically it allows you to make a set of changes, apply them when complete, and roll them back at a later date if you so wish). To do this, just click the <em>Create</em> button in the top left of the screen.</p>  <p>Next you need to create a project to group our resources together, so click on <a href="http://e-docs.bea.com/alsb/docs26/consolehelp/projectexplorer.html" target="_blank">Project Explorer</a> in the left hand navigation, enter a new project name where prompted, e.g. Adding a service to AquaLogic Service Bus, and click the <em>Add Project</em> button. You should end up with a screen that looks like:</p>  <p><a href="http://dev2dev.bea.com/blog/ctomkins/WindowsLiveWriter/BusinessservicevsProxyservice_CE8D/project-list_2.jpg"><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="84" alt="project-list" src="http://dev2dev.bea.com/blog/ctomkins/WindowsLiveWriter/BusinessservicevsProxyservice_CE8D/project-list_thumb.jpg" width="244" border="0" /></a> </p>  <p>Now you have a project, you can give it a meaningful description and can create a set of folders to organise the artifacts we are about to create. You can add the description by clicking the project you have just created and clicking on <em>Edit Description</em>, entering some text and then clicking <em>Submit Description</em>. To add the folders, enter the folder name where prompted and then click <em>Add Folder</em>. For now, create 2 folders called: WSDL and Business Services. You should end up with a screen that looks like:</p>  <p><a href="http://dev2dev.bea.com/blog/ctomkins/WindowsLiveWriter/BusinessservicevsProxyservice_CE8D/folder-view_2.jpg"><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="99" alt="folder-view" src="http://dev2dev.bea.com/blog/ctomkins/WindowsLiveWriter/BusinessservicevsProxyservice_CE8D/folder-view_thumb.jpg" width="244" border="0" /></a> </p>  <p>At this point it is a good idea to complete the Change Center session as it means you can easily return to this point if you do something wrong at a later stage. To do this, click the green <em>Activate</em> button in Change Center and enter some descriptive text giving an overview of what you have done (this makes it easy to identify the changes later):</p>  <p><a href="http://dev2dev.bea.com/blog/ctomkins/WindowsLiveWriter/BusinessservicevsProxyservice_CE8D/changecenter_2.jpg"><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="136" alt="changecenter" src="http://dev2dev.bea.com/blog/ctomkins/WindowsLiveWriter/BusinessservicevsProxyservice_CE8D/changecenter_thumb.jpg" width="244" border="0" /></a> </p>  <p>Then click <em>Submit</em>.</p>  <p>To continue to make changes you need to create another session, so do this now by clicking <em>Create</em> in the Change Center again.</p>  <p>Next, you need to import a <a href="http://e-docs.bea.com/alsb/docs26/consolehelp/wsdls.html" target="_blank">WSDL</a>, which describes your existing service, into the WSDL folder in your project. I have selected to import an existing WSDL for a free <a href="http://www.webservicex.net/WCF/ServiceDetails.aspx?SID=18" target="_blank">CurrencyConverter</a> web service from <a href="http://www.webservicex.net" target="_blank">WebServiceX</a> which allows you to input two different currencies and find the conversion rate but you can choose any service you wish. To do this navigate to the WSDL folder via the Project Explorer, click on the <em>Create Resource</em> drop down box in the right hand section and select the <em>Resources from URL</em> option. Complete the screen that appears as follows:</p>  <p><a href="http://dev2dev.bea.com/blog/ctomkins/WindowsLiveWriter/BusinessservicevsProxyservice_CE8D/importwsdl_2.jpg"><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="87" alt="importwsdl" src="http://dev2dev.bea.com/blog/ctomkins/WindowsLiveWriter/BusinessservicevsProxyservice_CE8D/importwsdl_thumb.jpg" width="244" border="0" /></a> </p>  <p>Click <em>Next</em>, confirm the information is correct and then click <em>Import</em>.</p>  <p>Now you have the WSDL imported, it is time to create a business service - a representation of the service including both its interface and how to connect to it, which can then be re-used by other AquaLogic Service Bus services. To do this, use the Project Explorer to navigate to the Business Services folder you created earlier in the Adding a service to AquaLogic Service Bus project.</p>  <p>From the <em>Create Resource</em> drop down, choose to create a Business Service. </p>  <p>Enter a Service Name, e.g. CurrencyConverterBS and a description and then select the Service Type as a WSDL Web Service. Click the Browse button and select the CurrencyConverter WSDL and the CurrencyConverterSoap port (this service can be invoked in a number of different ways but we are going to choose SOAP this time) and click <em>Submit</em>. Your screen should now look like:</p>  <p><a href="http://dev2dev.bea.com/blog/ctomkins/WindowsLiveWriter/BusinessservicevsProxyservice_CE8D/create-business-service_2.jpg"><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="132" alt="create-business-service" src="http://dev2dev.bea.com/blog/ctomkins/WindowsLiveWriter/BusinessservicevsProxyservice_CE8D/create-business-service_thumb.jpg" width="244" border="0" /></a> </p>  <p>Note: in this case we have chosen a web service but we could just as easily have chosen another type of service at this point - the basic process is the same.</p>  <p>Click on <em>Last</em> and then, on the summary screen, click <em>Save</em>. </p>  <p>Complete the session by clicking <em>Activate</em> in Change Center, give it a description and click <em>Submit</em> - you have now added a business service to AquaLogic Service Bus.</p>  <p>The last step is to test the business service in order to check the actual service is accessible from the bus. Using the Project Explorer navigate back to the Business Services folder and click on the bug icon in the Actions column, next to the business service you created, to launch the <a href="http://e-docs.bea.com/alsb/docs26/consolehelp/testing.html" target="_blank">Test Console</a> which will allow you to define the input data to send to your service. In my case I want to use my business service to find out the currency conversion rate between British pounds (GBP) and US Dollars (USD) and so I modify the sample SOAP message to set the FromCurrency to GBP and the ToCurrency to USD. If you have chosen to use the same service as me then your Test Console should look like:</p>  <p><a href="http://dev2dev.bea.com/blog/ctomkins/WindowsLiveWriter/BusinessservicevsProxyservice_CE8D/testconsole_2.jpg"><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="244" alt="testconsole" src="http://dev2dev.bea.com/blog/ctomkins/WindowsLiveWriter/BusinessservicevsProxyservice_CE8D/testconsole_thumb.jpg" width="233" border="0" /></a> </p>  <p></p>  <p>To execute the test, simply click on <em>Execute</em> and you should see the response from your business service:</p>  <p><a href="http://dev2dev.bea.com/blog/ctomkins/WindowsLiveWriter/BusinessservicevsProxyservice_CE8D/response_2.jpg"><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="229" alt="response" src="http://dev2dev.bea.com/blog/ctomkins/WindowsLiveWriter/BusinessservicevsProxyservice_CE8D/response_thumb.jpg" width="244" border="0" /></a> </p>  <p>Congratulations, you have now added your first service to AquaLogic Service Bus! (And I have just completed my first dev2dev blog posting!)</p>  <div class="wlWriterSmartContent" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:1b750963-3255-4c06-aa61-c2e3dc6b082e" style="padding-right: 0px; display: inline; padding-left: 0px; padding-bottom: 0px; margin: 0px; padding-top: 0px">Technorati Tags: <a href="http://technorati.com/tags/aqualogic%20service%20bus" rel="tag">aqualogic service bus</a>,<a href="http://technorati.com/tags/esb" rel="tag">esb</a>,<a href="http://technorati.com/tags/soa" rel="tag">soa</a></div>]]>
        
    </content>
</entry>

</feed> 