<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-10221346</id><updated>2011-12-14T19:09:13.483-08:00</updated><title type='text'>Service Oriented Architecture</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://soa-esb.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10221346/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://soa-esb.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Rakesh Jain</name><uri>http://www.blogger.com/profile/10430850289584443085</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>4</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-10221346.post-110678662330400508</id><published>2007-01-26T16:43:00.000-08:00</published><updated>2007-12-28T17:48:21.622-08:00</updated><title type='text'>SOAP over HTTPS</title><content type='html'>There are various mechanisms for securing the web services. Today, I will write about the scenario when a client needs to call a web service over HTTPS, provided the service is available over HTTPS.&lt;br /&gt;&lt;br /&gt;This is &lt;strong&gt;Transport Layer Security (TLS)&lt;/strong&gt; that runs beneath HTTP. Another is &lt;strong&gt;Message Level Security&lt;/strong&gt;, which has many options (XML encryption etc) which is more secured.&lt;br /&gt;&lt;br /&gt;This scenario is very common, though, it is not the perfect way of securing a web service, but it is used when, for example, a client is calling an authentication web service, by passing in the user id and password. Now, you don't want the password to go in clear text on HTTP, rather you would want this particular service be called over HTTPS.&lt;br /&gt;&lt;br /&gt;Let's see how to make this happen. In theory, it is same as calling a URL in java using HTTPS.&lt;br /&gt;&lt;br /&gt;First, go the the web service URL in your browser, using HTTPS and store its public certificate on your PC, in a file. This is done when the browser prompts the security warning about the server, &lt;em&gt;view certificate &lt;/em&gt;and select &lt;em&gt;copy to file&lt;/em&gt;, to save it on your local.&lt;br /&gt;&lt;br /&gt;Once you have the server certificate, you need to store it in a keystore. I am using IBM HTTP Server, so I will use IKeyMan utility. However, this can be done using any corresponding utility provided by your HTTP server.&lt;br /&gt;&lt;br /&gt;In IKeyMan, create a new JKS key store, select 'Signer Certificates' and click Add/Edit to add the saved server certificate to this keystore.&lt;br /&gt;&lt;br /&gt;So, now we have the keystore containing the server's public certificate.&lt;br /&gt;&lt;br /&gt;If your client is a &lt;strong&gt;Standalone Web Service client &lt;/strong&gt;(meaning a stanalone java application), all you have to do is specify the location of this keystore using a java property before calling the web service over HTTPS.&lt;br /&gt;&lt;br /&gt;Something like this, for IBM JRE:&lt;br /&gt;&lt;br /&gt;System.setProperty("javax.net.ssl.trustStore","C:\\wsclient\\myWSClientKeystore.jks");&lt;br /&gt;MyWSServiceProxy proxy =  new MyWSServiceProxy(); &lt;br /&gt;   boolean authenticatede = proxy.authenticate("john.doe@blogger.com");&lt;br /&gt;&lt;br /&gt;Make sure the web service end point is using HTTPS.&lt;br /&gt;&lt;br /&gt;Now, if you are using a &lt;strong&gt;Managed Web Service client&lt;/strong&gt;, meaning one which is deployed in a EAR file (WAR or EJB), then you better import the server certificate in the keystore used by your application server or specify a new keystore in the application server.&lt;br /&gt;&lt;br /&gt;Depending upon which application server you are using, the configuration options may be different. For example, IBM WebSphere has couple of options for doing this. A simple one is this:&lt;br /&gt;&lt;br /&gt;Go to the WebSphere Admin console (I am using v5.1). Go to Security -&gt; SSL. Here you will see SSL Configuration Repertoires. You can add cert in one of the existing keystores listed here, or add a new repertoire. When you add new, you can use the keystore we created above for standalone client. Please make sure 'Client Authentication' is not checked, as we are not doing the client authentication with the server.&lt;br /&gt;Now, go to Web module -&gt; &lt;your_app&gt; -&gt; Web Services: Client Security Bindings in the applications area, for you application. Under HTTP SSL Configuration, click Edit and enable SSL.&lt;br /&gt;&lt;br /&gt;So, in this scenario, we did no authentication. However, with transport level security, there is also an option to do the authentication. Meaning, only the trusted clients can invoke a web service and get results. &lt;br /&gt;&lt;br /&gt;In short, this can be achieved by generating a keypair (public key and private key) for the client. The keystore will contain server's public key certificate and client's public and private key.&lt;br /&gt;The server will have to import the public key certificate of the client into its keystore. In this case, when a client calls the web service over HTTPS, the server will check if the request is coming from a trusted client, by decrypting the data using client's public key and its private key, and if decryption is successfull, will return the results.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10221346-110678662330400508?l=soa-esb.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://soa-esb.blogspot.com/feeds/110678662330400508/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10221346&amp;postID=110678662330400508' title='7 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10221346/posts/default/110678662330400508'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10221346/posts/default/110678662330400508'/><link rel='alternate' type='text/html' href='http://soa-esb.blogspot.com/2005/01/soap-over-https.html' title='SOAP over HTTPS'/><author><name>Rakesh Jain</name><uri>http://www.blogger.com/profile/10430850289584443085</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>7</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10221346.post-111894958746386314</id><published>2005-07-08T22:40:00.000-07:00</published><updated>2006-09-01T16:58:07.866-07:00</updated><title type='text'>SOAP carrying Attachments</title><content type='html'>Well, it is very simple. I am using IBM WebSphere v5.1, and it uses Axis, so this should work well with Apache-Axis also.&lt;br /&gt;&lt;br /&gt;Getting directly to the point:&lt;br /&gt;A simple java class, which we will expose as a web service:&lt;br /&gt;Method is:&lt;br /&gt;&lt;br /&gt;public DataHandler getFileAttachment(String fileName) throws Exception&lt;br /&gt;{&lt;br /&gt;DataSource src = new FileDataSource(fileName);&lt;br /&gt;DataHandler result = new DataHandler(src);&lt;br /&gt;return result;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;That's it. DataHandler, DataSource and FileDataSource are from javax.activation package.&lt;br /&gt;&lt;br /&gt;Just expose this as a WebService and you are all set to receive files from a Web Service, as an attachment to the SOAP message.&lt;br /&gt;A sincere advice, never use byte[] getFile() as a Web Service method, even for a small file, it takes so much time, transferring one byte at a time.&lt;br /&gt;&lt;br /&gt;Enjoy!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10221346-111894958746386314?l=soa-esb.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://soa-esb.blogspot.com/feeds/111894958746386314/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10221346&amp;postID=111894958746386314' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10221346/posts/default/111894958746386314'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10221346/posts/default/111894958746386314'/><link rel='alternate' type='text/html' href='http://soa-esb.blogspot.com/2005/07/soap-carrying-attachments.html' title='SOAP carrying Attachments'/><author><name>Rakesh Jain</name><uri>http://www.blogger.com/profile/10430850289584443085</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10221346.post-110678666858058419</id><published>2005-01-26T16:44:00.000-08:00</published><updated>2005-10-02T00:57:43.090-07:00</updated><title type='text'>Enterprise Service Bus</title><content type='html'>Enterprise Service Bus or ESB is one of the most important components of Service Oriented Architecture (SOA). But what is it? Is it a product, a technology, a specification or a platform?&lt;br /&gt;&lt;br /&gt;ESB is one or more of the following:&lt;br /&gt;&lt;br /&gt;A distributed, heterogenous infrastructure&lt;br /&gt;An event driven integrator&lt;br /&gt;A message oriented integrator&lt;br /&gt;An Intelligent router&lt;br /&gt;A protocol transformer&lt;br /&gt;A control point (for external services)&lt;br /&gt;Able to substitute one service implementation with other, with no effect to client&lt;br /&gt;A suitable level of quality of service provider&lt;br /&gt;Provides means to manage services in SOA&lt;br /&gt;Operate &amp; integrate in an heterogenous environment&lt;br /&gt;&lt;br /&gt;Basically, ESB is a logical architectural component, a set of infrastructure capabilities, provided and implemented by middleware technology, that enable the integration of services in an SOA. But, it is beyond just the routing and transport capability, at the same time not all of above capabilities are needed to have an ESB in place.&lt;br /&gt;&lt;br /&gt;I would put the service choreography out of ESB. That is not really part of ESB, but some experts do keep it in ESB.&lt;br /&gt;As you can see, ESB is suppossed to provide service routing capability, but not necessarily service directory. However, given that in scenarios like Web Services, UDDI acts as both service directory and router, therefore, make it also part of ESB.&lt;br /&gt;&lt;br /&gt;We know that to implement SOA, both applications and infrastructure must support SOA principles. Enabling applications is the core - expose it as service, by creating service interfaces to the existing or new functions. Enabling infrastructure, at the minimum, involves the capability to route and transport service requests to the correct service provider. The role of ESB, in part, is to enable the infrastructure in this fashion.&lt;br /&gt;&lt;br /&gt;That's the minimum, but what's the value add? The true value of the ESB concept is to enable the infrastructure for SOA in such a way that reflects the needs of today's enterprise.&lt;br /&gt;&lt;br /&gt;I am much influenced by an IBM Redbook on SOA Patterns. So my views here are a reflection of what I read in that book.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;The ESB supports multiple Integration paradigms:&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;The ESB must support in one infrastructure the three major styles of Enterprise Integration:&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&gt; &lt;/strong&gt;&lt;em&gt;&lt;strong&gt;Service-oriented architectures&lt;/strong&gt; &lt;/em&gt;in which applications communicate through reusable services with well-defined, explicit interfaces. Service-oriented interactions leverage underlying messaging and event communication models.&lt;br /&gt;&lt;strong&gt;&gt; &lt;em&gt;Message-driven architectures &lt;/em&gt;&lt;/strong&gt;in which applications send messages through the ESB to receiving applications.&lt;br /&gt;&lt;strong&gt;&gt; &lt;/strong&gt;&lt;em&gt;&lt;strong&gt;Event-driven architectures&lt;/strong&gt; &lt;/em&gt;in which applications generate and consume messages independently of one another.&lt;br /&gt;&lt;br /&gt;The ESB does this while providing additional capabilities to mediate or transform service messages and interactions, enabling a wide variety of behaviors and supporting the various models of coupling interaction.&lt;br /&gt;&lt;br /&gt;The ESB is positioned as an infrastructure component, and as such as a component that does not host or execute business logic. This is in contrast to components such as service requesters, service providers, and the Business Service Choreography whose role is to handle business logic.&lt;br /&gt;&lt;br /&gt;Update: Many companies are now marketing ESB as a product or suite of products, so, no wonder if you see ESB products from different vendors competing. Well, you can commercialize anything nowadays.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10221346-110678666858058419?l=soa-esb.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://soa-esb.blogspot.com/feeds/110678666858058419/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10221346&amp;postID=110678666858058419' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10221346/posts/default/110678666858058419'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10221346/posts/default/110678666858058419'/><link rel='alternate' type='text/html' href='http://soa-esb.blogspot.com/2005/01/enterprise-service-bus.html' title='Enterprise Service Bus'/><author><name>Rakesh Jain</name><uri>http://www.blogger.com/profile/10430850289584443085</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10221346.post-110601079272361776</id><published>2005-01-17T17:05:00.000-08:00</published><updated>2005-04-11T10:09:09.490-07:00</updated><title type='text'>Service Oriented Architecture - what ?</title><content type='html'>Well, if you are in IT industry, you go anywhere - meeting, conference, online - all you find is talks about Service Oriented Architecture (SOA). While this term is old more than couple of years now, and IT Architects are still planning to design the systems based on services, a lot needs to be done to get to a real services based architecture which is also scalable and managable.&lt;br /&gt;&lt;br /&gt;Basically, we know about Components Based Architecture. Every component provides some or other service, and if we take that idea little further, we will be living in a jungle of services and it will be hard to manage these services and any change in one service may need to modify other services, defeating one of the purposes of SOA.&lt;br /&gt;&lt;br /&gt;So, we have to think and think hard before getting deep into these services. Creating a service, like a Web Service is no big deal, but getting that service into SOA model is more important.&lt;br /&gt;&lt;br /&gt;Normally, what we do to get to SOA -&lt;br /&gt;&lt;br /&gt;1. Create services, typically Web Services&lt;br /&gt;2. Integrate services&lt;br /&gt;3. Implement enterprise wide business functions using these integrated services&lt;br /&gt;4. Deploy any new business processes/models using such services&lt;br /&gt;&lt;br /&gt;And what are our main concerns, things come into our way:&lt;br /&gt;&lt;br /&gt;1. Security&lt;br /&gt;2. Access protocols &amp;amp; interoperability&lt;br /&gt;3. Process flow&lt;br /&gt;4. Workflow&lt;br /&gt;5. Service availability&lt;br /&gt;6. Contract (interface) change between service provider and consumer&lt;br /&gt;7. Service implementation change&lt;br /&gt;8. Service relocation&lt;br /&gt;9. Service access through firewalls&lt;br /&gt;10. Repeated Client side coding related to service access&lt;br /&gt;11. Scalability&lt;br /&gt;12. Performance&lt;br /&gt;&lt;br /&gt;Those aware of Enterprise Service Bus (ESB) would think I am going to discuss that, and you are right. Well, ESB promise does fulfil many of these concerns, but ESB itself is quite open, and that is something we can start implementing and add things to it as we forsee issues.&lt;br /&gt;&lt;br /&gt;Rest later......&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10221346-110601079272361776?l=soa-esb.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://soa-esb.blogspot.com/feeds/110601079272361776/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10221346&amp;postID=110601079272361776' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10221346/posts/default/110601079272361776'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10221346/posts/default/110601079272361776'/><link rel='alternate' type='text/html' href='http://soa-esb.blogspot.com/2005/01/service-oriented-architecture-what.html' title='Service Oriented Architecture - what ?'/><author><name>Rakesh Jain</name><uri>http://www.blogger.com/profile/10430850289584443085</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry></feed>
