<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
   <channel>
      <title>Chris Tomkins&apos; Blog</title>
      <link>http://blogs.oracle.com/christomkins/</link>
      <description></description>
      <language>en</language>
      <copyright>Copyright 2009</copyright>
      <lastBuildDate>Fri, 14 Aug 2009 19:13:17 +0000</lastBuildDate>
      <generator>http://www.sixapart.com/movabletype/</generator>
      <docs>http://blogs.law.harvard.edu/tech/rss</docs> 

      
      <item>
         <title>Handling the transformation of multiple message types in Oracle Service Bus</title>
         <description><![CDATA[<p><a href="http://rogervdkimmenade.blogspot.com/">Roger</a> wrote a <a href="http://rogervdkimmenade.blogspot.com/2009/08/dynamic-transformations-in-osb-10gr3.html">blog post</a> recently about my post entitled “<a href="http://blogs.oracle.com/christomkins/2008/11/dynamic_transformations_using_1.html">Dynamic transformations in Oracle Service Bus 10gR3</a>“ which got me thinking about the different ways you can handle the transformation of multiple message types in <a href="http://www.oracle.com/technology/products/integration/service-bus/index.html">Oracle Service Bus</a> and the things you should consider before selecting one approach over another. </p>  <p>Before I discuss the different solutions and their benefits/disadvantages, let me describe the basic scenario I am talking about:</p>  <p>“I have/want to be able to receive messages in a number of different message formats and transform them into a common format in order to invoke a backend service.”</p>  <p>In terms of handling this in <a href="http://www.oracle.com/technology/products/integration/service-bus/index.html">Oracle Service Bus</a> there are a number of possible solutions:</p>  <p><strong>Solution 1 – A separate proxy service for each message type</strong></p>  <p><strong>Solution 2 – A single proxy service containing if/then logic to determine the appropriate transform to apply for each message type</strong></p>  <p><strong>Solution 3 – A single proxy service which selects the appropriate transform to perform by inspecting the message type and determining the correct transform to apply at runtime </strong>(as described in <a href="http://blogs.oracle.com/christomkins/2008/11/dynamic_transformations_using_1.html">Dynamic transformations in Oracle Service Bus 10gR3</a>)</p>  <p>Before we consider why you would choose one over the other, lets make some assumptions:</p>  <p>- We have N different message types</p>  <p>- Each message type needs to be transformed into the same common data format</p>  <p>- We are invoking a single common business service</p>  <p>- We already have a message definition (WSDL, XML Schema or MFL) for the common data format </p>  <p>Now, on to the comparison:</p>  <table cellspacing="0" cellpadding="2" width="413" border="1"><tbody>     <tr>       <th valign="top" width="81">&#160;</th>        <th valign="top" width="120">Solution 1</th>        <th valign="top" width="106">Solution 2 </th>        <th valign="top" width="104">Solution 3</th>     </tr>      <tr>       <th valign="top" width="83">Number of assets to create/manage</th>        <td valign="top" width="122"><strong>3N            <br /></strong>N x Proxy services           <br />N x Transforms           <br />N x Message definitions</td>        <td valign="top" width="108"><strong>2N+1</strong>          <br />1 x Proxy service           <br />N x Transforms           <br />N x Message definitions</td>        <td valign="top" width="106"><strong>2N+1</strong>           <br />1 x Proxy service           <br />N x Transforms           <br />N x Message definitions</td>     </tr>      <tr>       <th valign="top" width="83">Work required to add N+1th message type</th>        <td valign="top" width="122">+1 Proxy service          <br />+1 Transform           <br />+1 Message definition</td>        <td valign="top" width="108">Modify existing proxy service          <br />+1 Transform           <br />+1 Message definition</td>        <td valign="top" width="108">+1 Transform          <br />+1 Message definition</td>     </tr>      <tr>       <th valign="top" width="83">Adding message type dependent logic/error handling/monitoring</th>        <td valign="top" width="122"><strong>Easy</strong> as each message type has its own proxy service           <br />          <br /></td>        <td valign="top" width="108"><strong>Possible</strong> but makes the proxy service more complex and harder to maintain</td>        <td valign="top" width="106"><strong>Possible</strong> but only by adding if/then logic which suffers from the same issues as solution 2.</td>     </tr>      <tr>       <th valign="top" width="83">Adding message type independent logic/error handling/monitoring</th>        <td valign="top" width="122"><strong>Difficult</strong> as it has to be added to each proxy service</td>        <td valign="top" width="108"><strong>Easy</strong> as this can be added outside of the if/then logic</td>        <td valign="top" width="106"><strong>Easy</strong> as everything in the proxy service is message type independent</td>     </tr>      <tr>       <th valign="top" width="83">Changing the incoming message transport/protocol</th>        <td valign="top" width="122"><strong>Difficult </strong>as every proxy service would need to be changed</td>        <td valign="top" width="108"><strong>Easy</strong> as there is only one proxy service to modify</td>        <td valign="top" width="108">As solution 2.</td>     </tr>      <tr>       <td valign="top" width="83"><strong>Message validity</strong></td>        <td valign="top" width="122">Since the proxy service interfaces will be <strong>strongly typed</strong> all messages should be valid.</td>        <td valign="top" width="108">The proxy service interface has to be <strong>weakly typed</strong> to accept multiple message types and so there is more likelihood you will have to handle invalid messages.</td>        <td valign="top" width="108">As solution 2.</td>     </tr>   </tbody></table>  <p>In conclusion, I recommend choosing:</p>  <p><strong>Solution 1</strong> – If you have lots of message type dependent logic; need to ensure messages are valid and don’t mind the maintenance overhead</p>  <p><strong>Solution 2 – </strong>If you have a few message types; don’t mind modifying the proxy service to add a new message type and don’t want the overhead of managing multiple proxy services</p>  <p><strong>Solution 3</strong> – If you have lots of different message types that change regularly and you don’t want to have to make proxy service changes to add a new message type</p>  <p>I’m keen to hear your thoughts/experiences/comments.</p>  <div class="wlWriterEditableSmartContent" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:09f0d7c9-dc4b-4492-8b4c-0c6616493dea" style="padding-right: 0px; display: inline; padding-left: 0px; float: none; padding-bottom: 0px; margin: 0px; padding-top: 0px">Technorati Tags: <a href="http://technorati.com/tags/oracle+service+bus" rel="tag">oracle service bus</a>,<a href="http://technorati.com/tags/oracle" rel="tag">oracle</a>,<a href="http://technorati.com/tags/soa+suite" rel="tag">soa suite</a>,<a href="http://technorati.com/tags/soa" rel="tag">soa</a>,<a href="http://technorati.com/tags/transformation" rel="tag">transformation</a>,<a href="http://technorati.com/tags/xquery" rel="tag">xquery</a>,<a href="http://technorati.com/tags/dynamic" rel="tag">dynamic</a></div>]]></description>
         <link>http://blogs.oracle.com/christomkins/2009/08/handling_the_transformation_of.html</link>
         <guid>http://blogs.oracle.com/christomkins/2009/08/handling_the_transformation_of.html</guid>
        
        
         <pubDate>Fri, 14 Aug 2009 19:13:17 +0000</pubDate>
      </item>
      
      <item>
         <title><![CDATA[Send an Email with a binary attachment from Oracle Service Bus &ndash; Part 4]]></title>
         <description><![CDATA[<p>When I started writing this sequence of articles on sending email from <a href="http://www.oracle.com/technology/products/integration/service-bus/index.html">Oracle Service Bus</a> I only expected to write 2 parts but following a number of requests asking how to send emails with attachments I wrote <a href="http://blogs.oracle.com/christomkins/2009/04/sending_an_email_with_an_attac.html">Part 3</a>. Now, following a number of people having problems sending email with binary attachments, I’m writing Part 4 – hopefully this will be the last one!</p>  <p>In <a href="http://blogs.oracle.com/christomkins/2009/04/sending_an_email_with_an_attac.html">Part 3</a> I explained one method for sending a binary attachment, but this relied on your proxy service being a messaging service which had an input message type of binary – fine if the only variable in your outbound email is the binary attachment, but limited if you want a number of components (e.g. subject, to address, etc. ) to be variable. </p>  <p>So, lets create a proxy service of messaging type which has an input message type of XML defined by the following XML schema:</p>  <p><font face="Courier New">&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&quot;"><font face="Courier New">http://www.w3.org/2001/XMLSchema&quot;</font></a><font face="Courier New"> targetNamespace=&quot;</font><a href="http://www.oracle.com/Email&quot;"><font face="Courier New">http://www.oracle.com/Email&quot;</font></a><font face="Courier New"> xmlns:tns=&quot;</font><a href="http://www.oracle.com/Email&quot;"><font face="Courier New">http://www.oracle.com/Email&quot;</font></a><font face="Courier New"> elementFormDefault=&quot;qualified&quot;&gt; </font></p>  <p><font face="Courier New">&#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; minOccurs=&quot;0&quot; /&gt;       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;element name=&quot;subject&quot; type=&quot;string&quot; minOccurs=&quot;0&quot; /&gt;       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;element name=&quot;body&quot; type=&quot;string&quot; minOccurs=&quot;1&quot; /&gt;       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;element name=&quot;attachment&quot; type=&quot;tns:AttachmentType&quot; minOccurs=&quot;1&quot; /&gt;       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;/sequence&gt;       <br />&#160;&#160;&#160; &lt;/complexType&gt; </font></p>  <p><font face="Courier New">&#160;&#160;&#160; &lt;complexType name=&quot;AttachmentType&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;name&quot; type=&quot;string&quot; minOccurs=&quot;1&quot; /&gt;       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;element name=&quot;type&quot; type=&quot;string&quot; minOccurs=&quot;1&quot; /&gt;       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;element name=&quot;content&quot; type=&quot;base64Binary&quot; minOccurs=&quot;1&quot; /&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><font face="Courier New"></font></p>  <p>i.e. we can specify the <font face="Courier New">to</font>, <font face="Courier New">subject</font> and <font face="Courier New">body</font> fields of the email, plus the attachment <font face="Courier New">name</font>, <font face="Courier New">type</font> and <font face="Courier New">content</font>. </p>  <p>Hopefully you won’t be surprised to see the basic structure of the proxy service message flow is very similar to that described in <a href="http://blogs.oracle.com/christomkins/2009/04/sending_an_email_with_an_attac.html">Part 3</a>:</p>  <p><a href="http://blogs.oracle.com/christomkins/WindowsLiveWriter/SendanEmailwithabinaryattachmentfromOrac_EE0C/SendEmailWithBinaryAttachmentProxyMessageFlow_2.jpg"><img title="SendEmailWithBinaryAttachmentProxyMessageFlow" style="border-top-width: 0px; display: inline; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="573" alt="SendEmailWithBinaryAttachmentProxyMessageFlow" src="http://blogs.oracle.com/christomkins/WindowsLiveWriter/SendanEmailwithabinaryattachmentfromOrac_EE0C/SendEmailWithBinaryAttachmentProxyMessageFlow_thumb.jpg" width="369" border="0" /></a> </p>  <p>Note the key differences are the addition of a Java callout (this decodes the incoming base64Binary content) and the Transport Header and Replace actions swapping places (this is only to ensure we only replace the payload of the message, once we have extracted all the pieces we are interested in).</p>  <p>The Java callout should look something like (note you may need to click on the images below to see the complete image):</p>  <p><a href="http://blogs.oracle.com/christomkins/WindowsLiveWriter/SendanEmailwithabinaryattachmentfromOrac_EE0C/java-callout-properties_4.jpg"><img title="java-callout-properties" style="border-top-width: 0px; display: inline; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="260" alt="java-callout-properties" src="http://blogs.oracle.com/christomkins/WindowsLiveWriter/SendanEmailwithabinaryattachmentfromOrac_EE0C/java-callout-properties_thumb_1.jpg" width="822" border="0" /></a> </p>  <p></p>  <p>This is basically invoking a Java method called <font face="Courier New">decode</font>, in the class <font face="Courier New">BinaryConversion<font face="times">, </font></font><font face="Times New Roman">in the package </font><font face="Courier New">com.oracle</font>, in the Jar file called <font face="Courier New">binary.jar </font>which will decode the incoming attachment content data. This is not built in functionality in Oracle Service Bus and so you will need to create this class file and Jar file yourself and add it in to your Oracle Service Bus project. The <font face="Courier New">decode</font> method should look like:</p>  <p></p>  <p></p>  <p></p>  <p></p>  <p><font face="Courier New">public static byte[] decode(String base64binary)      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; throws IOException       <br />&#160;&#160;&#160; {       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; BASE64Decoder decoder = new BASE64Decoder();       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; return decoder.decodeBuffer(base64binary);       <br />&#160;&#160;&#160; }       <br /></font></p>  <p>The Insert action properties are basically the same as in <a href="http://blogs.oracle.com/christomkins/2009/04/sending_an_email_with_an_attac.html">Part 3</a>, but with some of the hardcoded information replaced with XPath queries retrieving the information from the incoming message payload. Note the Content-Type must be a valid Internet Media type (<a href="http://en.wikipedia.org/wiki/Mime_type">MIME</a> type), e.g. for a PDF file it should be <font face="Courier New">application/pdf</font>.</p>  <p><a href="http://blogs.oracle.com/christomkins/WindowsLiveWriter/SendanEmailwithabinaryattachmentfromOrac_EE0C/insert-properties_4.jpg"><img title="insert-properties" style="border-top-width: 0px; display: inline; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="127" alt="insert-properties" src="http://blogs.oracle.com/christomkins/WindowsLiveWriter/SendanEmailwithabinaryattachmentfromOrac_EE0C/insert-properties_thumb_1.jpg" width="929" border="0" /></a> </p>  <p>The Transport Header action properties simply specify the values of the <font face="Courier New">to</font> and <font face="Courier New">subject</font> fields:</p>  <p><font face="Times New Roman"><a href="http://blogs.oracle.com/christomkins/WindowsLiveWriter/SendanEmailwithabinaryattachmentfromOrac_EE0C/transportHeaderProperties_2.jpg"><img title="transportHeaderProperties" style="border-top-width: 0px; display: inline; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="284" alt="transportHeaderProperties" src="http://blogs.oracle.com/christomkins/WindowsLiveWriter/SendanEmailwithabinaryattachmentfromOrac_EE0C/transportHeaderProperties_thumb.jpg" width="845" border="0" /></a> </font></p>  <p><font face="Times New Roman"></font></p>  <p><font face="Times New Roman"></font></p>  <p>And finally, the Replace action simply sets the body of the email to be as defined in the input message:</p>  <p><a href="http://blogs.oracle.com/christomkins/WindowsLiveWriter/SendanEmailwithabinaryattachmentfromOrac_EE0C/replace-properties_2.jpg"><img title="replace-properties" style="border-top-width: 0px; display: inline; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="227" alt="replace-properties" src="http://blogs.oracle.com/christomkins/WindowsLiveWriter/SendanEmailwithabinaryattachmentfromOrac_EE0C/replace-properties_thumb.jpg" width="699" border="0" /></a> </p>  <p></p>  <p>Note: In order to test this proxy service you will need a base64 encoded version of your attachment available. This can be obtained by using one of the many online tools such as the one available <a href="http://www.motobit.com/util/base64-decoder-encoder.asp">here</a> which allows you to select your file and then convert it to base64 (simply copy and paste the text from the top window into the attachment content field in your test input data).</p>  <p>An example test might look something like:</p>  <p>&lt;ema:Email xmlns:ema=&quot;<a href="http://www.oracle.com/Email&quot;">http://www.oracle.com/Email&quot;</a>&gt;     <br />&#160;&#160;&#160; &lt;ema:to&gt;joe.bloggs@oracle.com&lt;/ema:to&gt;     <br />&#160;&#160;&#160; &lt;ema:subject&gt;Email from OSB with binary attachment&lt;/ema:subject&gt;     <br />&#160;&#160;&#160; &lt;ema:body&gt;This is the email body&lt;/ema:body&gt;     <br />&#160;&#160;&#160; &lt;ema:attachment&gt;     <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;ema:name&gt;HelloWorld.pdf&lt;/ema:name&gt;     <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;ema:type&gt;application/pdf&lt;/ema:type&gt;     <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;ema:content&gt;JVBERi0xLjQKJcOkw7zDtsOfCjIgMCBvYmoKPDwvTGVuZ3RoIDMgMCBSL0ZpbHRlci9GbGF0ZURl     <br /></p>  <p>………<em>(extra characters removed for brevity)</em>……….</p>  <p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; CjE0MzQ5CiUlRU9GCg==&lt;/ema:content&gt;    <br />&#160;&#160;&#160; &lt;/ema:attachment&gt;     <br />&lt;/ema:Email&gt;</p>  <p>This should send an email to <a href="mailto:joe.bloggs@oracle.com">joe.bloggs@oracle.com</a>, with the subject “Email from OSB with binary attachment”, with an email body “This is the email body” and a binary attachment HelloWorld.pdf containing whatever information it contained originally (in my case simply the text HelloWorld!).</p>  <p>Hopefully this helps answer all the questions on sending emails with attachments from Oracle Service Bus – at least for now :)</p>  <div class="wlWriterEditableSmartContent" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:097944fe-766d-4860-b554-45a9aabae0a9" style="padding-right: 0px; display: inline; padding-left: 0px; float: none; padding-bottom: 0px; margin: 0px; padding-top: 0px">Technorati Tags: <a href="http://technorati.com/tags/oracle+service+bus" rel="tag">oracle service bus</a>,<a href="http://technorati.com/tags/oracle" rel="tag">oracle</a>,<a href="http://technorati.com/tags/email" rel="tag">email</a>,<a href="http://technorati.com/tags/soa+suite" rel="tag">soa suite</a>,<a href="http://technorati.com/tags/soa" rel="tag">soa</a>,<a href="http://technorati.com/tags/attachments" rel="tag">attachments</a></div>]]></description>
         <link>http://blogs.oracle.com/christomkins/2009/07/send_an_email_with_a_binary_at.html</link>
         <guid>http://blogs.oracle.com/christomkins/2009/07/send_an_email_with_a_binary_at.html</guid>
        
        
         <pubDate>Thu, 16 Jul 2009 16:50:22 +0000</pubDate>
      </item>
      
      <item>
         <title>My thoughts on service naming conventions</title>
         <description><![CDATA[<p>Customers frequently ask me “What naming conventions should I use for my services?” The problem is there isn’t really a right or wrong answer. However, let me share a few of my thoughts based on my customer experience which I hope you’ll find useful:</p>  <p><strong>Use camel case for service names</strong></p>  <p>Service names are often used by tooling to generate associated artifacts, e.g. JMS queues or endpoint URIs, or on platforms where spaces or special characters are not permitted so I highly recommend using <a href="http://en.wikipedia.org/wiki/CamelCase">camel case</a> (e.g. EachWordStartsWithACapitalLetter) to name your services as this removes the need for these characters while retaining the readability.</p>  <p><strong>Don’t reveal implementation details in the service name</strong></p>  <p>This not only has the potential to lead to confusion if you decide to change the implementation of the service, but is also a security risk as it gives the service consumer an insight into how the service may be implemented which they may be able to exploit.</p>  <p><strong>Don’t include protocol information in the service name</strong></p>  <p>This is generally unnecessary as the service advertises itself at a particular endpoint which clearly defines the protocol to be used.</p>  <p><strong>Don’t include the word service in the service name</strong></p>  <p>Would you add the word Class to every Java class you define? I’m guessing not. So why add the word service, its unnecessary.</p>  <p><strong>Don’t include a version in the service name</strong></p>  <p>Including the version number in the name of the service can also be a recipe for disaster. What happens when you decide to change the service? If the change is major and includes modifying the interface, then you will probably be happy to rename the service and inform all your service consumers of the new service endpoint. However, if the change is minor, do you really want to have to inform all your service consumers of this? If not, the same service name may actually refer to multiple versions of the service – very confusing! </p>  <p><strong>Make sure the name of the service is something sensible</strong></p>  <p>Sounds obvious enough, but I’m sure many of us have seen services called <font face="Courier New">ABCService</font> before! Naming a service like this is a bad idea for 2 reasons. Firstly, no-one is going to have any idea what the service does and so they are not going to reuse it (one of the key benefits of SOA). Secondly, if something goes wrong naming your services sensibly can aid problem diagnosis as you may be able to identify the problem area by just the name itself. </p>  <p>I have to admit, I like Thomas Erl’s suggestion of using utility-centric (e.g. <font face="Courier New">Notify</font>), task-centric (<font face="Courier New">GetProfile</font>) and entity-centric (<font face="Courier New">Customer</font>) names – read more about this in the Service Labelling section of his article on <a href="http://www.oracle.com/technology/pub/articles/erl_wsdl.html">Standardizing Service Endpoints</a>. </p>  <p><strong>Remember services can have operations</strong></p>  <p>This is not true for all services, but many types of service, e.g. web services, can include operations which can be used to group together related functions. I’d argue it makes more sense to have a single <font face="Courier New">Customer</font> service with operations such as <font face="Courier New">get</font>, <font face="Courier New">add</font>, <font face="Courier New">remove</font>, <font face="Courier New">update</font> rather than 4 services called <font face="Courier New">GetCustomer</font>, <font face="Courier New">AddCustomer</font>, <font face="Courier New">RemoveCustomer</font> and <font face="Courier New">UpdateCustomer</font>.</p>  <p><strong>Operation names don’t need to include the service context or parameters</strong></p>  <p>I regularly see operation names along the lines of <font face="Courier New">getCustomerByCustomerID</font>. Now if this is an operation on the <font face="Courier New">Customer</font> service taking in an <font face="Courier New">ID</font> parameter and returning a <font face="Courier New">Customer</font> then I’d argue calling the operation <font face="Courier New">get</font> is sufficient. </p>  <p>By no means is this a definitive list nor do I suggest you have to follow these conventions in your organisation, however I feel it’s a good starting point. I’d be interested to hear your thoughts on the ideas above and other naming conventions in use in your organisation.</p>  <p>It’s also worth noting, these naming conventions only apply to the service interface and this alone is unlikely to be sufficient to define your service fully. You should also consider defining one, or more, service contracts (typically human readable documents) which describe:</p>  <p>- What your service does</p>  <p>- Behaviour characteristics</p>  <p>- Any security requirements</p>  <p>- Performance characteristics</p>  <p>- Quality of service</p>  <p>- Usage charge</p>  <p>These documents should then be stored alongside your service interface definition in your <a href="http://www.oracle.com/technologies/soa/enterprise-repository.html">enterprise repository</a>.</p>  <div class="wlWriterEditableSmartContent" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:5a51d75c-94a9-4e07-b5d0-1688679f4cf7" style="padding-right: 0px; display: inline; padding-left: 0px; float: none; padding-bottom: 0px; margin: 0px; padding-top: 0px">Technorati Tags: <a href="http://technorati.com/tags/soa" rel="tag">soa</a>,<a href="http://technorati.com/tags/web+services" rel="tag">web services</a>,<a href="http://technorati.com/tags/naming+conventions" rel="tag">naming conventions</a>,<a href="http://technorati.com/tags/oracle" rel="tag">oracle</a></div>]]></description>
         <link>http://blogs.oracle.com/christomkins/2009/07/my_thoughts_on_service_naming.html</link>
         <guid>http://blogs.oracle.com/christomkins/2009/07/my_thoughts_on_service_naming.html</guid>
        
        
         <pubDate>Thu, 16 Jul 2009 11:38:18 +0000</pubDate>
      </item>
      
      <item>
         <title><![CDATA[Sending an Email with an attachment from Oracle Service Bus &ndash; Part 3]]></title>
         <description><![CDATA[<p></p>  <p>Some time ago I wrote a two-part blog post describing how you could use <a href="http://www.oracle.com/technology/products/integration/service-bus/index.html">Oracle Service Bus</a> to send email and thought I’d covered just about everything people wanted to know about email. However, over the last few weeks several people have asked how to send email with attachments from <a href="http://www.oracle.com/technology/products/integration/service-bus/index.html">Oracle Service Bus</a>, something I didn’t cover in those blog posts, and so this is effectively Part 3.</p>  <p>If you didn’t read my earlier blog posts on sending email (<a href="http://blogs.oracle.com/christomkins/2007/12/sending_an_email_from_oracle_s.html">Part 1</a> and <a href="http://blogs.oracle.com/christomkins/2007/12/sending_an_email_from_aqualogi.html">Part 2</a>), I suggest you read them now, as I will be referring to them in the remainder of this post. </p>  <p>Developing a service to send an email with an attachment from <a href="http://www.oracle.com/technology/products/integration/service-bus/index.html">Oracle Service Bus</a> is not much different from what I have described so far. In general, you will have an email business service which is responsible for actually sending the email (<a href="http://blogs.oracle.com/christomkins/2007/12/sending_an_email_from_oracle_s.html">Part 1</a>), and a proxy service, which routes to this email business service, responsible for defining the actual content of the email and attachment(s) (<a href="http://blogs.oracle.com/christomkins/2007/12/sending_an_email_from_aqualogi.html">Part 2</a>). The basic structure of the proxy service message flow for sending an email with an attachment will look something like:</p>  <p><a href="http://blogs.oracle.com/christomkins/WindowsLiveWriter/SendinganEmailwithanattachmentfromOracle_A79A/emailWithAttachment_2.jpg"><img title="emailWithAttachment" style="border-top-width: 0px; display: inline; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="561" alt="emailWithAttachment" src="http://blogs.oracle.com/christomkins/WindowsLiveWriter/SendinganEmailwithanattachmentfromOracle_A79A/emailWithAttachment_thumb.jpg" width="396" border="0" /></a> </p>  <p>We have a single Route node containing a Routing action configured to send messages to our email business service. As in <a href="http://blogs.oracle.com/christomkins/2007/12/sending_an_email_from_aqualogi.html">Part 2</a>, the Request Action flow of the Routing action contains the same Replace action (to set the body of the email message) and a Transport Header action (to set the subject of the email message). The key difference here is the addition of the Insert action which describes the attachment we are going to send:</p>  <p><a href="http://blogs.oracle.com/christomkins/WindowsLiveWriter/SendinganEmailwithanattachmentfromOracle_A79A/insertProperties2_2.jpg"><img title="insertProperties2" style="border-top-width: 0px; display: inline; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="203" alt="insertProperties2" src="http://blogs.oracle.com/christomkins/WindowsLiveWriter/SendinganEmailwithanattachmentfromOracle_A79A/insertProperties2_thumb.jpg" width="1111" border="0" /></a> </p>  <p>As you can see in the image above, we are setting the first child element of the attachments context variable to be the XML expression in the yellow box. This expression is the key to sending an attachment, so lets look at it in more detail:</p>  <p><font face="Courier New">&lt;con:attachment xmlns:con=”http://www.bea.com/wli/sb/context”&gt;….&lt;/con:attachment&gt;</font></p>  <p>This is the wrapper element required for any attachment.</p>  <p><font face="Courier New">&lt;con:Content-Type&gt;text/plain&lt;/con:Content-Type&gt;</font></p>  <p>This element defines the Internet media type (aka <a href="http://en.wikipedia.org/wiki/Mime_type">MIME type</a>) of the attachment – in this case a simple text file attachment.</p>  <p><font face="Courier New">&lt;con:Content-Disposition&gt;attachment; filename=”<em>Simple.txt</em>”&lt;/con:Content-Disposition&gt;</font></p>  <p>This element specifies how the attachment should be handled by the recipient – in this case as an attachment (as opposed to being inline) with a filename of <em>Simple.txt</em>.</p>  <p><font face="Courier New">&lt;con:body&gt;<em>I am the attachment contents</em>&lt;/con:body&gt;</font></p>  <p>This element represents the actual contents of the attachment.</p>  <h4><strong>But I don’t want the filename and/or contents to be hardcoded?</strong></h4>  <p>Then simply replace the static values with XPath expressions which will evaluate to the filename and/or contents of your attachment, for example:</p>  <p><font face="Courier New">&lt;con:attachment xmlns:con=&quot;</font><a href="http://www.bea.com/wli/sb/context&quot;"><font face="Courier New">http://www.bea.com/wli/sb/context&quot;</font></a><font face="Courier New">&gt;      <br />&#160; &lt;con:Content-Type&gt;text/plain&lt;/con:Content-Type&gt;       <br />&#160; &lt;con:Content-Disposition&gt;attachment; filename=&quot;{$body/email/attachment/filename/text()}&quot;&lt;/con:Content-Disposition&gt;       <br />&#160; &lt;con:body&gt;{$body/email/attachment/contents/text()}&lt;/con:body&gt;       <br />&lt;/con:attachment&gt;</font></p>  <p>Note the use of the curly braces to ensure this is evaluated as an XPath expression and not just text.</p>  <h4><strong>What if my attachment isn’t text?</strong></h4>  <p>If your attachment is a binary attachment, such as a PDF, Microsoft Office Document or image, your Insert action properties will be exactly the same, apart from the XML expression which will be slightly different. For example, lets imagine we want to send an attachment called Simple.pdf, our expression will look something like:</p>  <p><font face="Courier New">&lt;con:attachment xmlns:con=&quot;</font><a href="http://www.bea.com/wli/sb/context&quot;"><font face="Courier New">http://www.bea.com/wli/sb/context&quot;</font></a><font face="Courier New">&gt;      <br />&#160; &lt;con:Content-Type&gt;application/pdf&lt;/con:Content-Type&gt;       <br />&#160; &lt;con:Content-Transfer-Encoding&gt;base64&lt;/con:Content-Transfer-Encoding&gt;       <br />&#160; &lt;con:Content-Disposition&gt;attachment; filename=&quot;Simple.pdf&quot;&lt;/con:Content-Disposition&gt;       <br />&#160; &lt;con:body&gt;{$body/ctx:binary-content}&lt;/con:body&gt;       <br />&lt;/con:attachment&gt;</font></p>  <p>Note the differences from our earlier example:</p>  <p>- The Internet media type (the <font face="Courier New">Content-Type</font> element) is now the one for a PDF file: <font face="Courier New">application/pdf</font> (for other types of attachment refer to the list of Internet media types <a href="http://en.wikipedia.org/wiki/Internet_media_type">here</a> to see what this value should be set to)</p>  <p>- We have added a <font face="Courier New">Content-Transfer-Encoding</font> element which describes how the attachment is encoded (normally in Oracle Service Bus this will be <font face="Courier New">base64</font>).</p>  <p>- The <font face="Courier New">body</font> element (remember this is of the attachment) refers to the binary content within the body of the original message. </p>  <h4><strong>But how would I get binary content in the body of the message in the first place?</strong></h4>  <p>The simplest way is to make sure your proxy service is a messaging service, using the file transport, expecting an input message of type binary (e.g. a binary file placed in a folder). <a href="http://www.oracle.com/technology/products/integration/service-bus/index.html">Oracle Service Bus</a> would read in this file and create a reference to the binary file contained within the <font face="Courier New">ctx:binary-content</font> element within the body. Alternatively, your proxy service may be reading in email which contains binary attachments already.</p>  <p>You can read more about how binary content is handled in Oracle Service Bus <a href="http://download.oracle.com/docs/cd/E13159_01/osb/docs10gr3/userguide/context.html#wp1104506">here in the documentation</a>.</p>  <h4><strong>How can I send multiple attachments?</strong></h4>  <p>Simply add another Insert action to insert another attachment to the attachments variable. Unless you are worried about the order of the attachments (only likely for inline attachments) then the only piece that will be different is the content of the XML expression.</p>&#160;&#160;&#160; <p>So, in summary I have shown how to:</p>  <p>- Build a proxy service to send an email with an attachment from <a href="http://www.oracle.com/technology/products/integration/service-bus/index.html">Oracle Service Bus</a></p>  <p>- Configure the Insert action to:</p>  <blockquote>   <p>- Send a text or binary attachment</p> </blockquote>  <blockquote>   <p>- Dynamically set the filename and contents of the attachments</p> </blockquote>  <p>- Send an email with multiple attachments</p>  <p>If you have anymore questions about how to use the email capabilities of <a href="http://www.oracle.com/technology/products/integration/service-bus/index.html">Oracle Service Bus</a>, then let me know by commenting.</p>  <div class="wlWriterEditableSmartContent" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:3605fed4-cd01-400d-a5e3-0a9026b8f949" style="padding-right: 0px; display: inline; padding-left: 0px; float: none; padding-bottom: 0px; margin: 0px; padding-top: 0px">Technorati Tags: <a href="http://technorati.com/tags/enterprise+service+bus" rel="tag">enterprise service bus</a>,<a href="http://technorati.com/tags/oracle+service+bus" rel="tag">oracle service bus</a>,<a href="http://technorati.com/tags/soa+suite" rel="tag">soa suite</a>,<a href="http://technorati.com/tags/fusion+middleware" rel="tag">fusion middleware</a>,<a href="http://technorati.com/tags/soa" rel="tag">soa</a>,<a href="http://technorati.com/tags/smtp" rel="tag">smtp</a>,<a href="http://technorati.com/tags/email" rel="tag">email</a>,<a href="http://technorati.com/tags/mime" rel="tag">mime</a>,<a href="http://technorati.com/tags/attachments" rel="tag">attachments</a></div>]]></description>
         <link>http://blogs.oracle.com/christomkins/2009/04/sending_an_email_with_an_attac.html</link>
         <guid>http://blogs.oracle.com/christomkins/2009/04/sending_an_email_with_an_attac.html</guid>
        
        
         <pubDate>Thu, 02 Apr 2009 14:18:42 +0000</pubDate>
      </item>
      
      <item>
         <title>Dynamic transformations using Oracle Service Bus 10gR3</title>
         <description><![CDATA[<p>One of the new features in <a href="http://www.oracle.com/technologies/soa/service-bus.html" target="_blank">Oracle Service Bus</a> 10gR3, and one commonly requested by customers, is the ability to choose the transformation to apply to a message based on runtime information - also known as dynamic transformations. </p>  <p>In the previous version of <a href="http://www.oracle.com/technologies/soa/service-bus.html" target="_blank">Oracle Service Bus</a> you could only specify the transformation to be performed on the message at design time which may have resulted in:</p>  <p>- Multiple proxy services performing the same mediation logic, but applying different transformations</p>  <p>- A proxy service message flow containing a for loop with a number of cases each performing a different transformation</p>  <p>These scenarios can easily be handled when the number of transformations is small and/or doesn't change regularly but both scenarios involve modifying or creating a proxy service just to add a new transformation. Dynamic transformations allow you to define a proxy service which can handle new transformations being added at a later date. </p>  <p>Let's look at how we might implement a typical scenario where a proxy service accepts multiple versions of a message and applies an appropriate transformation based on the version of the message (determined by the namespace of the root element) in order to convert the message into a common format.</p>  <p>First create a new Oracle Service Bus project called DynamicTransformation (File&gt;New&gt;Oracle Service Bus Project, enter a name of DynamicTransformation and click Finish)</p>  <p>Then create a new schema file called Customer.xsd (File&gt;New&gt;Other&gt;XML Schema) and define the common format with the target namespace <a title="http://www.oracle.com/Customer" href="http://www.oracle.com/Customer">http://www.oracle.com/Customer</a> and the following structure:</p>  <p><a href="http://blogs.oracle.com/christomkins/WindowsLiveWriter/DynamictransformationsusingOracleService_F3A9/customer_common_format_2.jpg"><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="233" alt="customer_common_format" src="http://blogs.oracle.com/christomkins/WindowsLiveWriter/DynamictransformationsusingOracleService_F3A9/customer_common_format_thumb.jpg" width="219" border="0" /></a> </p>  <p>Now define a CustomerApplication business service which accepts messages in this format (File&gt;New&gt;Business Service, enter a name of CustomerApplication and click Finish)</p>  <p>Now in the main editor pane, select the General tab for this service and make sure it is defined as a Messaging Service.</p>  <p>Now move to the Messaging tab, set the Request Type to XML and click the Browse button to select the Customer element from Customer.xsd as the message format definition:</p>  <p>Now move to the Transport tab:</p>  <p>- Select the protocol as JMS</p>  <p>- Click Add to accept the default URL or modify it to point to a valid JMS endpoint </p>  <p>(NB. You will need to ensure the connection factory and queue specified in this JMS endpoint exist. If you accept the default, and are running on the default port of 7001 you should only need to create a JMS queue with a JNDI name of CustomerApplicationRequest on the WebLogic Server instance underpinning your Service Bus instance as the connection factory is created for you).</p>  <p>Now move to the JMS Transport tab:</p>  <p>- Select the Message Type as Text and leave the other values as their defaults.</p>  <p>Now test this business service is working as expected by right clicking on it in the Project Explorer and selecting Run As. When the Select Tasks dialog box appears, just click Finish. This should launch the Test Console. </p>  <p>Enter some sample data (the Test Console should have generated the structure for you) and then click Execute.</p>  <p><a href="http://blogs.oracle.com/christomkins/WindowsLiveWriter/DynamictransformationsusingOracleService_F3A9/business_service_testing_customer_application_2.jpg"><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="309" alt="business_service_testing_customer_application" src="http://blogs.oracle.com/christomkins/WindowsLiveWriter/DynamictransformationsusingOracleService_F3A9/business_service_testing_customer_application_thumb.jpg" width="482" border="0" /></a> </p>  <p>This should succeed but without a response (this is a one way service and the message has been placed on the CustomerApplicationRequest queue). Navigate to the CustomerApplicationJMS queue and check it contains your message:</p>  <p><a href="http://blogs.oracle.com/christomkins/WindowsLiveWriter/DynamictransformationsusingOracleService_F3A9/customer_application_request_2.jpg"><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="337" alt="customer_application_request" src="http://blogs.oracle.com/christomkins/WindowsLiveWriter/DynamictransformationsusingOracleService_F3A9/customer_application_request_thumb.jpg" width="676" border="0" /></a> </p>  <p>Next create a new schema file called CustomerV1.xsd and define the CustomerV1 format to be in the <a title="http://www.oracle.com/CustomerV1" href="http://www.oracle.com/CustomerV1">http://www.oracle.com/CustomerV1</a> target namespace and have the following structure:</p>  <p><a href="http://blogs.oracle.com/christomkins/WindowsLiveWriter/DynamictransformationsusingOracleService_F3A9/customer_v1_2.jpg"><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="133" alt="customer_v1" src="http://blogs.oracle.com/christomkins/WindowsLiveWriter/DynamictransformationsusingOracleService_F3A9/customer_v1_thumb.jpg" width="409" border="0" /></a>&#160;</p>  <p>And one called CustomerV2.xsd defining our CustomerV2 format to be in the <a href="http://www.oracle.com/CustomerV2">http://www.oracle.com/CustomerV2</a> target namespace and have the following structure:</p>  <p><a href="http://blogs.oracle.com/christomkins/WindowsLiveWriter/DynamictransformationsusingOracleService_F3A9/customer_v2_2.jpg"><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="182" alt="customer_v2" src="http://blogs.oracle.com/christomkins/WindowsLiveWriter/DynamictransformationsusingOracleService_F3A9/customer_v2_thumb.jpg" width="420" border="0" /></a> </p>  <p>Next, lets create our transformations: Version1.xq (which converts from CustomerV1 format to the common Customer format):</p>  <p><a href="http://blogs.oracle.com/christomkins/WindowsLiveWriter/DynamictransformationsusingOracleService_F3A9/Version1_4.jpg"><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="182" alt="Version1" src="http://blogs.oracle.com/christomkins/WindowsLiveWriter/DynamictransformationsusingOracleService_F3A9/Version1_thumb_1.jpg" width="614" border="0" /></a> </p>  <p>And Version2.xq (which converts from Customer V2 format to the common Customer format):</p>  <p><a href="http://blogs.oracle.com/christomkins/WindowsLiveWriter/DynamictransformationsusingOracleService_F3A9/Version2_4.jpg"><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="196" alt="Version2" src="http://blogs.oracle.com/christomkins/WindowsLiveWriter/DynamictransformationsusingOracleService_F3A9/Version2_thumb_1.jpg" width="617" border="0" /></a> </p>  <p>NB. It is important the target namespaces and transformation filenames are named as described as this is how the correct transformation is selected.</p>  <p>So now we have our transformations and formats defined, the final step is to create our Customer proxy service (File&gt;New&gt;Proxy Service, enter name Customer and click Finish) which will actually perform the dynamic transformation.</p>  <p>In the General tab, select the Service Type to be Messaging Service.</p>  <p>In the Messaging tab, select the Request Type to be XML but don't specify a format (this is because this service can accept both V1 and V2 message formats).</p>  <p>In the Transport tab, select the Protocol to be JMS and accept the default endpoint (the queue and connection factory pointed at by this JMS endpoint will be created for you).</p>  <p>In the Message Flow tab create a message flow like the following which routes to the CustomerApplication business service:</p>  <p><a href="http://blogs.oracle.com/christomkins/WindowsLiveWriter/DynamictransformationsusingOracleService_F3A9/dynamic_transformation_message_fllow_4.jpg"><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="470" alt="dynamic_transformation_message_fllow" src="http://blogs.oracle.com/christomkins/WindowsLiveWriter/DynamictransformationsusingOracleService_F3A9/dynamic_transformation_message_fllow_thumb_1.jpg" width="366" border="0" /></a> </p>  <p>The Assign action extracts the version number (the last digit) from the namespace URI for the Customer element and stores it in the version variable:</p>  <p><a href="http://blogs.oracle.com/christomkins/WindowsLiveWriter/DynamictransformationsusingOracleService_F3A9/assign_properties_2.jpg"><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="126" alt="assign_properties" src="http://blogs.oracle.com/christomkins/WindowsLiveWriter/DynamictransformationsusingOracleService_F3A9/assign_properties_thumb.jpg" width="640" border="0" /></a> </p>  <p>NB. The XPath expression here gets the namespace URI of the Customer element (fn:namespace-uri), converts it into a string (fn:string) and then extracts the version number from the end of the string (fn:substring-after).</p>  <p>The Replace action replaces the entire contents of the body with the result of performing the XQuery transformation, the name of which is determined, in this case, by concatenating the static string DynamicTransformation/Version with the value stored in the version variable:</p>  <p><a href="http://blogs.oracle.com/christomkins/WindowsLiveWriter/DynamictransformationsusingOracleService_F3A9/replace_properties_4.jpg"><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="179" alt="replace_properties" src="http://blogs.oracle.com/christomkins/WindowsLiveWriter/DynamictransformationsusingOracleService_F3A9/replace_properties_thumb_1.jpg" width="639" border="0" /></a>&#160;</p>  <p>In order to create the Expression line you need to have clicked in the Expression field and completed the XQuery editor as follows:</p>  <p><a href="http://blogs.oracle.com/christomkins/WindowsLiveWriter/DynamictransformationsusingOracleService_F3A9/xquery_expression_editor_4.jpg"><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="543" alt="xquery_expression_editor" src="http://blogs.oracle.com/christomkins/WindowsLiveWriter/DynamictransformationsusingOracleService_F3A9/xquery_expression_editor_thumb_1.jpg" width="723" border="0" /></a> </p>  <p>The Bind Variables field defines the variable passed to the transformation. To create this simply enter the name Customer in the Add Custom Variable field and clicked Add. The XPath expression here evaluates to the Customer element within the body, irrespective of namespace.</p>  <p>After completing this, save everything and then launch the Test Console on the Customer proxy service (right click on it and select Run As).</p>  <p>Enter a CustomerV1 format message into the payload field (you can generate a sample one of these by right clicking on CustomerV1.xsd in Workshop and selecting Generate XML). </p>  <p>Then click Execute.</p>  <p>The invocation should succeed without a response - the V1 message should have been transformed to the common Customer format, the CustomerApplication business service invoked and a common Customer format message placed on the CustomerApplicationRequest JMS queue. Check the JMS queue to see this is the case.</p>  <p>Then try the same, but replace the payload with a CustomerV2 format message. This should also succeed without a response - the V2 message having been also transformed to the common Customer format and placed on the CustomerApplicationRequest JMS queue. Again, check the JMS queue to see that this is the case.</p>  <p>That's it. You've just implemented your first dynamic transformation with <a href="http://www.oracle.com/technologies/soa/service-bus.html" target="_blank">Oracle Service Bus</a> - congratulations!</p>  <p>NB. A few words of caution when adopting an approach like the one described above. Since your proxy service now has a weakly defined service contract rather than a strongly defined one you will need to describe to your service consumers the message structure(s) your service supports (probably via documentation) and also ensure you have some error handling to deal with unsupported message formats.</p>  <p>Click <a href="http://blogs.oracle.com/christomkins/dynamictransformation_sbconfig.jar" target="_blank">here</a> for the <a href="http://www.oracle.com/technologies/soa/service-bus.html" target="_blank">Oracle Service Bus</a> configuration jar, which includes the Customer proxy service, the CustomerApplication business service, the Customer XML schemas, the transformations and the sample messages.</p>  <div class="wlWriterSmartContent" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:a1d0394d-b7ac-4035-8396-7241e8110370" 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/oracle%20service%20bus" rel="tag">oracle service bus</a>,<a href="http://technorati.com/tags/enterprise%20service%20bus" rel="tag">enterprise service bus</a>,<a href="http://technorati.com/tags/xquery" rel="tag">xquery</a>,<a href="http://technorati.com/tags/dynamic%20transformation" rel="tag">dynamic transformation</a></div>]]></description>
         <link>http://blogs.oracle.com/christomkins/2008/11/dynamic_transformations_using_1.html</link>
         <guid>http://blogs.oracle.com/christomkins/2008/11/dynamic_transformations_using_1.html</guid>
        
        
         <pubDate>Mon, 17 Nov 2008 16:05:18 +0000</pubDate>
      </item>
      
      <item>
         <title>A look at Oracle Service Bus 10g Release 3</title>
         <description><![CDATA[<p>Last Friday (24th October) saw the release of Oracle Service Bus 10<em>g</em> Release 3 (download <a href="http://www.oracle.com/technology/software/products/osb/index.html?rssid=rss_otn_soft" target="_blank">here</a> and read the documentation <a href="http://download-llnw.oracle.com/docs/cd/E13159_01/osb/docs10gr3/" target="_blank">here</a>) on the <a href="http://www.oracle.com/technology/index.html" target="_blank">Oracle Technical Network (OTN)</a> - the first release of the product formerly known as AquaLogic Service Bus, since the Oracle acquisition of BEA. <a href="http://blogs.oracle.com/christomkins/WindowsLiveWriter/OracleServiceBusv10gR3_69A2/oracle_service_bus_install_screen_2.jpg"><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="142" alt="oracle_service_bus_install_screen" src="http://blogs.oracle.com/christomkins/WindowsLiveWriter/OracleServiceBusv10gR3_69A2/oracle_service_bus_install_screen_thumb.jpg" width="244" align="right" border="0" /></a></p>  <p>So what's new, apart from the version numbering :)</p>  <p><strong>Oracle branding </strong></p>  <p>The product and documentation have now been re-branded to reflect the new name, <a href="http://www.oracle.com/technologies/soa/service-bus.html" target="_blank">Oracle Service Bus</a>. NB. There are a few parts where the product's BEA heritage sneaks through, such as choosing a BEA home directory, etc. but you can expect these to disappear in future releases.</p>  <p><strong>Re-based on Oracle WebLogic Server 10gR3</strong></p>  <p><a href="http://www.oracle.com/technologies/soa/service-bus.html" target="_blank">Oracle Service Bus</a> is still built on <a href="http://www.oracle.com/technology/products/weblogic/index.html" target="_blank">WebLogic Server</a> but the version incorporated has moved up to <a href="http://www.oracle.com/technology/products/weblogic/index.html" target="_blank">WebLogic Server 10gR3</a> - the first version of <a href="http://www.oracle.com/technology/products/weblogic/index.html" target="_blank">WebLogic Server</a> since the BEA merger. This will be the version on which we aim to standardise all the relevant ex-BEA and Oracle products. </p>  <p>There are a whole raft of <a href="http://download.oracle.com/docs/cd/E12840_01/wls/docs103/notes/index.html" target="_blank">new features</a> in this version of <a href="http://www.oracle.com/technology/products/weblogic/index.html" target="_blank">WebLogic Server</a> but one which warrants specific mention here is the <a href="http://download.oracle.com/docs/cd/E12840_01/wls/docs103/jms_dotnet/index.html" target="_blank">.NET JMS client</a> which allows .NET applications to natively invoke JMS proxy services hosted on the <a href="http://www.oracle.com/technologies/soa/service-bus.html" target="_blank">Oracle Service Bus</a> - something a number of customers had been asking for.</p>  <p><strong>Action metrics</strong></p>  <p>Earlier versions of <a href="http://www.oracle.com/technologies/soa/service-bus.html" target="_blank">Oracle Service Bus</a> have allowed you to gather service and pipeline metrics using <a href="http://www.oracle.com/technologies/soa/service-bus.html" target="_blank">Oracle Service Bus</a>, i.e. the number of messages, average response time etc. but you can now drill down to the Action level as well. This is incredibly useful for identifying performance hot-spots in your proxy message flow (actions taking a long time to complete) - prime examples are service callouts, Java callouts and transformations. Visit the <a href="http://download-llnw.oracle.com/docs/cd/E13159_01/osb/docs10gr3/operations/monitoring.html" target="_blank">Monitoring Oracle Service Bus at Runtime section</a> of the documentation for more information.</p>  <p><strong>Message tracing</strong></p>  <p>When you use the Test Console to test proxy and business services hosted on <a href="http://www.oracle.com/technologies/soa/service-bus.html" target="_blank">Oracle Service Bus</a> you can see the message being traced through the message flow in the lower section. This is useful for development but not typically something that is used in production. However, operational people may want/need to enable message level tracing temporarily (at a particular level of detail) in order to help diagnose a problem. They can now do this using the new message tracing capabilities exposed in the <a href="http://www.oracle.com/technologies/soa/service-bus.html" target="_blank">Oracle Service Bus</a> console. Find out more <a href="http://download-llnw.oracle.com/docs/cd/E13159_01/osb/docs10gr3/operations/tracing.html" target="_blank">here</a>.</p>  <p><strong>Visual Debugging<a href="http://blogs.oracle.com/christomkins/WindowsLiveWriter/OracleServiceBusv10gR3_69A2/debug_perspective_2.jpg"><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="205" alt="debug_perspective" src="http://blogs.oracle.com/christomkins/WindowsLiveWriter/OracleServiceBusv10gR3_69A2/debug_perspective_thumb.jpg" width="369" align="right" border="0" /></a></strong></p>  <p>If, during development, you have often wanted to know what the values of the context variables are at a specific point in the proxy service message flow, then visual debugging is the feature you've been waiting for.&#160; Simply right click on any action in the message flow, and choose Toggle Breakpoint.&#160; Start the server in Debug mode and then right click on your proxy service and choose Debug As to launch the Test Console. Now when you execute your test, the Debug perspective will be launched showing you where you are in the message flow and the values of the variables at this point. Find out more <a href="http://download.oracle.com/docs/cd/E13159_01/osb/docs10gr3/eclipsehelp/tasks.html#wp1148241" target="_blank">here</a>.</p>  <p><strong>XOP/MTOM support</strong></p>  <p><a href="http://www.w3.org/TR/soap12-mtom/" target="_blank">Message Transmission Optimisation Mechanism (MTOM)</a> and <a href="http://www.w3.org/TR/xop10/" target="_blank">XML-Binary Optimised Packaging (XOP)</a> help boost the performance of web services transferring binary data by enabling the data to be passed through in a compact format (<a href="http://www.devx.com/xml/Article/34797" target="_blank"><font color="#000000">this article</font></a> explains the 2 standards in a bit more detail). By simply ticking a check box you can enable your proxy service to receive messages in XOP/MTOM format (find out more <a href="http://download.oracle.com/docs/cd/E13159_01/osb/docs10gr3/consolehelp/proxyservices.html#wp1316340" target="_blank"><font color="#000000">here</font></a>), or enable messages sent from <a href="http://www.oracle.com/technologies/soa/service-bus.html" target="_blank">Oracle Service Bus</a> to a business service to be in this format (find out more <a href="http://download.oracle.com/docs/cd/E13159_01/osb/docs10gr3/consolehelp/businessServices.html#wp1141706" target="_blank"><font color="#000000">here</font></a>).</p>  <p><strong>Dynamic transformations</strong></p>  <p>In earlier versions of <a href="http://www.oracle.com/technologies/soa/service-bus.html" target="_blank">Oracle Service Bus</a> when you performed an <a href="http://www.w3.org/TR/xquery/" target="_blank">XQuery</a> transformation you had to specify the name of the transformation file at runtime. This limitation was fine for most use cases however numerous customers want to be able to choose which transformation to perform on a message (typically the payload) based on the value of a field (typically in the header). This new feature allows you to dynamically specify the name of the <a href="http://www.w3.org/TR/xquery/" target="_blank">XQuery</a> transformation to be performed based on a value evaluated at runtime.</p>  <p><strong>Oracle BPEL Process Manager transport</strong></p>  <p>In the past, if you had developed business processes in <a href="http://www.oracle.com/technology/bpel/index.html" target="_blank">BPEL Process Manager</a> and were looking to expose them via <a href="http://www.oracle.com/technologies/soa/service-bus.html" target="_blank">Oracle Service Bus</a> (a good practice as it promotes loose coupling between the client and the business process itself) then you would have had to expose the business process as a web service or JMS service and then connect to them from Oracle Service bus using the standard SOAP/HTTP transport or JMS transport. This approach is fine but adds an extra, unnecessary, performance overhead. With the new version, there is a new native <a href="http://download-llnw.oracle.com/docs/cd/E13159_01/osb/docs10gr3/bpelpmtransport/index.html" target="_blank">BPEL Process Manager transport</a> enabling you to connect directly from <a href="http://www.oracle.com/technologies/soa/service-bus.html" target="_blank">Oracle Service Bus</a> to <a href="http://www.oracle.com/technology/bpel/index.html" target="_blank">BPEL Process Manager</a> through a high performance connection.</p>  <p><strong>Improved REST support</strong></p>  <p><a href="http://en.wikipedia.org/wiki/Representational_State_Transfer" target="_blank">Representational State Transfer</a> (better known as REST) is an architectural style which makes uses a combination of HTTP URLs and HTTP verbs to provide a simple, lightweight, service interface. In <a href="http://www.oracle.com/technologies/soa/service-bus.html" target="_blank">Oracle Service Bus</a> we now provide full support for exposing your proxy services as REST services and communicating with REST business services. Within a proxy service message flow you can now get easy access to a number of key pieces of information via the inbound and outbound context variables: the HTTP verb (transport/request/http:http-method); the HTTP query string (transport/request/http:query-string) and the relative URI (transport/request/http:relative-URI). When invoking a business service, you can now specify any one of the standard HTTP verbs: POST, PUT, HEAD, GET, DELETE or even specify your own custom verbs if you so wish. Find out more in the <a href="http://download-llnw.oracle.com/docs/cd/E13159_01/osb/docs10gr3/httppollertransport/index.html" target="_blank">HTTP transport</a> section. </p>  <p></p>  <p><font color="#ff0000"></font></p> <strong>IDE improvements</strong>   <p></p>  <p></p>  <p>As well as the Oracle re-branding, one of the new improvements in the IDE is the addition of a Resource Summary which gives you a summary of the resources in your <a href="http://www.oracle.com/technologies/soa/service-bus.html" target="_blank">Oracle Service Bus</a> configuration in the same way as the Resources view does through the Oracle Service Bus console. This is a particularly useful view if you have multiple projects deployed on a single <a href="http://www.oracle.com/technologies/soa/service-bus.html" target="_blank">Oracle Service Bus</a> instance.</p>  <p><strong>Split-Join Enhancements</strong></p>  <p>In the last version of <a href="http://www.oracle.com/technologies/soa/service-bus.html" target="_blank">Oracle Service Bus</a> we introduced the <a href="http://download-llnw.oracle.com/docs/cd/E13159_01/osb/docs10gr3/eclipsehelp/tasks.html#wp1145066" target="_blank">Split-Join</a> capability to allow you to break an incoming message up into a number of parts and perform mediation logic on them in parallel. Within these parallel flows we have now added the ability to perform Java callouts for custom validation, transformation, logging, etc. We have also added the ability to log data at a specified severity to the server log file and the ability to invoke one <a href="http://download-llnw.oracle.com/docs/cd/E13159_01/osb/docs10gr3/eclipsehelp/tasks.html#wp1145066" target="_blank">Split-Join</a> from another <a href="http://download-llnw.oracle.com/docs/cd/E13159_01/osb/docs10gr3/eclipsehelp/tasks.html#wp1145066" target="_blank">Split-Join</a> using a high performance mechanism. Read more <a href="http://download-llnw.oracle.com/docs/cd/E13159_01/osb/docs10gr3/eclipsehelp/tasks.html#wp1145066" target="_blank">here</a>.</p>  <p><strong>Interoperability with Oracle Web Services Manager</strong></p>  <p><a href="http://www.oracle.com/technologies/soa/service-bus.html" target="_blank">Oracle Service Bus</a> allows you to apply security policies to service hosted on the bus, whereas <a href="http://www.oracle.com/appserver/web-services-manager.html" target="_blank">Oracle Web Services Manager</a> allows you to apply security policies to services wherever they are hosted. This release sees support for <a href="http://www.oracle.com/appserver/web-services-manager.html" target="_blank">Oracle Web Services Manager</a> and <a href="http://www.oracle.com/technologies/soa/service-bus.html" target="_blank">Oracle Service Bus</a> working in conjunction. The common use cases see <a href="http://www.oracle.com/appserver/web-services-manager.html" target="_blank">Oracle Web Services Manager</a> acting as a gateway for either perimeter security, or identity propagation and acting as a client performing message protection or authentication. These use cases are described in the <a href="http://download-llnw.oracle.com/docs/cd/E13159_01/osb/docs10gr3/security/owsm.html" target="_blank">Securing Oracle Service Bus with Oracle Web Services Manager chapter</a> of the <a href="http://download-llnw.oracle.com/docs/cd/E13159_01/osb/docs10gr3/security/index.html" target="_blank">Security topic</a>. </p>  <p><strong>Streaming attachments</strong></p>  <p>In earlier versions we had support for streaming the payload of a message, but now we have added support for streaming attachments to disk. This allows you to process messages with large attachments efficiently. Find out more <a href="http://download-llnw.oracle.com/docs/cd/E13159_01/osb/docs10gr3/consolehelp/proxyservices.html#wp1316340" target="_blank">here</a>.</p>  <p><strong>JCA Adapter Framework</strong></p>  <p>Addition of the JCA adapter framework is an important, but currently invisible to the user, addition to the product. This will allow us to support the same JCA adapters as in <a href="http://www.oracle.com/technology/bpel/index.html" target="_blank">BPEL Process Manager</a>. Over the next few months we are looking to certify a few key ones of these against <a href="http://www.oracle.com/technologies/soa/service-bus.html" target="_blank">Oracle Service Bus</a>:</p>  <p>- Database    <br />- Oracle AQ     <br />- Oracle E-Business Suite     <br />- Siebel     <br />- JD Edwards     <br />- PeopleSoft     <br />- SAP</p>  <p>And eventually we will move towards supporting the same set as in <a href="http://www.oracle.com/technology/bpel/index.html" target="_blank">BPEL Process Manager</a> - incredibly useful additions to the product.</p>  <p>Congratulations to the development team and project management team on getting this completed in less than 4 month since the Oracle-BEA acquisition. Expect to see some more detailed posts on some of these aspects in the coming months.</p>  <div class="wlWriterSmartContent" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:bbaf5af4-476c-4bbf-8024-176a1dc318f6" 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/enterprise%20service%20bus" rel="tag">enterprise service bus</a>,<a href="http://technorati.com/tags/fusion%20middleware" rel="tag">fusion middleware</a>,<a href="http://technorati.com/tags/oracle%20service%20bus" rel="tag">oracle service bus</a>,<a href="http://technorati.com/tags/service%20bus" rel="tag">service bus</a>,<a href="http://technorati.com/tags/soa" rel="tag">soa</a>,<a href="http://technorati.com/tags/soa%20suite" rel="tag">soa suite</a>,<a href="http://technorati.com/tags/oracle%20webservices%20manager" rel="tag">oracle webservices manager</a>,<a href="http://technorati.com/tags/jca" rel="tag">jca</a>,<a href="http://technorati.com/tags/bpel%20process%20manager" rel="tag">bpel process manager</a>,<a href="http://technorati.com/tags/bpel" rel="tag">bpel</a></div>]]></description>
         <link>http://blogs.oracle.com/christomkins/2008/10/a_look_at_oracle_service_bus_1.html</link>
         <guid>http://blogs.oracle.com/christomkins/2008/10/a_look_at_oracle_service_bus_1.html</guid>
        
        
         <pubDate>Wed, 29 Oct 2008 11:21:31 +0000</pubDate>
      </item>
      
      <item>
         <title>Welcome back......and welcome</title>
         <description><![CDATA[<p>To those of you who used to read my <a href="http://dev2dev.bea.com/blog/ctomkins/" target="_blank">Dev2Dev blog</a> whilst I was working for <a href="http://www.bea.com" target="_blank">BEA</a>, welcome back and for those of you who are finding this blog for the first time, welcome.</p>  <p>Before I begin posting to this new blog I thought it would be a good idea to introduce myself - at least a bit more than the picture and brief job description you can see to the right :)</p>  <p>My name is Chris Tomkins and I am now a Sales Consultant in the <a href="http://www.oracle.com/products/middleware/index.html" target="_blank">Oracle Fusion Middleware</a> team, focusing on the <a href="http://www.oracle.com/technologies/soa/soa-suite.html" target="_blank">SOA Suite</a> set of products, in particular <a href="http://www.oracle.com/technologies/soa/service-bus.html" target="_blank">Oracle Service Bus</a> (based on the product formally known as AquaLogic Service Bus). Before the <a href="http://www.oracle.com" target="_blank">Oracle</a> acquisition of <a href="http://www.bea.com" target="_blank">BEA</a> I spent 8 months working as a Senior Systems Engineer in Pre-Sales as a technology specialist on the AquaLogic Service Bus product and before that 8 years at <a href="http://www.ibm.com" target="_blank">IBM</a> working in a number of development and testing roles before spending my last 3 years working on <a href="http://www.ibm.com/software/integration/wsesb/" target="_blank">WebSphere ESB</a> in a number of roles culminating in leading the Customer SWAT team.</p>  <p>In terms of this blog I plan to post how to solve common customer problems using the products in the <a href="http://www.oracle.com/technologies/soa/soa-suite.html" target="_blank">SOA Suite</a>, and some answers to commonly asked customer questions. My aim is to do this in such a way that someone with little experience of the products can make sense of them (I don't expect any of my readers to be product experts!). If you have a problem or question then don't hesitate to post it here and I'll try to do my best to answer it. Also, if you don't understand something in one of my posts, then just add a comment explaining your issue and I'll try to explain things more clearly - I really appreciate reader feedback.</p>  <p>If you are keen to know what the future product strategy and roadmap is following the Oracle and BEA merger, and didn't watch it live on 1st July, then I strongly advise you to take watch <a href="http://www.oracle.com/go/?&amp;Src=6652055&amp;Act=32&amp;pcode=NAMK08059764MPP001" target="_blank">Thomas Kurian's webcast</a>. The view from the blogosphere and from customers I've spoken to so far seems to be very positive and all of us in <a href="http://www.oracle.com" target="_blank">Oracle</a> and really excited about the future.</p>  <p>Enjoy reading!</p>  <div class="wlWriterSmartContent" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:9a33216f-bcf9-4e4b-b152-7fab13006215" 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/enterprise%20service%20bus" rel="tag">enterprise service bus</a>,<a href="http://technorati.com/tags/soa%20suite" rel="tag">soa suite</a>,<a href="http://technorati.com/tags/soa" rel="tag">soa</a>,<a href="http://technorati.com/tags/fusion%20middleware" rel="tag">fusion middleware</a>,<a href="http://technorati.com/tags/oracle%20service%20bus" rel="tag">oracle service bus</a></div>]]></description>
         <link>http://blogs.oracle.com/christomkins/2008/07/welcome_backand_welcome.html</link>
         <guid>http://blogs.oracle.com/christomkins/2008/07/welcome_backand_welcome.html</guid>
        
        
          <category domain="http://www.sixapart.com/ns/types#tag">enterprise service bus</category>
        
          <category domain="http://www.sixapart.com/ns/types#tag">fusion middleware</category>
        
          <category domain="http://www.sixapart.com/ns/types#tag">oracle service bus</category>
        
          <category domain="http://www.sixapart.com/ns/types#tag">soa</category>
        
          <category domain="http://www.sixapart.com/ns/types#tag">soa suite</category>
        
         <pubDate>Wed, 09 Jul 2008 10:31:12 +0000</pubDate>
      </item>
      
      <item>
         <title>Load balancing in Oracle Service Bus v3.0 (Part 2)</title>
         <description><![CDATA[<p><strong>Note:</strong> This post was first published before <a href="http://www.oracle.com">Oracle</a> merged with <a href="http://www.bea.com">BEA</a> when the <a href="http://www.oracle.com/technologies/soa/service-bus.html">Oracle Service Bus</a> product was known as AquaLogic Service Bus, hence the occasional reference to BEA and AquaLogic Service Bus.</p>  <p>In the <a href="http://blogs.oracle.com/christomkins/2008/07/load_balancing_in_oracle_servi.html" target="_blank">last post</a> I demonstrated how to configure a business service in <a href="http://www.oracle.com/technologies/soa/service-bus.html" target="_blank">Oracle 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, <a href="http://www.oracle.com/technologies/soa/service-bus.html" target="_blank">Oracle Service Bus</a> 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://blogs.oracle.com/christomkins/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://blogs.oracle.com/christomkins/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 href="http://www.oracle.com/technologies/soa/service-bus.html" target="_blank">Oracle 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://blogs.oracle.com/christomkins/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://blogs.oracle.com/christomkins/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://blogs.oracle.com/christomkins/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://blogs.oracle.com/christomkins/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://blogs.oracle.com/christomkins/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://blogs.oracle.com/christomkins/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://blogs.oracle.com/christomkins/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://blogs.oracle.com/christomkins/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:433f15cb-ab37-4ab4-b970-c6d60c7ceaf3" 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/enterprise%20service%20bus" rel="tag">enterprise service bus</a>,<a href="http://technorati.com/tags/oracle%20service%20bus" rel="tag">oracle service bus</a>,<a href="http://technorati.com/tags/soa%20suite" rel="tag">soa suite</a>,<a href="http://technorati.com/tags/fusion%20middleware" rel="tag">fusion middleware</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>]]></description>
         <link>http://blogs.oracle.com/christomkins/2008/06/load_balancing_in_aqualogic_se.html</link>
         <guid>http://blogs.oracle.com/christomkins/2008/06/load_balancing_in_aqualogic_se.html</guid>
        
        
          <category domain="http://www.sixapart.com/ns/types#tag">enterprise service bus</category>
        
          <category domain="http://www.sixapart.com/ns/types#tag">fusion middleware</category>
        
          <category domain="http://www.sixapart.com/ns/types#tag">load balancing</category>
        
          <category domain="http://www.sixapart.com/ns/types#tag">oracle service bus</category>
        
          <category domain="http://www.sixapart.com/ns/types#tag">soa</category>
        
          <category domain="http://www.sixapart.com/ns/types#tag">soa suite</category>
        
         <pubDate>Fri, 06 Jun 2008 20:43:26 +0000</pubDate>
      </item>
      
      <item>
         <title>Load balancing in Oracle Service Bus (Part 1)</title>
         <description><![CDATA[<p><strong>Note:</strong> This post was first published before <a href="http://www.oracle.com">Oracle</a> merged with <a href="http://www.bea.com">BEA</a> when the <a href="http://www.oracle.com/technologies/soa/service-bus.html">Oracle Service Bus</a> product was known as AquaLogic Service Bus, hence the occasional reference to BEA and AquaLogic Service Bus.</p>  <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 <a href="http://www.oracle.com/technologies/soa/service-bus.html" target="_blank">Oracle Service Bus</a> 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 <a href="http://www.oracle.com/technologies/soa/service-bus.html" target="_blank">Oracle Service Bus</a> 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://blogs.oracle.com/christomkins/2008/04/oracle_service_bus_v30_getting.html" target="_blank">Oracle Service Bus - 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://blogs.oracle.com/christomkins/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://blogs.oracle.com/christomkins/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://blogs.oracle.com/christomkins/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://blogs.oracle.com/christomkins/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://blogs.oracle.com/christomkins/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://blogs.oracle.com/christomkins/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://blogs.oracle.com/christomkins/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://blogs.oracle.com/christomkins/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://blogs.oracle.com/christomkins/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://blogs.oracle.com/christomkins/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 <a href="http://www.oracle.com/technologies/soa/service-bus.html" target="_blank">Oracle Service Bus</a> v3.0.</p>  <div class="wlWriterSmartContent" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:3b9cff42-3917-4dee-bb09-60945672f811" 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/enterprise%20service%20bus" rel="tag">enterprise service bus</a>,<a href="http://technorati.com/tags/oracle%20service%20bus" rel="tag">oracle service bus</a>,<a href="http://technorati.com/tags/soa%20suite" rel="tag">soa suite</a>,<a href="http://technorati.com/tags/fusion%20middleware" rel="tag">fusion middleware</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>]]></description>
         <link>http://blogs.oracle.com/christomkins/2008/04/load_balancing_in_oracle_servi.html</link>
         <guid>http://blogs.oracle.com/christomkins/2008/04/load_balancing_in_oracle_servi.html</guid>
        
        
          <category domain="http://www.sixapart.com/ns/types#tag">enterprise service bus</category>
        
          <category domain="http://www.sixapart.com/ns/types#tag">fusion middleware</category>
        
          <category domain="http://www.sixapart.com/ns/types#tag">load balancing</category>
        
          <category domain="http://www.sixapart.com/ns/types#tag">oracle service bus</category>
        
          <category domain="http://www.sixapart.com/ns/types#tag">soa</category>
        
          <category domain="http://www.sixapart.com/ns/types#tag">soa suite</category>
        
         <pubDate>Thu, 17 Apr 2008 20:54:00 +0000</pubDate>
      </item>
      
      <item>
         <title>Oracle Service Bus - Getting started with Workspace Studio</title>
         <description><![CDATA[<p><strong>Note:</strong> This post was first published before <a href="http://www.oracle.com">Oracle</a> merged with <a href="http://www.bea.com">BEA</a> when the <a href="http://www.oracle.com/technologies/soa/service-bus.html">Oracle Service Bus</a> product was known as AquaLogic Service Bus, hence the occasional reference to BEA and AquaLogic Service Bus.</p>  <p>One of the major changes in <a href="http://www.oracle.com/technologies/soa/service-bus.html" target="_blank">Oracle Service Bus</a> 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 a service bus project, how to start creating service bus 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://blogs.oracle.com/christomkins/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://blogs.oracle.com/christomkins/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://blogs.oracle.com/christomkins/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://blogs.oracle.com/christomkins/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 Oracle 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://blogs.oracle.com/christomkins/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://blogs.oracle.com/christomkins/WindowsLiveWriter/AquaLogicServiceBusv3DoingthingsinWorksp_E094/defineNewServer_thumb.jpg" width="243" border="0" /></a> </p>  <p>- Keep the default of BEA WebLogic Server v10.0 (<a href="http://www.oracle.com/technologies/soa/service-bus.html" target="_blank">Oracle Service Bus</a> v3.0 is built on this version of WebLogic Server) and click the Next button.</p>  <p><a href="http://blogs.oracle.com/christomkins/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://blogs.oracle.com/christomkins/WindowsLiveWriter/AquaLogicServiceBusv3DoingthingsinWorksp_E094/defineNewServer2_thumb.jpg" width="243" border="0" /></a> </p>  <p>- Optional: Modify the Server name to be Oracle 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 Oracle 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://blogs.oracle.com/christomkins/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://blogs.oracle.com/christomkins/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 a Service Bus Project and 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://blogs.oracle.com/christomkins/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://blogs.oracle.com/christomkins/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://blogs.oracle.com/christomkins/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://blogs.oracle.com/christomkins/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://blogs.oracle.com/christomkins/WindowsLiveWriter/AquaLogicServiceBusv3DoingthingsinWorksp_E094/importResourceFromURL_2.jpg"><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="158" alt="importResourceFromURL" src="http://blogs.oracle.com/christomkins/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://blogs.oracle.com/christomkins/WindowsLiveWriter/AquaLogicServiceBusv3DoingthingsinWorksp_E094/createBusinessService_2.jpg"><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="244" alt="createBusinessService" src="http://blogs.oracle.com/christomkins/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://blogs.oracle.com/christomkins/WindowsLiveWriter/AquaLogicServiceBusv3DoingthingsinWorksp_E094/createProxyService_2.jpg"><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="244" alt="createProxyService" src="http://blogs.oracle.com/christomkins/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://blogs.oracle.com/christomkins/WindowsLiveWriter/AquaLogicServiceBusv3DoingthingsinWorksp_E094/createProxyService2_2.jpg"><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="244" alt="createProxyService2" src="http://blogs.oracle.com/christomkins/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://blogs.oracle.com/christomkins/WindowsLiveWriter/AquaLogicServiceBusv3DoingthingsinWorksp_E094/runOnServer_2.jpg"><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="244" alt="runOnServer" src="http://blogs.oracle.com/christomkins/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://blogs.oracle.com/christomkins/WindowsLiveWriter/AquaLogicServiceBusv3DoingthingsinWorksp_E094/testClient_2.jpg"><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="213" alt="testClient" src="http://blogs.oracle.com/christomkins/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:f9f955d2-a803-4665-83c9-6b8158eec8da" 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/enterprise%20service%20bus" rel="tag">enterprise service bus</a>,<a href="http://technorati.com/tags/oracle%20service%20bus" rel="tag">oracle service bus</a>,<a href="http://technorati.com/tags/soa%20suite" rel="tag">soa suite</a>,<a href="http://technorati.com/tags/fusion%20middleware" rel="tag">fusion middleware</a>,<a href="http://technorati.com/tags/soa" rel="tag">soa</a>,<a href="http://technorati.com/tags/eclipse" rel="tag">eclipse</a></div>]]></description>
         <link>http://blogs.oracle.com/christomkins/2008/04/oracle_service_bus_v30_getting.html</link>
         <guid>http://blogs.oracle.com/christomkins/2008/04/oracle_service_bus_v30_getting.html</guid>
        
        
          <category domain="http://www.sixapart.com/ns/types#tag">eclipse</category>
        
          <category domain="http://www.sixapart.com/ns/types#tag">enterprise service bus</category>
        
          <category domain="http://www.sixapart.com/ns/types#tag">fusion middleware</category>
        
          <category domain="http://www.sixapart.com/ns/types#tag">oracle service bus</category>
        
          <category domain="http://www.sixapart.com/ns/types#tag">soa</category>
        
          <category domain="http://www.sixapart.com/ns/types#tag">soa suite</category>
        
         <pubDate>Fri, 11 Apr 2008 20:11:44 +0000</pubDate>
      </item>
      
      <item>
         <title>Reusing data type definitions in Oracle Service Bus</title>
         <description><![CDATA[<p><strong>Note:</strong> This post was first published before <a href="http://www.oracle.com" target="_blank">Oracle</a> merged with <a href="http://www.bea.com" target="_blank">BEA</a> when the <a href="http://www.oracle.com/technologies/soa/service-bus.html" target="_blank">Oracle Service Bus</a> product was known as AquaLogic Service Bus, hence the occasional reference to BEA and AquaLogic Service Bus.</p>  <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 <a href="http://www.oracle.com/technologies/soa/service-bus.html" target="_blank">Oracle Service Bus</a> 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://blogs.oracle.com/christomkins/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://blogs.oracle.com/christomkins/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://blogs.oracle.com/christomkins/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://blogs.oracle.com/christomkins/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://blogs.oracle.com/christomkins/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://blogs.oracle.com/christomkins/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://blogs.oracle.com/christomkins/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://blogs.oracle.com/christomkins/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://blogs.oracle.com/christomkins/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://blogs.oracle.com/christomkins/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:99e7dafd-3d9a-414c-914d-b6185d5d0689" 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/enterprise%20service%20bus" rel="tag">enterprise service bus</a>,<a href="http://technorati.com/tags/oracle%20service%20bus" rel="tag">oracle service bus</a>,<a href="http://technorati.com/tags/soa%20suite" rel="tag">soa suite</a>,<a href="http://technorati.com/tags/fusion%20middleware" rel="tag">fusion middleware</a>,<a href="http://technorati.com/tags/soa" rel="tag">soa</a>,<a href="http://technorati.com/tags/wsdl" rel="tag">wsdl</a>,<a href="http://technorati.com/tags/XML" rel="tag">XML</a>,<a href="http://technorati.com/tags/schema" rel="tag">schema</a>,<a href="http://technorati.com/tags/reuse" rel="tag">reuse</a></div>]]></description>
         <link>http://blogs.oracle.com/christomkins/2008/01/reusing_data_type_definitions.html</link>
         <guid>http://blogs.oracle.com/christomkins/2008/01/reusing_data_type_definitions.html</guid>
        
        
          <category domain="http://www.sixapart.com/ns/types#tag">XML</category>
        
          <category domain="http://www.sixapart.com/ns/types#tag">enterprise service bus</category>
        
          <category domain="http://www.sixapart.com/ns/types#tag">fusion middleware</category>
        
          <category domain="http://www.sixapart.com/ns/types#tag">oracle service bus</category>
        
          <category domain="http://www.sixapart.com/ns/types#tag">reuse</category>
        
          <category domain="http://www.sixapart.com/ns/types#tag">schema</category>
        
          <category domain="http://www.sixapart.com/ns/types#tag">soa</category>
        
          <category domain="http://www.sixapart.com/ns/types#tag">soa suite</category>
        
          <category domain="http://www.sixapart.com/ns/types#tag">wsdl</category>
        
         <pubDate>Mon, 21 Jan 2008 16:06:52 +0000</pubDate>
      </item>
      
      <item>
         <title>Sending an Email from Oracle Service Bus - Part 2</title>
         <description><![CDATA[<p><strong>Note:</strong> This post was first published before <a href="http://www.oracle.com" target="_blank">Oracle</a> merged with <a href="http://www.bea.com" target="_blank">BEA</a> when the <a href="http://www.oracle.com/technologies/soa/service-bus.html" target="_blank">Oracle Service Bus</a> product was known as AquaLogic Service Bus, hence the occasional reference to BEA and AquaLogic Service Bus.</p>  <p>In my <a href="http://blogs.oracle.com/christomkins/2007/12/sending_an_email_from_oracle_s.html" target="_blank">previous post</a> I showed how easy it was to create a business service in <a href="http://www.oracle.com/technologies/soa/service-bus.html" target="_blank">Oracle Service Bus</a> which could be used to send email. If you completed the steps and created this service in your own <a href="http://www.oracle.com/technologies/soa/service-bus.html" target="_blank">Oracle Service Bus</a> 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 - 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://blogs.oracle.com/christomkins/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://blogs.oracle.com/christomkins/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://blogs.oracle.com/christomkins/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://blogs.oracle.com/christomkins/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://blogs.oracle.com/christomkins/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://blogs.oracle.com/christomkins/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://blogs.oracle.com/christomkins/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://blogs.oracle.com/christomkins/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://blogs.oracle.com/christomkins/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://blogs.oracle.com/christomkins/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:dc3b3e1b-c94e-4c45-9fe2-72ea0ae0a757" 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/enterprise%20service%20bus" rel="tag">enterprise service bus</a>,<a href="http://technorati.com/tags/oracle%20service%20bus" rel="tag">oracle service bus</a>,<a href="http://technorati.com/tags/soa%20suite" rel="tag">soa suite</a>,<a href="http://technorati.com/tags/fusion%20middleware" rel="tag">fusion middleware</a>,<a href="http://technorati.com/tags/soa" rel="tag">soa</a>,<a href="http://technorati.com/tags/smtp" rel="tag">smtp</a>,<a href="http://technorati.com/tags/email" rel="tag">email</a></div>]]></description>
         <link>http://blogs.oracle.com/christomkins/2007/12/sending_an_email_from_aqualogi.html</link>
         <guid>http://blogs.oracle.com/christomkins/2007/12/sending_an_email_from_aqualogi.html</guid>
        
        
          <category domain="http://www.sixapart.com/ns/types#tag">email</category>
        
          <category domain="http://www.sixapart.com/ns/types#tag">enterprise service bus</category>
        
          <category domain="http://www.sixapart.com/ns/types#tag">fusion middleware</category>
        
          <category domain="http://www.sixapart.com/ns/types#tag">oracle service bus</category>
        
          <category domain="http://www.sixapart.com/ns/types#tag">smtp</category>
        
          <category domain="http://www.sixapart.com/ns/types#tag">soa</category>
        
          <category domain="http://www.sixapart.com/ns/types#tag">soa suite</category>
        
         <pubDate>Wed, 19 Dec 2007 15:39:09 +0000</pubDate>
      </item>
      
      <item>
         <title>Sending an Email from Oracle Service Bus - Part 1</title>
         <description><![CDATA[<p><strong>Note:</strong> This post was first published before <a href="http://www.oracle.com" target="_blank">Oracle</a> merged with <a href="http://www.bea.com" target="_blank">BEA</a> when the <a href="http://www.oracle.com/technologies/soa/service-bus.html" target="_blank">Oracle Service Bus</a> product was known as AquaLogic Service Bus, hence the occasional reference to BEA and AquaLogic Service Bus.</p>  <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://blogs.oracle.com/christomkins/WindowsLiveWriter/Emailbusinessservice_7955/smtpserver_2.jpg"><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="149" alt="smtpserver" src="http://blogs.oracle.com/christomkins/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 <a href="http://www.oracle.com/technologies/soa/service-bus.html" target="_blank">Oracle Service Bus</a> 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://blogs.oracle.com/christomkins/WindowsLiveWriter/Emailbusinessservice_7955/emailBusinessService_4.jpg"><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="126" alt="emailBusinessService" src="http://blogs.oracle.com/christomkins/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://blogs.oracle.com/christomkins/WindowsLiveWriter/Emailbusinessservice_7955/emailBusinessService2_2.jpg"><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="78" alt="emailBusinessService2" src="http://blogs.oracle.com/christomkins/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://blogs.oracle.com/christomkins/WindowsLiveWriter/Emailbusinessservice_7955/emailBusinessService3_2.jpg"><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="110" alt="emailBusinessService3" src="http://blogs.oracle.com/christomkins/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 <a href="http://www.oracle.com/technologies/soa/service-bus.html" target="_blank">Oracle Service Bus</a>.</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 <a href="http://www.oracle.com/technologies/soa/service-bus.html" target="_blank">Oracle Service Bus</a>. 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>  <div class="wlWriterSmartContent" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:7f71b0ce-5f4a-448d-bdc9-02e155cceaa1" 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/enterprise%20service%20bus" rel="tag">enterprise service bus</a>,<a href="http://technorati.com/tags/oracle%20service%20bus" rel="tag">oracle service bus</a>,<a href="http://technorati.com/tags/soa%20suite" rel="tag">soa suite</a>,<a href="http://technorati.com/tags/fusion%20middleware" rel="tag">fusion middleware</a>,<a href="http://technorati.com/tags/email" rel="tag">email</a></div>]]></description>
         <link>http://blogs.oracle.com/christomkins/2007/12/sending_an_email_from_oracle_s.html</link>
         <guid>http://blogs.oracle.com/christomkins/2007/12/sending_an_email_from_oracle_s.html</guid>
        
        
          <category domain="http://www.sixapart.com/ns/types#tag">email</category>
        
          <category domain="http://www.sixapart.com/ns/types#tag">enterprise service bus</category>
        
          <category domain="http://www.sixapart.com/ns/types#tag">fusion middleware</category>
        
          <category domain="http://www.sixapart.com/ns/types#tag">oracle service bus</category>
        
          <category domain="http://www.sixapart.com/ns/types#tag">smtp</category>
        
          <category domain="http://www.sixapart.com/ns/types#tag">soa</category>
        
          <category domain="http://www.sixapart.com/ns/types#tag">soa suite</category>
        
         <pubDate>Wed, 12 Dec 2007 15:24:40 +0000</pubDate>
      </item>
      
      <item>
         <title>Exposing a new service via Oracle Service Bus</title>
         <description><![CDATA[<p><strong>Note:</strong> This post was first published before <a href="http://www.oracle.com" target="_blank">Oracle</a> merged with <a href="http://www.bea.com" target="_blank">BEA</a> when the <a href="http://www.oracle.com/technologies/soa/service-bus.html" target="_blank">Oracle Service Bus</a> product was known as AquaLogic Service Bus, hence the occasional reference to BEA and AquaLogic Service Bus.</p>  <p>In my <a href="http://blogs.oracle.com/christomkins/2007/11/adding_a_service_to_oracle_ser.html" target="_blank">previous post</a> I talked about how to add a service to <a href="http://www.oracle.com/technologies/soa/service-bus.html" target="_blank">Oracle 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 <a href="http://www.oracle.com/technologies/soa/service-bus.html" target="_blank">Oracle Service Bus</a>?&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><a href="http://www.oracle.com/technologies/soa/service-bus.html" target="_blank">Oracle Service Bus</a> 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 Oracle 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://blogs.oracle.com/christomkins/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://blogs.oracle.com/christomkins/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. <a href="http://www.oracle.com/technologies/soa/service-bus.html" target="_blank">Oracle Service Bus</a> 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://blogs.oracle.com/christomkins/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://blogs.oracle.com/christomkins/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://blogs.oracle.com/christomkins/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://blogs.oracle.com/christomkins/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://blogs.oracle.com/christomkins/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://blogs.oracle.com/christomkins/WindowsLiveWriter/ExposinganewserviceviaAquaLogicServiceBu_D266/proxyServiceSummary_thumb.jpg" width="244" border="0" /></a> </p>  <p>Click <em>Save.</em></p>  <p>So what has happened here? <a href="http://www.oracle.com/technologies/soa/service-bus.html" target="_blank">Oracle Service Bus</a> 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://blogs.oracle.com/christomkins/WindowsLiveWriter/ExposinganewserviceviaAquaLogicServiceBu_D266/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://blogs.oracle.com/christomkins/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://blogs.oracle.com/christomkins/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://blogs.oracle.com/christomkins/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 <a href="http://www.oracle.com/technologies/soa/service-bus.html" target="_blank">Oracle Service Bus</a>. 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:261f2744-a4b0-4905-9e21-f47fbb2b4041" 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/enterprise%20service%20bus" rel="tag">enterprise service bus</a>,<a href="http://technorati.com/tags/oracle%20service%20bus" rel="tag">oracle service bus</a>,<a href="http://technorati.com/tags/soa%20suite" rel="tag">soa suite</a>,<a href="http://technorati.com/tags/fusion%20middleware" rel="tag">fusion middleware</a></div>]]></description>
         <link>http://blogs.oracle.com/christomkins/2007/12/exposing_a_new_service_via_ora.html</link>
         <guid>http://blogs.oracle.com/christomkins/2007/12/exposing_a_new_service_via_ora.html</guid>
        
        
          <category domain="http://www.sixapart.com/ns/types#tag">enterprise service bus</category>
        
          <category domain="http://www.sixapart.com/ns/types#tag">fusion middleware</category>
        
          <category domain="http://www.sixapart.com/ns/types#tag">oracle service bus</category>
        
          <category domain="http://www.sixapart.com/ns/types#tag">soa</category>
        
          <category domain="http://www.sixapart.com/ns/types#tag">soa suite</category>
        
         <pubDate>Thu, 06 Dec 2007 15:10:21 +0000</pubDate>
      </item>
      
      <item>
         <title>Adding a service to Oracle Service Bus</title>
         <description><![CDATA[<p><strong>Note:</strong> This post was first published before <a href="http://www.oracle.com" target="_blank">Oracle</a> merged with <a href="http://www.bea.com" target="_blank">BEA</a> when the <a href="http://www.oracle.com/technologies/soa/service-bus.html" target="_blank">Oracle Service Bus</a> product was known as AquaLogic Service Bus, hence the occasional reference to BEA and AquaLogic Service Bus.</p>  <p>A common first task for people who have installed <a href="http://www.oracle.com/technologies/soa/service-bus.html" target="_blank">Oracle 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 <a href="http://www.oracle.com/technologies/soa/service-bus.html" target="_blank">Oracle Service Bus</a> 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://blogs.oracle.com/christomkins/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://blogs.oracle.com/christomkins/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 Oracle 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://blogs.oracle.com/christomkins/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://blogs.oracle.com/christomkins/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://blogs.oracle.com/christomkins/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://blogs.oracle.com/christomkins/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://blogs.oracle.com/christomkins/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://blogs.oracle.com/christomkins/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://blogs.oracle.com/christomkins/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://blogs.oracle.com/christomkins/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 <a href="http://www.oracle.com/technologies/soa/service-bus.html" target="_blank">Oracle Service Bus</a> services. To do this, use the Project Explorer to navigate to the Business Services folder you created earlier in the Adding a service to Oracle 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://blogs.oracle.com/christomkins/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://blogs.oracle.com/christomkins/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 Oracle 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://blogs.oracle.com/christomkins/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://blogs.oracle.com/christomkins/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://blogs.oracle.com/christomkins/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://blogs.oracle.com/christomkins/WindowsLiveWriter/BusinessservicevsProxyservice_CE8D/response_thumb.jpg" width="244" border="0" /></a> </p>  <p>Congratulations, you have now added your first service to <a href="http://www.oracle.com/technologies/soa/service-bus.html" target="_blank">Oracle Service Bus</a>! </p>  <div class="wlWriterSmartContent" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:47c4b5d3-ff31-4487-921f-2f6f483398d3" 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/enterprise%20service%20bus" rel="tag">enterprise service bus</a>,<a href="http://technorati.com/tags/oracle%20service%20bus" rel="tag">oracle service bus</a>,<a href="http://technorati.com/tags/soa%20suite" rel="tag">soa suite</a>,<a href="http://technorati.com/tags/fusion%20middleware" rel="tag">fusion middleware</a>,<a href="http://technorati.com/tags/soa" rel="tag">soa</a></div>]]></description>
         <link>http://blogs.oracle.com/christomkins/2007/11/adding_a_service_to_oracle_ser.html</link>
         <guid>http://blogs.oracle.com/christomkins/2007/11/adding_a_service_to_oracle_ser.html</guid>
        
        
          <category domain="http://www.sixapart.com/ns/types#tag">enterprise service bus</category>
        
          <category domain="http://www.sixapart.com/ns/types#tag">fusion middleware</category>
        
          <category domain="http://www.sixapart.com/ns/types#tag">oracle service bus</category>
        
          <category domain="http://www.sixapart.com/ns/types#tag">soa</category>
        
          <category domain="http://www.sixapart.com/ns/types#tag">soa suite</category>
        
         <pubDate>Wed, 14 Nov 2007 14:35:58 +0000</pubDate>
      </item>
      
   </channel>
</rss>
