<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/atom10full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><feed xmlns="http://www.w3.org/2005/Atom" xmlns:openSearch="http://a9.com/-/spec/opensearch/1.1/" xmlns:georss="http://www.georss.org/georss" xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr="http://purl.org/syndication/thread/1.0" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" gd:etag="W/&quot;DEEGSX8_eip7ImA9WhRVEUk.&quot;"><id>tag:blogger.com,1999:blog-743578218566083321</id><updated>2012-01-09T14:03:48.142-08:00</updated><category term="ARRA" /><category term="DICOM" /><category term="FABridge" /><category term="DB2 CLI ODBC Driver delete Database Alias Windows UNCATALOG Management Service db2cli.ini" /><category term="EHR" /><category term="libeay32.dll" /><category term="JAX-RS" /><category term="Windows" /><category term="linkedin" /><category term="MedCommons" /><category term="eHealth Applications" /><category term="HTTP" /><category term="Healthcare REST API JSON XML CCD REStEasy marshall POJO HL7" /><category term="liferay" /><category term="cost" /><category term="PHR" /><category term="openEHealth" /><category term="Google Health Data API PHR java authentication" /><category term="REST Web Services HTTP cURL cookies JSON API" /><category term="JAXB" /><category term="Lab Results" /><category term="portal" /><category term="portecle" /><category term="Flex z-index div transparency liferay" /><category term="Health Records" /><category term="EC2" /><category term="Biosciences" /><category term="facebook" /><category term="Diabetes" /><category term="POST" /><category term="ICW" /><category term="BlazeDS Web Service Flex MXML ActionScript cross-domain" /><category term="Liferay portal" /><category term="technology. sensors" /><category term="Javascript" /><category term="theme" /><category term="Google IO 2008 cloud Vic Gundotra Marissa Mayer" /><category term="Web Services" /><category term="acm" /><category term="medication" /><category term="Health 2.0 conference San Francisco health care IT ICW" /><category term="soapUI" /><category term="SAML" /><category term="SDK" /><category term="soapUI SOAP Web services" /><category term="portlet" /><category term="cloudera" /><category term="Community One" /><category term="HTTP IP adress request header REST RESTEASY Java Annotations HttpServletRequest  ServletRequest" /><category term="BlazeDS Flex Proxy HTTPS SSL LifeSensor Web Services" /><category term="MAVEN" /><category term="Software as a Service" /><category term="HIPAA" /><category term="cURL" /><category term="openSSL" /><category term="DB2" /><category term="Eclipse" /><category term="Trustore" /><category term="market" /><category term="EXT" /><category term="certificate" /><category term="Windows console customization prompt background dos" /><category term="IHE" /><category term="HITECH" /><category term="DBMS" /><category term="Packt publishing" /><category term="componentization" /><category term="POM" /><category term="Twitter" /><category term="key store" /><category term="resteasy-jaxb-provider" /><category term="Jonas Yuan" /><category term="PaaS" /><category term="CCR" /><category term="MapReduce" /><category term="TC3" /><category term="Security" /><category term="SOA" /><category term="Ajax" /><category term="Healthcare" /><category term="Liferay portlets BlazeDS configuration Messier" /><category term="SaaS" /><category term="JNDI" /><category term="RHIO" /><category term="Hadoop" /><category term="hive" /><category term="resteasy-jaxrs" /><category term="SSL" /><category term="NHIN Direct" /><category term="Simple JNDI" /><category term="JUnit" /><category term="adherence" /><category term="GZIP" /><category term="programming languages" /><category term="JSON" /><category term="Cloud" /><category term="RESTEasy" /><category term="Maven 2" /><category term="Cloud Computing" /><category term="REST" /><category term="HL7" /><category term="orchestration" /><category term="BlazeDS Flex LifeSensor Web Service Introspection Wizard" /><category term="Rest API" /><category term="ASP" /><category term="healthcare portal benefits services components" /><category term="RDBMS" /><category term="S3" /><category term="Web Service" /><category term="API" /><category term="Portal healthcare context management security authentication" /><category term="JDBC" /><category term="AWS" /><category term="SOAP" /><category term="HIMSS 2009 Kaiser permanente PHR kp.prg" /><category term="IaaS" /><category term="ssleay32.dll" /><category term="Liferay 5.2" /><category term="skin" /><category term="GenericEntity" /><category term="choreography" /><category term="Generic" /><category term="PHI" /><category term="TLS" /><category term="Spring import beans JBoss Dependency Injection CLASSPATH WINDOWS RUN.BAT WEB-INF Configuration resources.xml" /><category term="JBOSS" /><category term="Speech technology healthcare EMR CDM dictation nuance lifemasters" /><category term="Meaningful Use" /><category term="Mobile Application" /><title>Technology highlights</title><subtitle type="html">A forum for software developers interested in Web 2.0 applications with a focus on solutions for health care and life sciences.</subtitle><link rel="http://schemas.google.com/g/2005#feed" type="application/atom+xml" href="http://fandry.blogspot.com/feeds/posts/default" /><link rel="alternate" type="text/html" href="http://fandry.blogspot.com/" /><link rel="next" type="application/atom+xml" href="http://www.blogger.com/feeds/743578218566083321/posts/default?start-index=26&amp;max-results=25&amp;redirect=false&amp;v=2" /><author><name>fandry</name><uri>http://www.blogger.com/profile/01990790629557446302</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="24" height="32" src="http://bp3.blogger.com/_V_sYr0AnKIc/SEQpDbMcf7I/AAAAAAAABMs/qBizDBN3sXs/S220/fandry.jpg" /></author><generator version="7.00" uri="http://www.blogger.com">Blogger</generator><openSearch:totalResults>49</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/atom+xml" href="http://feeds.feedburner.com/TechnologyHighlights" /><feedburner:info uri="technologyhighlights" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><entry gd:etag="W/&quot;DEEGSX89fSp7ImA9WhRVEUk.&quot;"><id>tag:blogger.com,1999:blog-743578218566083321.post-754177405880567305</id><published>2011-12-30T14:35:00.000-08:00</published><updated>2012-01-09T14:03:48.165-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-01-09T14:03:48.165-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="HTTP IP adress request header REST RESTEASY Java Annotations HttpServletRequest  ServletRequest" /><title>How to extract HTTP header fields in a REST API</title><content type="html">&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;To be able to extract &lt;a href="http://en.wikipedia.org/wiki/List_of_HTTP_header_fields"&gt;HTTP headers fields&lt;/a&gt; from incoming requests accessing a&lt;b&gt; &lt;a href="http://fandry.blogspot.com/2011/02/rest-style-architecture-and-development.html"&gt;REST API&lt;/a&gt;&lt;/b&gt; is particularly useful when trying to&lt;b&gt; log the transactions&lt;/b&gt; that are coming through the REST based service. &lt;br /&gt;
&lt;br /&gt;
In this example, I use Java based JBoss &lt;a href="http://fandry.blogspot.com/2010/06/jaxb-json-rest-api-using-resteasy-on.html"&gt;RESTEasy&lt;/a&gt; together with &lt;a href="http://today.java.net/pub/a/today/2007/05/22/using-annotations-in-java-ee-5.html"&gt;@Context&lt;/a&gt; java &lt;a href="http://en.wikipedia.org/wiki/Java_annotation"&gt;annotation&lt;/a&gt; to extract the header information.&lt;br /&gt;
&lt;br /&gt;
One of the REST API operation is&lt;span style="color: #38761d;"&gt; /version&lt;/span&gt; that returns the current version of the API in a JSON format.The interface operation is defined as follow: &lt;br /&gt;
&lt;pre&gt;&lt;span style="color: #38761d;"&gt;
     import javax.ws.rs.core.HttpHeaders;

     /**
     * Get the current version of the REST API.
     */
     @GET
     @Path("/version")
     @Produces("application/json")
     @GZIP
     public Response getVersion(@Context HttpHeaders headers);&lt;/span&gt;
&lt;/pre&gt;&lt;br /&gt;
The &lt;b&gt;@Context&lt;/b&gt; annotation allows you to map request HTTP headers to the method invocation.&lt;br /&gt;
&lt;br /&gt;
One way to safely extract all available &lt;a href="http://en.wikipedia.org/wiki/List_of_HTTP_header_fields"&gt;header parameters&lt;/a&gt; is to loop through the headers.The method &lt;a href="http://docs.oracle.com/javaee/6/api/javax/ws/rs/core/HttpHeaders.html#getRequestHeaders%28%29"&gt;getRequestHeaders&lt;/a&gt; from &lt;a href="http://javax.ws.rs.core.httpheaders/"&gt;javax.ws.rs.core.HttpHeaders&lt;/a&gt; returns the values of HTTP request headers. The returned map is case-insensitive and is read-only. &lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;&lt;span style="color: #38761d;"&gt;   if (headers != null) {
       for (String header : headers.getRequestHeaders().keySet()) {
          System.out.println("Header:"+header+
                             "Value:"+headers.getRequestHeader(header));
       }
   }&lt;/span&gt;
&lt;/pre&gt;&lt;br /&gt;
When querying the REST API via a browser:&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;&lt;span style="color: #38761d;"&gt;  http://www.acme.com/api/version&lt;/span&gt;
&lt;/pre&gt;&lt;br /&gt;
you obtain a minimum set of headers fields:&lt;br /&gt;
&lt;pre&gt;&lt;span style="color: #38761d;"&gt;
   Header:cache-control Value:[max-age=0]
   Header:connection Value:[keep-alive]
   Header:accept-language Value:[en-us,en;q=0.5]
   Header:host Value:[www.acme.com]
   Header:accept Value:[text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8]
   Header:user-agent Value:[Mozilla/5.0 (Windows NT 6.1; WOW64; rv:8.0)    
   Gecko/20100101 Firefox/8.0]
   Header:accept-encoding Value:[gzip, deflate]
   Header:session-id Value:[d636369c]
   Header:accept-charset Value:[ISO-8859-1,utf-8;q=0.7,*;q=0.7]&lt;/span&gt;
&lt;/pre&gt;&lt;br /&gt;
To be able to extract a specific header field (e.g. Host), you can use the &lt;a href="http://docs.oracle.com/javaee/6/api/javax/ws/rs/core/HttpHeaders.html#getRequestHeader%28java.lang.String%29"&gt;getRequestHeader&lt;/a&gt; function:&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;&lt;span style="color: #38761d;"&gt; public Response getVersion(@Context HttpHeaders headers) {
     if (headers != null) {
        List&amp;lt;String&amp;gt; hostHeader = headers.getRequestHeader("host");
        if (hostHeader != null) {
           for (String host : hostHeader) {
              LOG.debug("Host:"+host);
           }
        }
     } 
  
     // Get the version
     final Version current_version = new Version();
     final ObjectMapper mapper = new ObjectMapper();
     final JsonNode rootNode = mapper.createObjectNode();
     ((ObjectNode) rootNode).putPOJO(Version.XML_ROOT_ELEMENT, current_version);
     
     final ResponseBuilder builder = Response.ok(rootNode);
     return builder.build();
   }
&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;
If you are using a&lt;a href="http://fandry.blogspot.com/2011/09/curl-tests-harness-and-tls.html"&gt; test harness tools like cURL&lt;/a&gt;, you can also easily add additional &lt;b&gt;HTTP header fields&lt;/b&gt; &lt;br /&gt;
(e.g. the email address of the user making the request or the &lt;a href="http://en.wikipedia.org/wiki/HTTP_referrer"&gt;referer&lt;/a&gt;) and test the logging functionality of your REST API:&lt;br /&gt;
&lt;pre&gt;&lt;span style="color: #38761d;"&gt;curl -H "From: user@example.com" http://www.acme.com/api/version&lt;/span&gt;
&lt;/pre&gt;&lt;pre&gt;&lt;span style="color: #38761d;"&gt;curl -H "Referer: http://consumer.service.acme.com" http://www.acme.com/api/version&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;&lt;br /&gt;
The headers can also be obtained through the &lt;a href="http://docs.oracle.com/javaee/6/api/javax/servlet/http/HttpServletRequest.html"&gt;HttpServletRequest&lt;/a&gt; object.&lt;br /&gt;
This can be done using the &lt;b&gt;@Context HttpServletRequest annotation&lt;/b&gt; and can provide additional information about the incoming request: &lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;&lt;span style="color: #38761d;"&gt;public Response getVersion(@Context HttpServletRequest request) {
   LOG.debug("Host:"+request.getHeader("host"));
   LOG.debug("Request-URL:"+request.getRequestURL());
   ...
}&lt;/span&gt;&amp;nbsp;&lt;/pre&gt;&lt;br /&gt;
Since &lt;a href="http://docs.oracle.com/javaee/1.4/api/javax/servlet/http/HttpServletRequest.html"&gt;HttpServletRequest&lt;/a&gt; extends &lt;a href="http://docs.oracle.com/javaee/1.4/api/javax/servlet/ServletRequest.html"&gt;ServletRequest&lt;/a&gt; you also getting useful methods providing information on the Internet Protocol (IP) address, host and port of the client or last proxy that initiated the request.&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;&lt;span style="color: #38761d;"&gt;public Response getVersion(@Context HttpServletRequest request) {
   LOG.debug("Remote-IP:"+request.getRemoteAddr());
   LOG.debug("Remote-Host:"+request.getRemoteHost());
   LOG.debug("Remote-Port:"+request.getRemotePort());
   ...
}&lt;/span&gt;&amp;nbsp;&lt;/pre&gt;&lt;pre&gt;&amp;nbsp;&lt;/pre&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/743578218566083321-754177405880567305?l=fandry.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/PpkcSUIFWuwWygwi4YWokDMKnEs/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/PpkcSUIFWuwWygwi4YWokDMKnEs/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/PpkcSUIFWuwWygwi4YWokDMKnEs/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/PpkcSUIFWuwWygwi4YWokDMKnEs/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/TechnologyHighlights/~4/RHCGEItnrXg" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://fandry.blogspot.com/feeds/754177405880567305/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=743578218566083321&amp;postID=754177405880567305" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/743578218566083321/posts/default/754177405880567305?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/743578218566083321/posts/default/754177405880567305?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/TechnologyHighlights/~3/RHCGEItnrXg/how-to-extract-http-header-fields-in.html" title="How to extract HTTP header fields in a REST API" /><author><name>fandry</name><uri>http://www.blogger.com/profile/01990790629557446302</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="24" height="32" src="http://bp3.blogger.com/_V_sYr0AnKIc/SEQpDbMcf7I/AAAAAAAABMs/qBizDBN3sXs/S220/fandry.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://fandry.blogspot.com/2011/12/how-to-extract-http-header-fields-in.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DkANSXs-fip7ImA9WhRRFkw.&quot;"><id>tag:blogger.com,1999:blog-743578218566083321.post-1097844943975887229</id><published>2011-11-28T15:29:00.000-08:00</published><updated>2011-11-29T16:59:58.556-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-11-29T16:59:58.556-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="SSL" /><category scheme="http://www.blogger.com/atom/ns#" term="TLS" /><category scheme="http://www.blogger.com/atom/ns#" term="ssleay32.dll" /><category scheme="http://www.blogger.com/atom/ns#" term="Windows" /><category scheme="http://www.blogger.com/atom/ns#" term="libeay32.dll" /><category scheme="http://www.blogger.com/atom/ns#" term="cURL" /><category scheme="http://www.blogger.com/atom/ns#" term="openSSL" /><title>cURL setup and OpenSSL</title><content type="html">&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;br /&gt;
&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;In a &lt;a href="http://fandry.blogspot.com/2011/04/how-to-test-harness-rest-web-services.html"&gt;previous post&lt;/a&gt; I was explaining how to use &lt;a href="http://en.wikipedia.org/wiki/CURL"&gt;cURL&lt;/a&gt; to quickly test &lt;a href="http://fandry.blogspot.com/2011/02/rest-style-architecture-and-development.html"&gt;REST web services&lt;/a&gt;. If your web service has to be secure, you are probably using &lt;b&gt;Transport Layer Security&lt;/b&gt; (&lt;b&gt;TLS&lt;/b&gt;) - the new &lt;b&gt;Secure Sockets Layer&lt;/b&gt; (&lt;b&gt;SSL&lt;/b&gt;) cryptographic protocol.&lt;br /&gt;
&lt;br /&gt;
To be able to &lt;a href="http://fandry.blogspot.com/2011/09/curl-tests-harness-and-tls.html"&gt;use &lt;b&gt;TLS/SSL&lt;/b&gt; with cURL&lt;/a&gt;, you will need to have some SSL libraries/DLL such as OpenSSL installed. If you did not install OpenSSL, you will most likely get the following error when trying to use cURL:&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/-4jAZdG-fZ-w/TtQVFRi1baI/AAAAAAAACmc/AH1XbL2b1ug/s1600/cURL_dll_issue.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="138" src="http://4.bp.blogspot.com/-4jAZdG-fZ-w/TtQVFRi1baI/AAAAAAAACmc/AH1XbL2b1ug/s400/cURL_dll_issue.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
"&lt;span style="color: #38761d;"&gt;The program can't start because LIBEAY32.dll is missing from your computer. Try to reinstall the program to fix this problem.&lt;/span&gt;" &lt;br /&gt;
&lt;br /&gt;
To fix this, you can either&lt;a href="http://www.slproweb.com/products/Win32OpenSSL.html"&gt; install the OpenSSL&lt;/a&gt; on your machine, or if you just want to install the minimum, you can just copy the following DLLs from OpenSSL (I am using OpenSSL 1.0.0c) to your cURL folder:&lt;br /&gt;
&lt;ul style="text-align: left;"&gt;&lt;li&gt;&lt;span style="font-size: large;"&gt;libeay32.dll&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-size: large;"&gt;ssleay32.dll&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;By the way, you can download &lt;a href="http://curl.haxx.se/download.html"&gt;cURL for most of the OS and platforms &lt;/a&gt;and usually SSL and non SSL versions are available for each OS (see current windows versions below):&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/-CjtpJLULvbg/TtQXkkkWasI/AAAAAAAACmk/9DbU7jwcbCc/s1600/cURL_windows_downloads.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="261" src="http://4.bp.blogspot.com/-CjtpJLULvbg/TtQXkkkWasI/AAAAAAAACmk/9DbU7jwcbCc/s400/cURL_windows_downloads.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/743578218566083321-1097844943975887229?l=fandry.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/AnyPvvIEhOA7ezuwNv7Qi9c0wQs/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/AnyPvvIEhOA7ezuwNv7Qi9c0wQs/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/AnyPvvIEhOA7ezuwNv7Qi9c0wQs/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/AnyPvvIEhOA7ezuwNv7Qi9c0wQs/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/TechnologyHighlights/~4/_LjWvUS2iYw" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://fandry.blogspot.com/feeds/1097844943975887229/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=743578218566083321&amp;postID=1097844943975887229" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/743578218566083321/posts/default/1097844943975887229?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/743578218566083321/posts/default/1097844943975887229?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/TechnologyHighlights/~3/_LjWvUS2iYw/curl-setup-and-openssl.html" title="cURL setup and OpenSSL" /><author><name>fandry</name><uri>http://www.blogger.com/profile/01990790629557446302</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="24" height="32" src="http://bp3.blogger.com/_V_sYr0AnKIc/SEQpDbMcf7I/AAAAAAAABMs/qBizDBN3sXs/S220/fandry.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://4.bp.blogspot.com/-4jAZdG-fZ-w/TtQVFRi1baI/AAAAAAAACmc/AH1XbL2b1ug/s72-c/cURL_dll_issue.png" height="72" width="72" /><thr:total>1</thr:total><feedburner:origLink>http://fandry.blogspot.com/2011/11/curl-setup-and-openssl.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DUQNRXgycSp7ImA9WhRTEUo.&quot;"><id>tag:blogger.com,1999:blog-743578218566083321.post-3777724981729720381</id><published>2011-10-28T14:33:00.000-07:00</published><updated>2011-11-01T12:56:34.699-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-11-01T12:56:34.699-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="SOA" /><category scheme="http://www.blogger.com/atom/ns#" term="choreography" /><category scheme="http://www.blogger.com/atom/ns#" term="orchestration" /><category scheme="http://www.blogger.com/atom/ns#" term="IHE" /><title>Combining IHE transactions : Orchestration or Choreography?</title><content type="html">&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;a href="http://en.wikipedia.org/wiki/Integrating_the_Healthcare_Enterprise"&gt;Integrating the Healthcare Enterprise (IHE)&lt;/a&gt; has gained tremendous momentum in the past few years. Started as a Healthcare Information and Management Systems Society (&lt;a href="http://www.himss.org/ASP/index.asp"&gt;HIMSS&lt;/a&gt;) and Radiological Society of North America (RSNA) workshop in October 1998 with only 15 participants including AGFA, Cerner, Fuji, GE, HP, Philips, Siemens, the IHE initiative has more than 400 members worldwide. It is composed of healthcare professional associations, government agencies, &lt;a href="http://en.wikipedia.org/wiki/Health_information_exchange"&gt;Health Information Exchanges (HIE)&lt;/a&gt;, healthcare providers, IT and consulting companies, trade, educational, standard and research organizations. IHE provides a standards based-interoperable framework to share and exchange information between healthcare organizations across networks.&lt;br /&gt;
&lt;br /&gt;
Combined with the latest technology and well established standards (&lt;b&gt;HL7, DICOM, IDC9/10, LOINC, W3C&lt;/b&gt;), clinical data can then be securely and privately accessed and transmitted locally between network endpoints (e.g. within the same hospital between the practices and a lab). IHE profiles can also be used across Health Information Exchanges (&lt;b&gt;HIE&lt;/b&gt;) of Regional Health Information Organization&lt;b&gt; (RHIO)&lt;/b&gt;, or a state level (e.g. an individual state in the US, Canada or Europe), or at the federal level (e.g. the US Nationwide Health Information Network or &lt;a href="http://en.wikipedia.org/wiki/Nationwide_Health_Information_Network"&gt;NwHIN&lt;/a&gt;). As a result, there is a strong need to integrate and combine individual IHE profiles end-points to form “hub of hubs” or “network of networks” to support health information exchange between the participating nodes entities.&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/--BhzKrfRuYk/TqseCXT7tjI/AAAAAAAACmM/WoPPG7umCwY/s1600/orchrestration_chorecography.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="135" src="http://2.bp.blogspot.com/--BhzKrfRuYk/TqseCXT7tjI/AAAAAAAACmM/WoPPG7umCwY/s400/orchrestration_chorecography.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
Because IHE transactions are most likely to be offered as web services, combining those transactions can be done following Service Oriented Architecture (SOA) and Service Oriented Computing (SOC) principles.&lt;br /&gt;
&lt;br /&gt;
Conventional middleware distributed system infrastructures (e.g. &lt;a href="http://en.wikipedia.org/wiki/Java_Message_Service"&gt;JMS&lt;/a&gt;) are generally not sufficient or flexible enough to mediate, transform, federate and route messages from and to web services. &lt;br /&gt;
&lt;br /&gt;
&lt;a href="http://en.wikipedia.org/wiki/Enterprise_application_integration"&gt;Enterprise Application Integration (EAI)&lt;/a&gt; goes one step ahead, trying to separate the applications from the web services end-points. EAI usually employs a centralize service broker for this, a set of connectors and an independent data model. Services can then send and subscribe to receive messages to and from the broker. However, this very centralized approach requires a large amount of up front development and business process design for the connectors, as well as high cost of maintenance in general. &lt;b&gt;Enterprise Service Buses (ESB)&lt;/b&gt; is an infrastructure that leverages EAI principles.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;u&gt;&lt;b&gt;Orchestration&lt;/b&gt;&lt;/u&gt;&lt;br /&gt;
&lt;br /&gt;
Like &lt;b&gt;EAI&lt;/b&gt;, &lt;b&gt;orchestration &lt;/b&gt;uses a centralized approach. Web services orchestration is realized through &lt;a href="http://en.wikipedia.org/wiki/Business_Process_Execution_Language"&gt;Business Process Execution Language (BPEL)&lt;/a&gt; that describe the collaboration and interaction between the web service participants.&lt;br /&gt;
&lt;br /&gt;
Business workflows, states, actions, events, control flows and exception handling can be specified. Messages can be received and sent directly from and to &lt;a href="http://en.wikipedia.org/wiki/Web_Services_Description_Language"&gt;WSDL&lt;/a&gt; ports. Results received asynchronously from web services can be combined to create new messages. Usually &lt;b&gt;BPEL&lt;/b&gt; workflows are created and updated with visual design tools.  &lt;br /&gt;
&lt;br /&gt;
There is often an overlap between orchestration engines and&lt;a href="http://en.wikipedia.org/wiki/Enterprise_service_bus"&gt; Enterprise Services Buses (ESB)&lt;/a&gt;. Vendors now also offer BPEL design on top of more generic EAI mechanisms enabling true orchestration for ESBs.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;u&gt;&lt;b&gt;Choreography&lt;/b&gt;&lt;/u&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Choreography &lt;/b&gt;is more distributed and collaborative in nature and uses the &lt;a href="http://en.wikipedia.org/wiki/Web_Service_Choreography"&gt;Web Service Choreography Interface (WSCI)&lt;/a&gt; specification and the WSDL description files to represent the flow of messages exchanged between the Web services involved.&lt;br /&gt;
&lt;br /&gt;
Choreography seems more flexible than orchestration since it does not rely on a central element that could become a bottle neck and seems to offer more complex interaction potential between web services. However, choreography has some drawbacks including the necessity for all web services to be aware of overall business process workflow. &lt;a href="http://www.w3.org/TR/wsci/"&gt;WSCI&lt;/a&gt; itself does not specify the definition and the implementation of the mechanism to implement the message exchange. &lt;br /&gt;
&lt;br /&gt;
In addition to this, performance can be an issue if high volume message transactions between the end-points peers are not handled properly.  &lt;br /&gt;
&lt;br /&gt;
Moreover, there is no clear responsibility for the overall workflow leading to legal issues related to monitoring and maintenance.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;u&gt;&lt;b&gt;Orchestration vs Choreography&lt;/b&gt;&lt;/u&gt; &lt;br /&gt;
&lt;br /&gt;
Orchestration also has the advantage to be a much more mature integration technology than choreography. For these reasons, most of the state-wide health information exchange networks in the US employ a &lt;a href="http://en.wikipedia.org/wiki/Service-oriented_architecture"&gt;Service-Oriented Architectural (SOA)&lt;/a&gt; model that is implemented through an Enterprise Service Bus (ESB) orchestration. &lt;br /&gt;
&lt;br /&gt;
In addition to this, web service orchestration offers much more than just technical benefits:&lt;br /&gt;
&lt;ul style="text-align: left;"&gt;&lt;li&gt;Organizational: standardization, narrow gap between business analysts and developers;&lt;/li&gt;
&lt;li&gt;Managerial: risk reduction, lower costs, more flexibility;&lt;/li&gt;
&lt;li&gt;Strategic: IT resilience, delivery time reduction, less technology lock-in;&lt;/li&gt;
&lt;li&gt;Technical: portability, reuse, interoperability of tools, less complex code, better maintainability;&lt;/li&gt;
&lt;li&gt;Operational: efficiency, automation, higher level tasks management.&lt;/li&gt;
&lt;/ul&gt;When deployed on high performance platforms such as &lt;a href="http://en.wikipedia.org/wiki/Service-oriented_architecture"&gt;SOA&lt;/a&gt; software appliances, orchestration solutions are easy to test, extend and maintain.&lt;br /&gt;
&lt;br /&gt;
&lt;ul style="text-align: left;"&gt;&lt;li&gt;&lt;b&gt;&lt;/b&gt;More on this topic to be published as part of the following paper: Andry F., Wan L., &lt;i&gt;HEALTH INFORMATION EXCHANGE NETWORK INTEROPERABILITY THROUGH IHE TRANSACTIONS ORCHESTRATION&lt;/i&gt;, 5th International Conference on Health Informatics (&lt;a href="http://www.healthinf.biostec.org/"&gt;HEALTHINF 2012&lt;/a&gt;).&lt;/li&gt;
&lt;/ul&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/743578218566083321-3777724981729720381?l=fandry.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/i9Uhyv2FXxCw8T-Wl8ZnkCWN_c8/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/i9Uhyv2FXxCw8T-Wl8ZnkCWN_c8/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/i9Uhyv2FXxCw8T-Wl8ZnkCWN_c8/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/i9Uhyv2FXxCw8T-Wl8ZnkCWN_c8/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/TechnologyHighlights/~4/qUZcagaRI0Q" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://fandry.blogspot.com/feeds/3777724981729720381/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=743578218566083321&amp;postID=3777724981729720381" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/743578218566083321/posts/default/3777724981729720381?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/743578218566083321/posts/default/3777724981729720381?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/TechnologyHighlights/~3/qUZcagaRI0Q/combining-ihe-transactions.html" title="Combining IHE transactions : Orchestration or Choreography?" /><author><name>fandry</name><uri>http://www.blogger.com/profile/01990790629557446302</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="24" height="32" src="http://bp3.blogger.com/_V_sYr0AnKIc/SEQpDbMcf7I/AAAAAAAABMs/qBizDBN3sXs/S220/fandry.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://2.bp.blogspot.com/--BhzKrfRuYk/TqseCXT7tjI/AAAAAAAACmM/WoPPG7umCwY/s72-c/orchrestration_chorecography.png" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://fandry.blogspot.com/2011/10/combining-ihe-transactions.html</feedburner:origLink></entry><entry gd:etag="W/&quot;Ak8DQ3cycSp7ImA9WhdVF0Q.&quot;"><id>tag:blogger.com,1999:blog-743578218566083321.post-3721250152067139021</id><published>2011-09-23T10:18:00.000-07:00</published><updated>2011-09-23T10:27:52.999-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-09-23T10:27:52.999-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="REST Web Services HTTP cURL cookies JSON API" /><category scheme="http://www.blogger.com/atom/ns#" term="SSL" /><category scheme="http://www.blogger.com/atom/ns#" term="TLS" /><title>cURL tests harness and TLS</title><content type="html">&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;In a &lt;a href="http://fandry.blogspot.com/2011/04/how-to-test-harness-rest-web-services.html"&gt;previous post&lt;/a&gt;, I have explained how to use cURL to test harness REST based Web services. One thing I did not described was how to add &lt;a href="http://en.wikipedia.org/wiki/Transport_Layer_Security"&gt;&lt;b&gt;Transport Layer Security&lt;/b&gt; (&lt;b&gt;TLS&lt;/b&gt;)&lt;/a&gt; in your tests. In other words, how to successfully test REST Web services over &lt;b&gt;HTTPS&lt;/b&gt;?&lt;br /&gt;
&lt;br /&gt;
The &lt;a href="http://curl.haxx.se/docs/"&gt;cURL manual&lt;/a&gt; describes a certain number of options that can be used. One of the most convenient option is &lt;b&gt;-k&lt;/b&gt; or &lt;b&gt;--insecure&lt;/b&gt;. It allows curl to&amp;nbsp; perform&amp;nbsp; "insecure" SSL connections and transfers. All SSL connections are attempted to be made secure by using the CA certificate&amp;nbsp; bundle&amp;nbsp; installed by&amp;nbsp; default. So if you SSL connection does not require client side authentication it is a very quick way to test your web service over SSL:&lt;br /&gt;
&lt;br /&gt;
&lt;span style="font-size: large;"&gt;&lt;span style="color: #38761d;"&gt;&amp;nbsp; curl -k https://www.acme.com/api/version&lt;/span&gt;&lt;/span&gt; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Another useful option can be used if in conjunction to SSL, you need to compress your payload via GZIP for example to optimize the transfer of large messages. In this case, you will use the option -H or --header that will help you specify custom headers to your request:&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &lt;span style="font-size: large;"&gt;&lt;span style="color: #38761d;"&gt;curl -H "Accept-Encoding: gzip,deflate" -k https://www.acme.com/api/users/list&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Notice in that case that the -k or --insecure option is always placed just in front of URL. &lt;br /&gt;
&lt;br /&gt;
Of course, other headers such as the one &lt;a href="http://fandry.blogspot.com/2011/04/how-to-test-harness-rest-web-services.html"&gt;described previously&lt;/a&gt; can be combined:&lt;br /&gt;
&lt;br /&gt;
&lt;div style="color: #38761d;"&gt;&lt;span style="font-size: large;"&gt;&amp;nbsp; curl -c ./cookies.txt --data-binary @login_password.json -H "Content-Type: application/json" -H "Accept-Encoding: gzip,deflate" -k https://www.acme.com/api/users/token&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/743578218566083321-3721250152067139021?l=fandry.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/NuMLVJTcTQBp3Hu-kyBncgedjdk/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/NuMLVJTcTQBp3Hu-kyBncgedjdk/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/NuMLVJTcTQBp3Hu-kyBncgedjdk/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/NuMLVJTcTQBp3Hu-kyBncgedjdk/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/TechnologyHighlights/~4/dqYOX1sbfcs" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://fandry.blogspot.com/feeds/3721250152067139021/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=743578218566083321&amp;postID=3721250152067139021" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/743578218566083321/posts/default/3721250152067139021?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/743578218566083321/posts/default/3721250152067139021?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/TechnologyHighlights/~3/dqYOX1sbfcs/curl-tests-harness-and-tls.html" title="cURL tests harness and TLS" /><author><name>fandry</name><uri>http://www.blogger.com/profile/01990790629557446302</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="24" height="32" src="http://bp3.blogger.com/_V_sYr0AnKIc/SEQpDbMcf7I/AAAAAAAABMs/qBizDBN3sXs/S220/fandry.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://fandry.blogspot.com/2011/09/curl-tests-harness-and-tls.html</feedburner:origLink></entry><entry gd:etag="W/&quot;D08DQXY6eCp7ImA9WhdVFkk.&quot;"><id>tag:blogger.com,1999:blog-743578218566083321.post-9217031121605679213</id><published>2011-08-31T15:10:00.000-07:00</published><updated>2011-09-21T15:57:50.810-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-09-21T15:57:50.810-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Healthcare" /><category scheme="http://www.blogger.com/atom/ns#" term="technology. sensors" /><category scheme="http://www.blogger.com/atom/ns#" term="cost" /><category scheme="http://www.blogger.com/atom/ns#" term="medication" /><category scheme="http://www.blogger.com/atom/ns#" term="adherence" /><title>Medication Adherence - How technology can help?</title><content type="html">&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;Looking for ideas to&lt;b&gt; reduce the rise of health care cost&lt;/b&gt;? Easy! Ask patients to &lt;b&gt;swallow their medication&lt;/b&gt;!&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-U4kAsoGQtzE/Tl6r4MD0l_I/AAAAAAAAClw/AfLoR98lR9I/s1600/pillshead.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="377" src="http://1.bp.blogspot.com/-U4kAsoGQtzE/Tl6r4MD0l_I/AAAAAAAAClw/AfLoR98lR9I/s400/pillshead.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
According to &lt;a href="http://www.fiercehealthcare.com/story/patients-not-taking-medications-cost-300b/2011-05-27"&gt;recent studies&lt;/a&gt;, the &lt;b&gt;lack of prescription medication adherence cost between $250 and $300 billion annually&lt;/b&gt;, including $100 billion in hospitalization. For example, it is estimated that in the US 89,000 deaths annually are due to non adherence to anti-hypertensive treatments. This problem is particularly acute for patients with coexisting conditions who take a variety of medications sometimes prescribed by different physicians.&lt;br /&gt;
&lt;br /&gt;
Obviously &lt;b&gt;doctors &lt;/b&gt;and &lt;b&gt;pharmacists&lt;/b&gt; have a critical role to encourage patients and caregivers to administrate medication correctly and rigorously.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;C&lt;/b&gt;&lt;b&gt;ost is not necessarily the main factor&lt;/b&gt;: even when drugs are free, adherence rate is 60% in the US and only %50 in developed countries. In other words, improvements in&lt;b&gt; co-payments structures&lt;/b&gt; will only partially improve adherence. Another area of possible improvement will be the use of&lt;b&gt; &lt;a href="http://en.wikipedia.org/wiki/Fee-for-service"&gt;fee-for-service model&lt;/a&gt;&lt;/b&gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Another way to improve&lt;b&gt; medication adherence&lt;/b&gt; is the proper use of specific &lt;b&gt;technologies&lt;/b&gt;:&lt;br /&gt;
&lt;br /&gt;
Here are some suggestions: &lt;br /&gt;
&lt;ul style="text-align: left;"&gt;&lt;li&gt;the integration of practice EMRs systems and pharmacies via &lt;a href="http://www.axolotl.com/solutions/health-information-exchange-solutions.html"&gt;HIE solutions&lt;/a&gt; (a lot of practices are still using paper). &lt;/li&gt;
&lt;/ul&gt;&lt;ul style="text-align: left;"&gt;&lt;li&gt;accurate and Electronic Health records (EMRs, and PHRs) that help verify &lt;a href="http://www.nlm.nih.gov/medlineplus/druginformation.html"&gt;drug, herbs, supplements interactions and countraindications&lt;/a&gt;. The &lt;a href="http://fandry.blogspot.com/2010/04/soa-and-health-care-meaningful-use.html"&gt;meaningful use&lt;/a&gt; guidelines go in this direction. &lt;/li&gt;
&lt;/ul&gt;&lt;ul style="text-align: left;"&gt;&lt;li&gt;wider use of &lt;a href="http://www.express-scripts.com/research/studies/drugtrendreport/2010/dtrFinal.pdf"&gt;medication home delivery&lt;/a&gt; (recognized as a way to save cost by introducing better competition)&amp;nbsp; &lt;/li&gt;
&lt;/ul&gt;&lt;ul style="text-align: left;"&gt;&lt;li&gt;&lt;a href="http://www.ama-assn.org/amednews/2010/12/06/prsd1206.htm"&gt;electronic monitoring systems coupled with personalized counseling&lt;/a&gt; has shown improvement in medication adherence rates to patients &lt;/li&gt;
&lt;/ul&gt;&lt;ul style="text-align: left;"&gt;&lt;/ul&gt;&lt;ul style="text-align: left;"&gt;&lt;li&gt;online &lt;a href="https://dwp1.dhs.oregon.gov/WellnessAtWork"&gt;incentive programs&lt;/a&gt; (e.g. provided by the employers) to promote prevention, quality of life and best practices in therapy. It is recognized that financial incentives and other rewards when well designed and targeted can&lt;a href="http://healthpolicyandreform.nejm.org/?p=3280"&gt; improve adherence&lt;/a&gt; (smaller and higher reward frequency is usually more efficient than big and sporadic rewards). &lt;/li&gt;
&lt;/ul&gt;&lt;ul style="text-align: left;"&gt;&lt;li&gt; advances in &lt;a href="http://en.wikipedia.org/wiki/Personalized_medicine"&gt;personalized medicine&lt;/a&gt; can help taylored medication intake and increase medication adherence&lt;/li&gt;
&lt;/ul&gt;&lt;ul style="text-align: left;"&gt;&lt;li&gt;&amp;nbsp;&lt;a href="http://healthpolicyandreform.nejm.org/?p=3280"&gt;screening and assessment tools&lt;/a&gt; (e.g. patients with chronic conditions could be screened for depression leading to poor medication adherence). &lt;/li&gt;
&lt;/ul&gt;&lt;ul style="text-align: left;"&gt;&lt;li&gt;new high-tech integrated devices including: &lt;/li&gt;
&lt;ul&gt;&lt;li&gt;Home devices such as the well known&lt;a href="http://www.physorg.com/news201933408.html"&gt; high-tech Japanese toilets&lt;/a&gt; which provide urine analysis, blood pressure, weight and body temperature &lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.asianhhm.com/knowledge_bank/articles/RFID_Healthcare.htm"&gt;Radio Frequency Identification (RFID)&lt;/a&gt; based wireless &lt;a href="http://www.hinz.org.nz/uploads/file/2010conference/P23_Montefiore.pdf"&gt;sensor device&lt;/a&gt; can help track drug taking compliance&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.healthtechzone.com/topics/healthcare/articles/80677-medminder-wireless-pill-organizer-medication-adherence.htm"&gt;Wireless pills organizers&lt;/a&gt; designed to simplify medication management and improve adherence&lt;/li&gt;
&lt;li&gt;Personalized wearable sensors such as the latest &lt;a href="http://www.npr.org/blogs/thetwo-way/2011/08/11/139554014/new-electronic-sensors-stick-to-skin-as-temporary-tattoos"&gt;electronic temporary tattoo&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;/ul&gt;With the amount of money at stake, I am sure there is a large number of companies, including start-ups, who are working hard on this problem. So stay tune!&lt;br /&gt;
&lt;br /&gt;
Finally, we have to keep in mind, that &lt;a href="http://healthpolicyandreform.nejm.org/?p=3280"&gt;other factors&lt;/a&gt; including lifestyle, psychological issues and health literacy play an important role as well. And these are not negligible! &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/743578218566083321-9217031121605679213?l=fandry.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/rGhnYWp7vO9Zuae6WW7srfBrDK4/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/rGhnYWp7vO9Zuae6WW7srfBrDK4/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/rGhnYWp7vO9Zuae6WW7srfBrDK4/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/rGhnYWp7vO9Zuae6WW7srfBrDK4/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/TechnologyHighlights/~4/o5vPIcwF0Sg" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://fandry.blogspot.com/feeds/9217031121605679213/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=743578218566083321&amp;postID=9217031121605679213" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/743578218566083321/posts/default/9217031121605679213?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/743578218566083321/posts/default/9217031121605679213?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/TechnologyHighlights/~3/o5vPIcwF0Sg/medication-adherence-how-technology-can.html" title="Medication Adherence - How technology can help?" /><author><name>fandry</name><uri>http://www.blogger.com/profile/01990790629557446302</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="24" height="32" src="http://bp3.blogger.com/_V_sYr0AnKIc/SEQpDbMcf7I/AAAAAAAABMs/qBizDBN3sXs/S220/fandry.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://1.bp.blogspot.com/-U4kAsoGQtzE/Tl6r4MD0l_I/AAAAAAAAClw/AfLoR98lR9I/s72-c/pillshead.png" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://fandry.blogspot.com/2011/08/medication-adherence-how-technology-can.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CUYMRHg7cSp7ImA9WhdQEkw.&quot;"><id>tag:blogger.com,1999:blog-743578218566083321.post-8161255514131956069</id><published>2011-07-29T11:59:00.000-07:00</published><updated>2011-08-12T22:26:25.609-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-08-12T22:26:25.609-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="SOAP" /><category scheme="http://www.blogger.com/atom/ns#" term="SAML" /><category scheme="http://www.blogger.com/atom/ns#" term="Web Service" /><category scheme="http://www.blogger.com/atom/ns#" term="soapUI" /><title>How to test secure web services with soapUI - part #2</title><content type="html">&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;br /&gt;
In&amp;nbsp; a &lt;a href="http://fandry.blogspot.com/2011/05/how-to-test-secure-web-services-with.html"&gt;previous article&lt;/a&gt; I described how to specify signature and encryption for outgoing Secured Web Services request.&lt;br /&gt;
&lt;br /&gt;
&lt;u&gt;&lt;span style="font-size: large;"&gt;&lt;b&gt;1. SAML &lt;/b&gt;&lt;/span&gt;&lt;/u&gt;&lt;br /&gt;
&lt;br /&gt;
In this second article I will talk about SAML and incoming Secure Web Service responses.&lt;br /&gt;
&lt;br /&gt;
If you are using SAML 1.X then you just need to add a &lt;a href="http://en.wikipedia.org/wiki/SAML_1.1"&gt;SAML 1.X&lt;/a&gt; assertion in the corresponding window.&lt;br /&gt;
You may have to add a timestamp as follow:&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-lF20RNaaAA8/TjL3X3NM_KI/AAAAAAAAClE/p6HUA7f70cQ/s1600/timestamp.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="638" src="http://2.bp.blogspot.com/-lF20RNaaAA8/TjL3X3NM_KI/AAAAAAAAClE/p6HUA7f70cQ/s640/timestamp.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In this example, we specify 10,000 milliseconds (10 seconds) for the life time of the Timestamp:&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-dnJkj7M86wA/TjL3ehnVHeI/AAAAAAAAClI/SxokUc5qgV4/s1600/timestamp2.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="640" src="http://3.bp.blogspot.com/-dnJkj7M86wA/TjL3ehnVHeI/AAAAAAAAClI/SxokUc5qgV4/s640/timestamp2.png" width="638" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-IGDjPWTcUqI/TjL4GLpP4OI/AAAAAAAAClM/luymf2O57Yk/s1600/SAML.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="638" src="http://3.bp.blogspot.com/-IGDjPWTcUqI/TjL4GLpP4OI/AAAAAAAAClM/luymf2O57Yk/s640/SAML.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;a href="http://en.wikipedia.org/wiki/Security_Assertion_Markup_Language"&gt;SAML 1.X&lt;/a&gt; assertions are copied and pasted in the SAML tab:&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-EGQd7G437wc/TjL4d45rh3I/AAAAAAAAClY/xFCCkNQTfgY/s1600/SAML_1.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="640" src="http://2.bp.blogspot.com/-EGQd7G437wc/TjL4d45rh3I/AAAAAAAAClY/xFCCkNQTfgY/s640/SAML_1.png" width="582" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Of course, if you combine signature and encryption with SAML 1.X. You can those to the configuration tabs as well.&lt;br /&gt;
&lt;br /&gt;
For &lt;a href="http://en.wikipedia.org/wiki/SAML_2.0"&gt;SAML 2.&lt;/a&gt;0, the only option you have for this version of soapUI is to add it manually to the WSSE section of your SOAP request:&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/-bW12lhf9XiY/TjL6FN6W8mI/AAAAAAAAClc/Pwmvs_Cw2i0/s1600/SAML_2.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="640" src="http://4.bp.blogspot.com/-bW12lhf9XiY/TjL6FN6W8mI/AAAAAAAAClc/Pwmvs_Cw2i0/s640/SAML_2.png" width="270" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;u&gt;&lt;b&gt;&lt;span style="font-size: large;"&gt;2. Incoming Secure Web Service&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;/u&gt;&lt;br /&gt;
&lt;u&gt;&lt;b&gt;&lt;span style="font-size: large;"&gt;Responses&lt;/span&gt;&lt;/b&gt;&lt;/u&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Setting up incoming secure Web services responses encrypted and/or signed is easier than for outgoing request:&lt;br /&gt;
&lt;br /&gt;
1) Make sure that you have Keystores / Certificates tab set - You probably have done that earlier as described in &lt;a href="http://fandry.blogspot.com/2011/05/how-to-test-secure-web-services-with.html"&gt;part #1 of this article&lt;/a&gt;.&lt;br /&gt;
You verify the signature with public key contained in the server's sender certificate/store and your private key to decrypt what the other server sends you.&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-wtZ7JG-u0dg/TjL7gL0orII/AAAAAAAAClg/JdKdUIIUkTo/s1600/soapUI_keystores_WSS.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="212" src="http://2.bp.blogspot.com/-wtZ7JG-u0dg/TjL7gL0orII/AAAAAAAAClg/JdKdUIIUkTo/s640/soapUI_keystores_WSS.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
2) Create an incoming WSS configuration (e.g. my_config_from_server_A) that will decrypt the incoming SOAP requests coming from server A:&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-CLX7JXTdo_s/TjMADjhB65I/AAAAAAAAClk/T99u1PAM7XE/s1600/incoming_WSS.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="640" src="http://2.bp.blogspot.com/-CLX7JXTdo_s/TjMADjhB65I/AAAAAAAAClk/T99u1PAM7XE/s640/incoming_WSS.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You specify that you want to use your keystore to decrypt the message and the server's certificate/store to verify the signature of server A&lt;br /&gt;
(theses should appear in the drop box for each field):&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-bzfWindoAFs/TjMAjKocmmI/AAAAAAAAClo/7_B0plMT0KI/s1600/incoming_WSS_2.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="273" src="http://3.bp.blogspot.com/-bzfWindoAFs/TjMAjKocmmI/AAAAAAAAClo/7_B0plMT0KI/s640/incoming_WSS_2.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3) Last, you want to specify that you are using the  incoming configuration for each request:&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-EbsYPZysgyQ/TjMC63VpsBI/AAAAAAAACls/QSgKVNNkoIk/s1600/incoming_WSS_3.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="230" src="http://3.bp.blogspot.com/-EbsYPZysgyQ/TjMC63VpsBI/AAAAAAAACls/QSgKVNNkoIk/s640/incoming_WSS_3.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Enjoy!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/743578218566083321-8161255514131956069?l=fandry.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/r-Z3J1o2keijzajahiJoiacDcaU/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/r-Z3J1o2keijzajahiJoiacDcaU/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/r-Z3J1o2keijzajahiJoiacDcaU/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/r-Z3J1o2keijzajahiJoiacDcaU/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/TechnologyHighlights/~4/kHwo6XArm2g" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://fandry.blogspot.com/feeds/8161255514131956069/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=743578218566083321&amp;postID=8161255514131956069" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/743578218566083321/posts/default/8161255514131956069?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/743578218566083321/posts/default/8161255514131956069?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/TechnologyHighlights/~3/kHwo6XArm2g/how-to-test-secure-web-services-with.html" title="How to test secure web services with soapUI - part #2" /><author><name>fandry</name><uri>http://www.blogger.com/profile/01990790629557446302</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="24" height="32" src="http://bp3.blogger.com/_V_sYr0AnKIc/SEQpDbMcf7I/AAAAAAAABMs/qBizDBN3sXs/S220/fandry.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://2.bp.blogspot.com/-lF20RNaaAA8/TjL3X3NM_KI/AAAAAAAAClE/p6HUA7f70cQ/s72-c/timestamp.png" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://fandry.blogspot.com/2011/07/how-to-test-secure-web-services-with.html</feedburner:origLink></entry><entry gd:etag="W/&quot;A0cFRHs9fCp7ImA9WhZaEUQ.&quot;"><id>tag:blogger.com,1999:blog-743578218566083321.post-3864567191841868664</id><published>2011-06-27T11:18:00.000-07:00</published><updated>2011-06-27T11:23:35.564-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-06-27T11:23:35.564-07:00</app:edited><title>Problem initializing the class javax.crypto.SunJCE_b with soapUI ?</title><content type="html">&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;Last week, I have decided to &lt;a href="http://www.eviware.com/Download-soapUI/download-soapui-pro.html"&gt;download and&amp;nbsp; install the lastest soapUI PRO&lt;/a&gt; version 4.0 from Eviware.&lt;br /&gt;
I have been using soapUI for some time to&lt;a href="http://fandry.blogspot.com/2011/05/how-to-test-secure-web-services-with.html"&gt; test secure SOAP Web services&lt;/a&gt; using SSL/TLS as well as encrypting and signing the SOAP payload.&lt;br /&gt;
&lt;br /&gt;
However when I tried to use my existing projects I end-up with the following errors in my soapUI log:&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;&lt;b&gt;Wed Jun 22 11:43:05 PDT 2011:&lt;/b&gt;&lt;b style="color: #cc0000;"&gt;ERROR:java.lang.NoClassDefFoundError: Could not initialize class javax.crypto.SunJCE_b
   java.lang.NoClassDefFoundError: Could not initialize class javax.crypto.SunJCE_b&lt;/b&gt;&lt;b&gt;
    &lt;span style="color: #274e13;"&gt;at javax.crypto.KeyGenerator.a(DashoA13*..)
    at javax.crypto.KeyGenerator.&lt;/span&gt;&lt;/b&gt;&lt;init&gt;&lt;b&gt;&lt;span style="color: #274e13;"&gt;(DashoA13*..)
    at javax.crypto.KeyGenerator.getInstance(DashoA13*..)
    at org.apache.ws.security.message.WSSecEncrypt.getKeyGenerator(WSSecEncrypt.java:701)
    at org.apache.ws.security.message.WSSecEncrypt.prepare(WSSecEncrypt.java:228)
    at org.apache.ws.security.message.WSSecEncrypt.build(WSSecEncrypt.java:291)
    at com.eviware.soapui.impl.wsdl.support.wss.entries.AddEncryptionEntry.process(AddEncryptionEntry.java:311)
    at com.eviware.soapui.impl.wsdl.support.wss.OutgoingWss.processOutgoing(OutgoingWss.java:157)
    at com.eviware.soapui.impl.wsdl.submit.filters.WssRequestFilter.filterWsdlRequest(WssRequestFilter.java:58)
    at com.eviware.soapui.impl.wsdl.submit.filters.AbstractRequestFilter.filterAbstractHttpRequest(AbstractRequestFilter.java:37)
    at com.eviware.soapui.impl.wsdl.submit.filters.AbstractRequestFilter.filterRequest(AbstractRequestFilter.java:31)
    at com.eviware.soapui.impl.wsdl.submit.transports.http.HttpClientRequestTransport.sendRequest(HttpClientRequestTransport.java:133)
    at com.eviware.soapui.impl.wsdl.WsdlSubmit.run(WsdlSubmit.java:123)
    at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
    at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
    at java.util.concurrent.FutureTask.run(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)&lt;/span&gt;
&lt;/b&gt;
&lt;/init&gt;&lt;/pre&gt;&lt;br /&gt;
A quick search on the web told me to check if my some of my security setup in my JRE was properly configured.&lt;br /&gt;
For this it was recommended to check the security directory under the lib folder (&lt;span style="color: #38761d;"&gt;.\Java\jre6\lib\security&lt;/span&gt;):&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-53ZJ3pKw3L8/TgjHhI2KhHI/AAAAAAAACkg/mkfgVfHdH8A/s1600/JRE_security_folder.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="216" src="http://3.bp.blogspot.com/-53ZJ3pKw3L8/TgjHhI2KhHI/AAAAAAAACkg/mkfgVfHdH8A/s640/JRE_security_folder.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I also checked the content of the content of the jar file &lt;span style="color: #38761d;"&gt;./Java/jre6/lib/jce.jar&lt;/span&gt; which should contain the missing class in question:&lt;b&gt;&lt;b&gt;&amp;nbsp; javax.crypto.SunJCE_b&lt;/b&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
However everything looked fine. Even though my JRE was almost up-to-date, I finally managed to fix this issue by &lt;a href="http://www.oracle.com/technetwork/java/javase/downloads/index.html"&gt;upgrading my java JRE &lt;/a&gt;to the latest version! &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/743578218566083321-3864567191841868664?l=fandry.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/V6Enn62cVZ3K8glm2TQYZaBSDcI/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/V6Enn62cVZ3K8glm2TQYZaBSDcI/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/V6Enn62cVZ3K8glm2TQYZaBSDcI/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/V6Enn62cVZ3K8glm2TQYZaBSDcI/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/TechnologyHighlights/~4/xcA6bAWePy4" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://fandry.blogspot.com/feeds/3864567191841868664/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=743578218566083321&amp;postID=3864567191841868664" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/743578218566083321/posts/default/3864567191841868664?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/743578218566083321/posts/default/3864567191841868664?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/TechnologyHighlights/~3/xcA6bAWePy4/problem-initializing-class.html" title="Problem initializing the class javax.crypto.SunJCE_b with soapUI ?" /><author><name>fandry</name><uri>http://www.blogger.com/profile/01990790629557446302</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="24" height="32" src="http://bp3.blogger.com/_V_sYr0AnKIc/SEQpDbMcf7I/AAAAAAAABMs/qBizDBN3sXs/S220/fandry.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://3.bp.blogspot.com/-53ZJ3pKw3L8/TgjHhI2KhHI/AAAAAAAACkg/mkfgVfHdH8A/s72-c/JRE_security_folder.png" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://fandry.blogspot.com/2011/06/problem-initializing-class.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CkAESHw-eCp7ImA9WhdWGEs.&quot;"><id>tag:blogger.com,1999:blog-743578218566083321.post-2456445164933013525</id><published>2011-05-31T22:59:00.000-07:00</published><updated>2011-09-12T13:51:49.250-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-09-12T13:51:49.250-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="soapUI SOAP Web services" /><title>How to test secure web services with soapUI - part #1</title><content type="html">&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Recently I have been involved in a &lt;a href="http://www.blogger.com/"&gt;SOA&lt;/a&gt; project which goal is to &lt;a href="http://weblogs.java.net/blog/johnreynolds/archive/2006/01/service_orchest.html"&gt;orchestrate&lt;/a&gt;&amp;nbsp; &lt;a href="http://www.blogger.com/"&gt;IHE integration profiles&lt;/a&gt; &lt;a href="http://en.wikipedia.org/wiki/SOAP"&gt;SOAP web services&lt;/a&gt; (&lt;a href="http://www.ihe.net/Technical_Framework/upload/IHE_ITI_Suppl_XCPD_Rev2-1_TI_2010-08_10.pdf"&gt;XCPD&lt;/a&gt; &amp;amp; &lt;a href="http://wiki.ihe.net/index.php?title=Cross-Comunity_Access"&gt;XCA&lt;/a&gt;) using an &lt;a href="http://en.wikipedia.org/wiki/Enterprise_service_bus"&gt;enterprise service bus (ESB)&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
The security characteristics of these web services include &lt;a href="http://en.wikipedia.org/wiki/Digital_certificates"&gt;digital certificates&lt;/a&gt; for transport level security two-way transport layer security (&lt;a href="http://en.wikipedia.org/wiki/Transport_Layer_Security"&gt;TLS&lt;/a&gt;),&amp;nbsp; message level security (&lt;a href="http://en.wikipedia.org/wiki/Encryption"&gt;encryption&lt;/a&gt; and &lt;a href="http://en.wikipedia.org/wiki/Digital_signature"&gt;digital signature&lt;/a&gt;) as well as &lt;a href="http://en.wikipedia.org/wiki/Single_sign-on"&gt;single sign-on (SSO)&lt;/a&gt; based authentication using &lt;a href="http://en.wikipedia.org/wiki/SAML_2.0"&gt;SAML 2.0&lt;/a&gt; assertions.&lt;br /&gt;
&lt;br /&gt;
One of the challenges was to find a tool we could use to create test harness for these web services, but also to simulate and mock some of these same services during development and testing.&lt;br /&gt;
&lt;br /&gt;
For this I used &lt;a href="http://www.soapui.org/soapUI-in-the-news/"&gt;soapUI&lt;/a&gt;. Overall it was not too complicated, except the support for SAML 2.0 since the current version of &lt;a href="http://sourceforge.net/projects/soapui/files/soapui/"&gt;soapUI (4.0) &lt;/a&gt;only supports &lt;a href="http://en.wikipedia.org/wiki/SAML_1.1"&gt;SAML 1.1&lt;/a&gt; out-of-the-box.&lt;br /&gt;
&lt;br /&gt;
Initially security features on the XCPD web service were&amp;nbsp; turned off so we could test the basic SOAP web service functionalities. For this a new soapUI project was created by introspecting the XCPD service &lt;a href="http://en.wikipedia.org/wiki/WSDL"&gt;Web Services Description Language (WSDL)&lt;/a&gt; file: &lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-hxrzEmsGaqA/TeWv1WSWBdI/AAAAAAAACjY/Idr178RBjz4/s1600/soapUI_new_project.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://2.bp.blogspot.com/-hxrzEmsGaqA/TeWv1WSWBdI/AAAAAAAACjY/Idr178RBjz4/s1600/soapUI_new_project.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To make the initial project simple,&lt;b&gt; no test suite has been created&lt;/b&gt; and the&lt;b&gt; initial operation&lt;/b&gt; has been re-labelled "RespondingGateway_XCPD" and its &lt;b&gt;sample request&lt;/b&gt; has been modified to query a specific test patient (Joan Hunter) and renamed XCPD_PATIENT_JOAN_HUNTER:&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-cKUY1kiGDH8/TeWzNja0QxI/AAAAAAAACjg/sHvmFi99FsA/s1600/soapUI_initial_project.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://2.bp.blogspot.com/-cKUY1kiGDH8/TeWzNja0QxI/AAAAAAAACjg/sHvmFi99FsA/s1600/soapUI_initial_project.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The test is done by submitting the request to the XCPD end-point:&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-no4S08iEu5w/TeXHM_RhxpI/AAAAAAAACj0/o1Q_-5cZZBI/s1600/soapUI_XCPD_request.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://3.bp.blogspot.com/-no4S08iEu5w/TeXHM_RhxpI/AAAAAAAACj0/o1Q_-5cZZBI/s1600/soapUI_XCPD_request.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This returns in the response window the XCPD response.&lt;br /&gt;
&lt;br /&gt;
In the next steps, we will setup all the security features for querying our XCPD service :&lt;br /&gt;
&lt;ul&gt;&lt;li&gt; &lt;a href="http://en.wikipedia.org/wiki/Digital_certificates"&gt;digital certificates&lt;/a&gt; for transport level security two-way transport layer security (&lt;a href="http://en.wikipedia.org/wiki/Transport_Layer_Security"&gt;TLS&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt; message level security (&lt;a href="http://en.wikipedia.org/wiki/Encryption"&gt;encryption&lt;/a&gt; and &lt;a href="http://en.wikipedia.org/wiki/Digital_signature"&gt;digital signature&lt;/a&gt;) as well as &lt;a href="http://en.wikipedia.org/wiki/Single_sign-on"&gt;single sign-on (SSO)&lt;/a&gt; based authentication using &lt;a href="http://en.wikipedia.org/wiki/SAML_2.0"&gt;SAML 2.0&lt;/a&gt; assertions.&lt;/li&gt;
&lt;/ul&gt;The &lt;a href="http://en.wikipedia.org/wiki/SAML_2.0"&gt;SAML 2.0&lt;/a&gt;  assertion will be described in the part two of this post.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span style="font-size: large;"&gt;&lt;u&gt;1. TLS setup&lt;/u&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
First we need to indicate that we are using SSL on top of HTTP for the transport layer. For this we need to setup the client keystore via&lt;b&gt;&lt;span style="color: #38761d;"&gt; file/preference/SSL settings&lt;/span&gt;&lt;/b&gt; (from the machine where soapUI will run):&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-95Qov4h1X0Y/TfZBfeobQoI/AAAAAAAACkQ/8U7Fhx0EbzY/s1600/soapUI_SSL.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="297" src="http://3.bp.blogspot.com/-95Qov4h1X0Y/TfZBfeobQoI/AAAAAAAACkQ/8U7Fhx0EbzY/s640/soapUI_SSL.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;a href="http://3.bp.blogspot.com/-KloCGFETPTk/TeXX-Ki3GdI/AAAAAAAACj4/nOPN5LWiRqE/s1600/soapUI_SSL.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;br /&gt;
&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span style="font-size: large;"&gt;&lt;u&gt;2. Message level security&lt;/u&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Probably the first thing you want is to specify your keystores and certificates if you decide to have mutal secure communication. You will use your private key from your key store (&lt;b&gt;my_key_store.jks&lt;/b&gt;) to sign messages you send and decrypt the payloads you receive, and you will use specific server public key/certificate (&lt;b&gt;a_another_server_keystore.jks&lt;/b&gt;) to encrypt the SOAP messages you send and verify signatures you receive. The server with whom you have secure mutual communication will do the reverse.&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-QUjjpb9J5TE/TfGl9ZXlmyI/AAAAAAAACkA/iCZf_kWC0P0/s1600/soapUI_keystores_WSS.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="211" src="http://2.bp.blogspot.com/-QUjjpb9J5TE/TfGl9ZXlmyI/AAAAAAAACkA/iCZf_kWC0P0/s640/soapUI_keystores_WSS.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span style="font-size: large;"&gt;&lt;u&gt; &lt;/u&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The soapUI message level security configuration for SOAP (&lt;a href="http://en.wikipedia.org/wiki/WS-Security"&gt;&lt;b&gt;WS-security&lt;/b&gt;&lt;/a&gt;) can be setup by selecting our soapUI project XCPD_Tests, right-click and select&lt;b&gt;&lt;span style="color: #38761d;"&gt; Show Project View &lt;/span&gt;&lt;/b&gt;&lt;span style="color: #38761d;"&gt;&lt;span style="color: black;"&gt;and then add using the sign + in the &lt;b&gt;&lt;span style="color: #38761d;"&gt;out-going WS-Security configuration&lt;/span&gt;&lt;/b&gt;&lt;span style="color: black;"&gt; :&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-aY3v3EBVoHE/TfFQ0wLoO4I/AAAAAAAACj8/99fVY_BFbmc/s1600/soapUI_XCPD_outgoing_WSS.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="416" src="http://2.bp.blogspot.com/-aY3v3EBVoHE/TfFQ0wLoO4I/AAAAAAAACj8/99fVY_BFbmc/s640/soapUI_XCPD_outgoing_WSS.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;span style="color: #38761d;"&gt;&lt;span style="color: black;"&gt;&lt;span style="color: black;"&gt;&amp;nbsp;&lt;/span&gt; &lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You then specify your configurations (e.g. &lt;b&gt;my_config_to_server_A&lt;/b&gt;) for outgoing messages and similarly to ingoing messages.&lt;br /&gt;
&lt;br /&gt;
Here how you would define a configuration in the &lt;b&gt;Outgoing WS-security Configurations tab&lt;/b&gt;:&lt;br /&gt;
&lt;br /&gt;
&lt;ol style="text-align: left;"&gt;&lt;li&gt;add a &lt;b&gt;signature &lt;/b&gt;tab a&lt;/li&gt;
&lt;li&gt;add an&lt;b&gt; encryption &lt;/b&gt;tab (is you also use SAML 1.1 you would also add a &lt;b&gt;SAML &lt;/b&gt;tab and a &lt;b&gt;timestamp &lt;/b&gt;tab before adding the signature and the encryption).&lt;/li&gt;
&lt;/ol&gt;&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-GnaQTtCsGu8/TfGng0eZnyI/AAAAAAAACkE/qUjlstcTKrw/s1600/soapUI_add_encryption.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="521" src="http://2.bp.blogspot.com/-GnaQTtCsGu8/TfGng0eZnyI/AAAAAAAACkE/qUjlstcTKrw/s640/soapUI_add_encryption.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;u&gt;&lt;span style="font-size: large;"&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/u&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;u&gt;&lt;span style="font-size: large;"&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;2a. Signature&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/u&gt;&lt;br /&gt;
&lt;br /&gt;
In the &lt;b&gt;Signature tab&lt;/b&gt;, you specify:&lt;br /&gt;
&lt;ul style="text-align: left;"&gt;&lt;li&gt;the &lt;b&gt;keystore that contain the private key to sign the messages you are going to send (usually your private key - expect if you want to mock another server)&lt;br /&gt;
&lt;/b&gt;&lt;/li&gt;
&lt;li&gt;the &lt;b&gt;alias for the key to use for signature&lt;/b&gt;&lt;/li&gt;
&lt;li&gt;the &lt;b&gt;certificate password&lt;/b&gt;&lt;/li&gt;
&lt;li&gt;the &lt;b&gt;key identifier type&lt;/b&gt; (none, binary security token, X509 certificate or subject key identifier)&lt;/li&gt;
&lt;li&gt;the &lt;b&gt;signature algorithm&lt;/b&gt; (e.g SHA256)&lt;/li&gt;
&lt;li&gt;the &lt;b&gt;signature canonicalization&lt;/b&gt;&lt;/li&gt;
&lt;li&gt;the &lt;b&gt;number of certificates used to sign&lt;/b&gt;&lt;/li&gt;
&lt;li&gt;the &lt;b&gt;parts you want to sign &lt;/b&gt;(e.g. the &lt;b&gt;&lt;span style="color: #38761d;"&gt;content&lt;/span&gt; &lt;/b&gt;of the &lt;b style="color: #38761d;"&gt;body &lt;/b&gt;of namespace&lt;b style="color: #38761d;"&gt; http://www.w3.org/2003/05/soap-envelope&lt;/b&gt;) &lt;br /&gt;
&lt;/li&gt;
&lt;/ul&gt;&lt;br /&gt;
&lt;ul style="text-align: left;"&gt;&lt;/ul&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-2Ojoe8Gd1yw/TfZHVJFo1tI/AAAAAAAACkU/i1n7C-4v5to/s1600/soapUI_signature.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="577" src="http://1.bp.blogspot.com/-2Ojoe8Gd1yw/TfZHVJFo1tI/AAAAAAAACkU/i1n7C-4v5to/s640/soapUI_signature.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;a href="http://2.bp.blogspot.com/-FhGiRjM4vRY/TfGr8FLZrDI/AAAAAAAACkI/wqaAPihzvJM/s1600/soapUI_signature.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;br /&gt;
&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;ul style="text-align: left;"&gt;&lt;/ul&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;u&gt;&lt;span style="font-size: large;"&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;2b. Encryption&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/u&gt;&lt;br /&gt;
&lt;span style="font-size: large;"&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt; &lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
In the &lt;b&gt;Encryption tab&lt;/b&gt;, you specify:&lt;br /&gt;
&lt;ul style="text-align: left;"&gt;&lt;li&gt;the &lt;b&gt;public key of the server you are sending your SOAP messages to&lt;/b&gt;&lt;/li&gt;
&lt;li&gt;the &lt;b&gt;alias for the key to use for encryption&lt;/b&gt;&lt;/li&gt;
&lt;li&gt;the &lt;b&gt;certificate password&lt;/b&gt;&lt;/li&gt;
&lt;li&gt;the &lt;b&gt;key identifier type&lt;/b&gt;  (none, binary security token, Issuer Name and Serial, X509 certificate,  subject key identifier, Embedded KeyInfo, Embedded SecurityToken  Reference, Thumbprint SHA1 Identifier)&lt;/li&gt;
&lt;li&gt;an &lt;b&gt;embedded key name &lt;/b&gt;(if any)&lt;b&gt; &lt;/b&gt;&lt;/li&gt;
&lt;li&gt;an &lt;b&gt;embedded key password &lt;/b&gt;(if any)&lt;/li&gt;
&lt;li&gt;a &lt;b&gt;symmetric encoding algorithm&lt;/b&gt;&lt;/li&gt;
&lt;li&gt; a &lt;b&gt;key encryption algorithm&lt;/b&gt;&amp;nbsp;&lt;/li&gt;
&lt;li&gt;the &lt;b&gt;encryption canonicalization&lt;/b&gt;&lt;/li&gt;
&lt;li&gt;the &lt;b&gt;number of certificates used to sign&lt;/b&gt;&lt;/li&gt;
&lt;li&gt;the &lt;b&gt;parts you want to encrypt &lt;/b&gt;(e.g. the &lt;b&gt;&lt;span style="color: #38761d;"&gt;content&lt;/span&gt; &lt;/b&gt;of the &lt;b style="color: #38761d;"&gt;body &lt;/b&gt;of namespace&lt;b style="color: #38761d;"&gt; http://www.w3.org/2003/05/soap-envelope&lt;/b&gt;) &lt;/li&gt;
&lt;/ul&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/-POVE_mwYN3g/TfZIi_bsnSI/AAAAAAAACkY/Jp5toNltlEs/s1600/soapUI_encryption.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="630" src="http://4.bp.blogspot.com/-POVE_mwYN3g/TfZIi_bsnSI/AAAAAAAACkY/Jp5toNltlEs/s640/soapUI_encryption.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;a href="http://1.bp.blogspot.com/-BQMlFrJ1F3g/TfGwdeIywSI/AAAAAAAACkM/_aRUqzTLqyU/s1600/soapUI_encryption.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;br /&gt;
&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
And finally, last but not least, you need to specify for the request which outgoing security configuration you want to choose. In our case we have defined only one configuration: &lt;b&gt;my_config_to_server_A &lt;/b&gt;at the project level. To select the configuration, click on the &lt;b&gt;Auth Tab&lt;/b&gt; at the bottom of the request window, select in the drop-down Outgoing WSS field your configuration. Create and configuring incoming Secure Web Services will be very similar.&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-WpvIPkAnyrU/ThNOMlptfXI/AAAAAAAACkk/PYyGCys8fII/s1600/soapUI_select_config.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="582" src="http://2.bp.blogspot.com/-WpvIPkAnyrU/ThNOMlptfXI/AAAAAAAACkk/PYyGCys8fII/s640/soapUI_select_config.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You are now ready to test your SOAP Web Service with soapUI!&lt;br /&gt;
&lt;br /&gt;
In&amp;nbsp; &lt;a href="http://fandry.blogspot.com/2011/07/how-to-test-secure-web-services-with.html"&gt;part #2 we will look how SAML can be added to the mix&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/743578218566083321-2456445164933013525?l=fandry.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/OaE74J-hJO-DO58Yp_b3J7rpDx0/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/OaE74J-hJO-DO58Yp_b3J7rpDx0/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/OaE74J-hJO-DO58Yp_b3J7rpDx0/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/OaE74J-hJO-DO58Yp_b3J7rpDx0/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/TechnologyHighlights/~4/JcB_TPyRvvE" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://fandry.blogspot.com/feeds/2456445164933013525/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=743578218566083321&amp;postID=2456445164933013525" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/743578218566083321/posts/default/2456445164933013525?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/743578218566083321/posts/default/2456445164933013525?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/TechnologyHighlights/~3/JcB_TPyRvvE/how-to-test-secure-web-services-with.html" title="How to test secure web services with soapUI - part #1" /><author><name>fandry</name><uri>http://www.blogger.com/profile/01990790629557446302</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="24" height="32" src="http://bp3.blogger.com/_V_sYr0AnKIc/SEQpDbMcf7I/AAAAAAAABMs/qBizDBN3sXs/S220/fandry.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://2.bp.blogspot.com/-hxrzEmsGaqA/TeWv1WSWBdI/AAAAAAAACjY/Idr178RBjz4/s72-c/soapUI_new_project.png" height="72" width="72" /><thr:total>1</thr:total><feedburner:origLink>http://fandry.blogspot.com/2011/05/how-to-test-secure-web-services-with.html</feedburner:origLink></entry><entry gd:etag="W/&quot;Ck4ARng6fCp7ImA9WhRRFU8.&quot;"><id>tag:blogger.com,1999:blog-743578218566083321.post-8870676624313839294</id><published>2011-04-28T09:37:00.000-07:00</published><updated>2011-11-28T14:55:47.614-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-11-28T14:55:47.614-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="REST Web Services HTTP cURL cookies JSON API" /><title>How to test harness REST web services with cURL</title><content type="html">&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;a href="http://en.wikipedia.org/wiki/CURL"&gt;cURL&lt;/a&gt; is a very convenient command line tool to send and retrieve data using the URL syntax. It supports a large number of protocols: HTTP, HTTPS, FTP, FTPS, SCP, SFTP, TFTP, LDAP, LDAPS, DICT, TELNET, FILE . IMAP, POP3, SMTP and RTSP.&lt;br /&gt;
&lt;br /&gt;
I have been using cURL for quickly and conveniently testing &lt;a href="http://fandry.blogspot.com/2011/02/rest-style-architecture-and-development.html"&gt;RESTFul APIs&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
Since I am doing most of my development on Windows platforms, I am using cURL in conjunction with &lt;a href="http://fandry.blogspot.com/2011/01/increase-your-productivity-on-windows.html"&gt;Console, a Windows console window enhancement tool&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;First you need to &lt;a href="http://curl.haxx.se/download.html"&gt;download and install cURL&lt;/a&gt; for your platform (windows, Linux ect). Then you can do a quick test by accessible the home page of your favorite web site:&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-h8GJiOm6O60/TbmQsH9hqKI/AAAAAAAACjM/TgbNDAqzwgE/s1600/curl_0.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="115" src="http://2.bp.blogspot.com/-h8GJiOm6O60/TbmQsH9hqKI/AAAAAAAACjM/TgbNDAqzwgE/s320/curl_0.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This should display the HTML content of the home page. At this point I would suggest to look at the &lt;a href="http://curl.haxx.se/docs/"&gt;documentation&lt;/a&gt; to see what you can do with cURL including the &lt;a href="http://curl.haxx.se/docs/faq.html"&gt;FAQ&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
I usually use simple test harness such as '&lt;b style="color: #38761d;"&gt;curl http://www.acme.com/api/versions&lt;/b&gt;' if you REST API exposes available versions.&lt;br /&gt;
&lt;br /&gt;
You can then start to do more sophisticated tests such as authentication credentials from files (in my case I use a &lt;a href="http://www.blogger.com/"&gt;JSON&lt;/a&gt; data structure to automatically authenticate to my web service), saving cookies on files (using the the &lt;b&gt;-c&lt;/b&gt; option):&lt;br /&gt;
&lt;br /&gt;
&lt;div style="color: #38761d;"&gt;&lt;b&gt;curl -c ./cookies.txt --data-binary @login_password.json -H "Content-Type: application/json"&amp;nbsp; &lt;/b&gt;&lt;b&gt;http://www.acme.com/api&lt;/b&gt;&lt;b&gt;/users/token&lt;/b&gt;&lt;/div&gt;&lt;br /&gt;
With my &lt;a href="http://en.wikipedia.org/wiki/JSON"&gt;JSON&lt;/a&gt; file as follow: &lt;span style="color: #38761d;"&gt;{"login":{"username":"user1","password":"StrongPassword1"}}&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
The cookie in my case contains a session token that I can reuse between each cURL calls. In the next call I read the cookie (via the&lt;b&gt; -b&lt;/b&gt; option):&lt;br /&gt;
&lt;br /&gt;
&lt;div style="color: #38761d;"&gt;&lt;b&gt;curl -b ./cookies.txt http://&lt;/b&gt;&lt;b&gt;www.acme.com&lt;/b&gt;&lt;b&gt;/api/users/userid1234567890/orders&lt;/b&gt;&lt;/div&gt;&lt;br /&gt;
The output of the command can be saved in a file using the option -o or redirecting our output:&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;&lt;b&gt;&lt;span style="color: #6aa84f;"&gt;&lt;span style="color: #38761d;"&gt;curl -o google.html www.google.com&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/pre&gt;&lt;br /&gt;
or &lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;&lt;b&gt;&lt;span style="color: #38761d;"&gt;curl www.google.com &amp;gt; google.html &lt;/span&gt;&lt;/b&gt;&lt;/pre&gt;&lt;br /&gt;
Enjoy!&lt;br /&gt;
&lt;br /&gt;
In &lt;a href="http://fandry.blogspot.com/2011/09/curl-tests-harness-and-tls.html"&gt;my next post on this topic&lt;/a&gt;, I will explain how to use SSL/TLS and specify GZIP headers to your cURL requests. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/743578218566083321-8870676624313839294?l=fandry.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/bzydGsDlfQmtMk-h8BlD1tE6Bcc/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/bzydGsDlfQmtMk-h8BlD1tE6Bcc/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/bzydGsDlfQmtMk-h8BlD1tE6Bcc/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/bzydGsDlfQmtMk-h8BlD1tE6Bcc/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/TechnologyHighlights/~4/TZUZeruDY7U" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://fandry.blogspot.com/feeds/8870676624313839294/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=743578218566083321&amp;postID=8870676624313839294" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/743578218566083321/posts/default/8870676624313839294?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/743578218566083321/posts/default/8870676624313839294?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/TechnologyHighlights/~3/TZUZeruDY7U/how-to-test-harness-rest-web-services.html" title="How to test harness REST web services with cURL" /><author><name>fandry</name><uri>http://www.blogger.com/profile/01990790629557446302</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="24" height="32" src="http://bp3.blogger.com/_V_sYr0AnKIc/SEQpDbMcf7I/AAAAAAAABMs/qBizDBN3sXs/S220/fandry.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://2.bp.blogspot.com/-h8GJiOm6O60/TbmQsH9hqKI/AAAAAAAACjM/TgbNDAqzwgE/s72-c/curl_0.png" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://fandry.blogspot.com/2011/04/how-to-test-harness-rest-web-services.html</feedburner:origLink></entry><entry gd:etag="W/&quot;C0QERno7cCp7ImA9WhZSFk0.&quot;"><id>tag:blogger.com,1999:blog-743578218566083321.post-5377302422374500739</id><published>2011-03-31T10:38:00.000-07:00</published><updated>2011-03-31T12:55:07.408-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-03-31T12:55:07.408-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="DB2" /><category scheme="http://www.blogger.com/atom/ns#" term="POM" /><category scheme="http://www.blogger.com/atom/ns#" term="JNDI" /><category scheme="http://www.blogger.com/atom/ns#" term="JBOSS" /><category scheme="http://www.blogger.com/atom/ns#" term="Simple JNDI" /><category scheme="http://www.blogger.com/atom/ns#" term="JDBC" /><category scheme="http://www.blogger.com/atom/ns#" term="MAVEN" /><title>JUnit  based integration testing with Simple JNDI</title><content type="html">&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;br /&gt;
&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;br /&gt;
&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;I regularly use &lt;a href="http://tjws.sourceforge.net/"&gt;TJWS&lt;/a&gt;&amp;nbsp;  a light weight Java Web Server build as a servlet container to provide         standard Web Server capabilities at &lt;a href="http://www.blogger.com/"&gt;building and testing time&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
The main advantage is that I don't have to deploy my war file to my production server (e.g. JBoss) to test my Java Web application. My maven build runs complex integration JUnit tests immediately after building the war file with maven.&lt;br /&gt;
&lt;br /&gt;
In my configuration however, I have to use &lt;b&gt;JNDI &lt;/b&gt;(&lt;a href="http://en.wikipedia.org/wiki/Jndi"&gt;Java Naming and Directory Interface&lt;/a&gt;) to connect to a specific datasource (&lt;a href="http://www-01.ibm.com/software/data/db2/"&gt;DB2&lt;/a&gt; via &lt;a href="http://en.wikipedia.org/wiki/JDBC"&gt;JDBC&lt;/a&gt;) for some of&amp;nbsp; my tests.&lt;br /&gt;
&lt;br /&gt;
I used &lt;a href="http://code.google.com/p/osjava/wiki/SimpleJNDI"&gt;Simple JNDI&lt;/a&gt; for this which also offer an easy and elegant way to &lt;a href="http://www.generationjava.com/docs/simple-jndi-docs/docs-0.2/Intro.html"&gt;configure data source access&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
Here are the steps I follow to setup my JUnit tests using &lt;b&gt;Simple JNDI&lt;/b&gt;: &lt;br /&gt;
&lt;br /&gt;
&lt;ol style="text-align: left;"&gt;&lt;/ol&gt;&lt;/div&gt;&lt;ul style="text-align: left;"&gt;&lt;li&gt;Add dependencies in Maven 2 Pom file for &lt;b&gt;Simple JNDI&lt;/b&gt;, java persistence and DB2 JNDI/JDBC:&lt;br /&gt;
&lt;/li&gt;
&lt;/ul&gt;&lt;/div&gt;&lt;pre&gt;&lt;span style="color: #38761d;"&gt;    
    &amp;lt;dependency&amp;gt;
        &amp;lt;groupId&amp;gt;simple-jndi&amp;lt;/groupId&amp;gt;
        &amp;lt;artifactId&amp;gt;simple-jndi&amp;lt;/artifactId&amp;gt;
        &amp;lt;version&amp;gt;0.11.4.1&amp;lt;/version&amp;gt;
        &amp;lt;scope&amp;gt;test&amp;lt;/scope&amp;gt;
    &amp;lt;/dependency&amp;gt;

    &amp;lt;dependency&amp;gt;
        &amp;lt;groupId&amp;gt;javax.persistence&amp;lt;/groupId&amp;gt;
        &amp;lt;artifactId&amp;gt;persistence-api&amp;lt;/artifactId&amp;gt;
        &amp;lt;version&amp;gt;1.0&amp;lt;/version&amp;gt;
        &amp;lt;scope&amp;gt;test&amp;lt;/scope&amp;gt;
    &amp;lt;/dependency&amp;gt;
  
    &amp;lt;dependency&amp;gt;
        &amp;lt;groupId&amp;gt;com.ibm.db2&amp;lt;/groupId&amp;gt;
        &amp;lt;artifactId&amp;gt;db2jcc4&amp;lt;/artifactId&amp;gt;
        &amp;lt;version&amp;gt;9.7.0.2&amp;lt;/version&amp;gt;
        &amp;lt;scope&amp;gt;test&amp;lt;/scope&amp;gt;
    &amp;lt;/dependency&amp;gt;
    &lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;br /&gt;
&lt;ul style="text-align: left;"&gt;&lt;li&gt;Create a small Java class for the JNDI setup&lt;/li&gt;
&lt;/ul&gt;&lt;/div&gt;&lt;pre&gt;&lt;span style="color: #38761d;"&gt;     import javax.naming.InitialContext;
     import javax.sql.DataSource;

     public class JndiSetup { 
         /**
          * Setup the Data Source
          */
         public static void doSetup(String ds_name) {
             try {
                 InitialContext ctxt = new InitialContext();
                 DataSource ds = (DataSource) ctxt.lookup("jdbc."+ds_name);
                 // rebind for alias if needed
                 ctxt.rebind("jdbc/"+ds_name, ds);
             } catch (Exception ex) {
                 ex.printStackTrace();
             }
         }
     }&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;
In more complex situations, you may have also to create an &lt;a href="http://download.oracle.com/docs/cd/E19798-01/821-1841/bnbqy/index.html"&gt;EntityManager &lt;/a&gt;and use an &lt;a href="http://download.oracle.com/javaee/6/api/javax/persistence/EntityManagerFactory.html"&gt;EntityManagerFactory&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;ul style="text-align: left;"&gt;&lt;li&gt;In the JUnit java script code, setup your JNDI connection before running your tests: &lt;/li&gt;
&lt;/ul&gt;&lt;/div&gt;&lt;pre&gt;&lt;span style="color: #38761d;"&gt;    @BeforeClass
     public static void setUpClass() throws Exception {
          JndiSetup.doSetup("&lt;/span&gt;&lt;your-ds style="color: #38761d;"&gt;");
     }&lt;/your-ds&gt;&lt;/pre&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;ul style="text-align: left;"&gt;&lt;li&gt;Create a&lt;b&gt; jndi.properties&lt;/b&gt; file in the "&lt;span style="color: #38761d;"&gt;\src\test\resources&lt;/span&gt;" path in your project&amp;nbsp; &lt;/li&gt;
&lt;/ul&gt;&lt;/div&gt;&lt;pre&gt;&lt;span style="color: #38761d;"&gt; 
     java.naming.factory.initial=org.osjava.sj.SimpleContextFactory
     org.osjava.sj.root=target/test-classes/config
     org.osjava.jndi.delimiter=/
     org.osjava.sj.jndi.shared=true&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;br /&gt;
&lt;ul style="text-align: left;"&gt;&lt;li&gt;Create a&lt;b&gt; jdbc.properties&lt;/b&gt; file in the "&lt;span style="color: #38761d;"&gt;\src\test\resources\config&lt;/span&gt;" path  in your project (I am using an IBM DB2 data source). Create the config directory if it doesn't exist. The "&lt;b&gt;config&lt;/b&gt;" name comes from &lt;i&gt;org.osjava.sj.root&lt;/i&gt; parameter in &lt;i&gt;jndi.properties&lt;/i&gt; file. If you want a different name, "&lt;b&gt;foo&lt;/b&gt;", for the folder, make sure to update the "&lt;i&gt;org.osjava.sj.root&lt;/i&gt;" property and create a "&lt;b&gt;foo&lt;/b&gt;" folder in "&lt;i style="color: #38761d;"&gt;\src\test\resources&lt;/i&gt;"  path. Make sure the directory /src/test/resources is in the Java build  path, and the output folder is set to target/test-classes &lt;/li&gt;
&lt;/ul&gt;&lt;/div&gt;&lt;pre&gt;&lt;span style="color: #38761d;"&gt;
     &amp;lt;your-ds&amp;gt;.type=javax.sql.DataSource
     &amp;lt;your-ds&amp;gt;.driver=com.ibm.db2.jcc.DB2Driver
     &amp;lt;your-ds&amp;gt;.url=jdbc:db2://&amp;lt;your-database-host&amp;gt;:50000/&amp;lt;your-ds-or-ds-alias&amp;gt;
     &amp;lt;your-ds&amp;gt;.user=&amp;lt;your-db-login&amp;gt;
     &amp;lt;your-ds&amp;gt;.password=&amp;lt;your-db-password&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;br /&gt;
With all of this you should be ready to test your integration using&lt;b&gt; &lt;span style="color: #38761d;"&gt;&amp;gt;&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&lt;span style="color: #38761d;"&gt;mvn clean install&lt;/span&gt;&lt;/b&gt;.&lt;br /&gt;
&lt;br /&gt;
You may have also to do a&lt;b&gt; &lt;span style="color: #38761d;"&gt;&lt;span style="color: #38761d;"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;b style="color: #38761d;"&gt;mvn eclipse:eclipse -DdownloadJavadocs=true&lt;/b&gt; as well if you are using &lt;a href="http://www.eclipse.org/"&gt;Eclipse&lt;/a&gt; and your new dependencies and imports do not work properly.&lt;/div&gt;&lt;/div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/743578218566083321-5377302422374500739?l=fandry.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/77RQrM8UyQ4S9UfMYx8R3lI5btw/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/77RQrM8UyQ4S9UfMYx8R3lI5btw/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/77RQrM8UyQ4S9UfMYx8R3lI5btw/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/77RQrM8UyQ4S9UfMYx8R3lI5btw/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/TechnologyHighlights/~4/T-73GE25LwM" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://fandry.blogspot.com/feeds/5377302422374500739/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=743578218566083321&amp;postID=5377302422374500739" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/743578218566083321/posts/default/5377302422374500739?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/743578218566083321/posts/default/5377302422374500739?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/TechnologyHighlights/~3/T-73GE25LwM/junit-based-integration-testing-with.html" title="JUnit  based integration testing with Simple JNDI" /><author><name>fandry</name><uri>http://www.blogger.com/profile/01990790629557446302</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="24" height="32" src="http://bp3.blogger.com/_V_sYr0AnKIc/SEQpDbMcf7I/AAAAAAAABMs/qBizDBN3sXs/S220/fandry.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://fandry.blogspot.com/2011/03/junit-based-integration-testing-with.html</feedburner:origLink></entry><entry gd:etag="W/&quot;A0UFR3wzcSp7ImA9Wx9bGUg.&quot;"><id>tag:blogger.com,1999:blog-743578218566083321.post-1610033160881141424</id><published>2011-02-28T15:23:00.000-08:00</published><updated>2011-02-28T22:00:16.289-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-02-28T22:00:16.289-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="RHIO" /><category scheme="http://www.blogger.com/atom/ns#" term="Health Records" /><category scheme="http://www.blogger.com/atom/ns#" term="Mobile Application" /><category scheme="http://www.blogger.com/atom/ns#" term="Security" /><category scheme="http://www.blogger.com/atom/ns#" term="HL7" /><category scheme="http://www.blogger.com/atom/ns#" term="Web Services" /><category scheme="http://www.blogger.com/atom/ns#" term="Lab Results" /><category scheme="http://www.blogger.com/atom/ns#" term="Rest API" /><category scheme="http://www.blogger.com/atom/ns#" term="JAX-RS" /><title>REST-Style Architecture and the Development of Mobile Health Care Applications</title><content type="html">&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="https://lh5.googleusercontent.com/-aa5RgD_3K6o/TWwrmlkitfI/AAAAAAAACi4/A-MD0-WFsAI/s1600/iPhone_medical.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="https://lh5.googleusercontent.com/-aa5RgD_3K6o/TWwrmlkitfI/AAAAAAAACi4/A-MD0-WFsAI/s1600/iPhone_medical.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;b&gt;Mobile devices&lt;/b&gt; offer new ways for users to access &lt;b&gt;health care data&lt;/b&gt; and services in a secure and user-friendly environment. These new applications must be easy to &lt;b&gt;create&lt;/b&gt;, &lt;b&gt;deploy&lt;/b&gt;, &lt;b&gt;test &lt;/b&gt;and &lt;b&gt;maintain&lt;/b&gt;, and they must rely on a scalable and easily integrated infrastructure.&lt;br /&gt;
&lt;br /&gt;
In the &lt;b&gt;ambulatory health care environment&lt;/b&gt;, providers spend the majority of their time in an examination room with patients. Although some clinics have installed personal computers in the exam room for use at the point of care, many physician practices have yet to do so or have no such intention. Reasons for not installing PCs in the exam room include (among others) &lt;b&gt;lack of space&lt;/b&gt;, &lt;b&gt;security concerns&lt;/b&gt;, and &lt;b&gt;cost&lt;/b&gt;. Often, clinics have PCs installed outside of the exam room to be used for encounter documentation or health history research (i.e., reviewing the patient's health records). This physical setup is often satisfactory for providers to complete their documentation needs. Providers often scratch rough notes on paper during an encounter, then dictate or type their notes after the visit has ended. The absence of computers in the exam room, however,&lt;b&gt; is a disadvantage for research activities&lt;/b&gt;. Frequently, after listening to the patient's verbal health history, a provider wishes to read past records. If those records are in an electronic format, it is &lt;b&gt;optimal to access those records at the point of care&lt;/b&gt; (i.e., in the exam room).&lt;br /&gt;
&lt;br /&gt;
Thus, computer devices that are smaller and more mobile than a PC (e.g., smart phones, PDAs, tablets) would be the &lt;b&gt;optimal hardware choice&lt;/b&gt; to access these electronic records. Given that many physicians carry smart phones, such mobile devices would be the&lt;b&gt; ultimate tools to look up patient records&lt;/b&gt;.&lt;br /&gt;
&lt;br /&gt;
Since the development of client applications on different mobile platforms requires more time than creating web applications for a handful of browsers, it is important &lt;b&gt;to minimize the complexity of the integration with the back-end services and legacy systems&lt;/b&gt; and to try to decouple the development and maintenance of the client- and server-side components.&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="https://lh3.googleusercontent.com/-e3vUDpP3G9I/TWwruCim_tI/AAAAAAAACi8/m5QxlGj-xZg/s1600/iPhone_stethoscope.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="https://lh3.googleusercontent.com/-e3vUDpP3G9I/TWwruCim_tI/AAAAAAAACi8/m5QxlGj-xZg/s1600/iPhone_stethoscope.png" /&gt;&lt;/a&gt;&lt;/div&gt;The &lt;a href="http://www.blogger.com/"&gt;Representational State Transfer (REST) architecture&lt;/a&gt; is an  alternative to &lt;a href="http://en.wikipedia.org/wiki/SOAP"&gt;SOAP&lt;/a&gt; and offers clear advantages over SOAP including  &lt;b&gt;lightweight architecture&lt;/b&gt;, &lt;b&gt;extensibility&lt;/b&gt;, &lt;b&gt;scalability&lt;/b&gt;, &lt;b&gt;easy of  development&lt;/b&gt;, &lt;b&gt;testing&lt;/b&gt;, &lt;b&gt;deployment &lt;/b&gt;and &lt;b&gt;maintenance&lt;/b&gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;REST API prototypes&lt;/b&gt; can be created in a matter of days and a full functioning set of sophisticated clinical based web services accessible by mobile client applications within few weeks.&lt;br /&gt;
&lt;br /&gt;
In addition to this, REST APIs are particularly suitable&lt;a href="http://fandry.blogspot.com/2010/10/rest-apis-json-or-xml.html"&gt; for fast and loosely-coupled solution integration&lt;/a&gt; such as mobile applications, but can also be used in health care for &lt;b&gt;portal&lt;/b&gt; and &lt;b&gt;mash-up applications&lt;/b&gt; as well.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;u&gt;Reference&lt;/u&gt;&lt;/b&gt;:&lt;br /&gt;
Andry F., Wan L., Nicholson D., &lt;a href="http://www.fandry.net/pub/ANDRY_ET_AL_HealthINF11.pdf"&gt;&lt;b&gt;&lt;i&gt;A mobile application accessing patients' health records through a REST API&lt;/i&gt;&lt;/b&gt;&lt;/a&gt;, 4th International Conference on Health Informatics (&lt;a href="http://www.healthinf.biostec.org/"&gt;HEALTHINF&lt;/a&gt; 2011), pp 27-32, Rome 2011.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/743578218566083321-1610033160881141424?l=fandry.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/Ogon4BoR0_zU2G6bU41Qks6AeRw/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/Ogon4BoR0_zU2G6bU41Qks6AeRw/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/Ogon4BoR0_zU2G6bU41Qks6AeRw/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/Ogon4BoR0_zU2G6bU41Qks6AeRw/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/TechnologyHighlights/~4/iE5xOCpWxAs" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://fandry.blogspot.com/feeds/1610033160881141424/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=743578218566083321&amp;postID=1610033160881141424" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/743578218566083321/posts/default/1610033160881141424?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/743578218566083321/posts/default/1610033160881141424?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/TechnologyHighlights/~3/iE5xOCpWxAs/rest-style-architecture-and-development.html" title="REST-Style Architecture and the Development of Mobile Health Care Applications" /><author><name>fandry</name><uri>http://www.blogger.com/profile/01990790629557446302</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="24" height="32" src="http://bp3.blogger.com/_V_sYr0AnKIc/SEQpDbMcf7I/AAAAAAAABMs/qBizDBN3sXs/S220/fandry.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://lh5.googleusercontent.com/-aa5RgD_3K6o/TWwrmlkitfI/AAAAAAAACi4/A-MD0-WFsAI/s72-c/iPhone_medical.png" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://fandry.blogspot.com/2011/02/rest-style-architecture-and-development.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CkUHQngzfip7ImA9WhdbFk4.&quot;"><id>tag:blogger.com,1999:blog-743578218566083321.post-5811329271922723125</id><published>2011-01-29T10:46:00.000-08:00</published><updated>2011-10-14T15:10:33.686-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-10-14T15:10:33.686-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Windows console customization prompt background dos" /><title>Increase your productivity on Windows platforms with Console</title><content type="html">&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;br /&gt;
&lt;br /&gt;
A couple of years ago, one of my colleagues showed me &lt;b&gt;Console&lt;/b&gt;, a very useful and nice &lt;b&gt;Windows console window enhancement&lt;/b&gt; tool. Since then I have been using it and increased my productivity when it comes to&lt;b&gt; command line tasks&lt;/b&gt; on Windows platforms. This is an &lt;b&gt;open source&lt;/b&gt; software &lt;a href="http://sourceforge.net/projects/console/"&gt;available on Source Forge&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
With &lt;a href="http://sourceforge.net/projects/console/"&gt;Console&lt;/a&gt;, you have all your Windows consoles &lt;b&gt;within a single application&lt;/b&gt; - you also get:&lt;br /&gt;
&lt;ul style="color: #38761d; text-align: left;"&gt;&lt;li&gt;multiple tabs&lt;/li&gt;
&lt;li&gt;text editor-like text selection&lt;/li&gt;
&lt;li&gt;different background types&lt;/li&gt;
&lt;li&gt; alpha and color-key transparency&lt;/li&gt;
&lt;li&gt;configurable font, different window styles&lt;/li&gt;
&lt;/ul&gt;As a result, you can &lt;b&gt;customize each console&lt;/b&gt; that appear&lt;b&gt; in different tabs&lt;/b&gt;.&lt;br /&gt;
&lt;br /&gt;
In the example below, I have created a Tab called "MY-MAVEN-BASED-PROJECT" that opens at a specific windows path with a particular prompt: "PROJECT-ROOT:" to build your project.&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_V_sYr0AnKIc/TURa_6UBgmI/AAAAAAAACig/TOiZGx4jfsw/s1600/VHR-RESRT-API.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="197" src="http://1.bp.blogspot.com/_V_sYr0AnKIc/TURa_6UBgmI/AAAAAAAACig/TOiZGx4jfsw/s320/VHR-RESRT-API.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To configure your prompt, you need to do the following:&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp; In the console settings tab, go to the&lt;b&gt; shell&lt;/b&gt; field and enter:&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: black;"&gt;&amp;nbsp;&lt;/span&gt;&lt;b style="color: black;"&gt; cmd.exe /k "prompt &amp;lt;your-prompt&amp;gt;"&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/_V_sYr0AnKIc/TURdpeE7MyI/AAAAAAAACik/m-ZT8DOfTVc/s1600/Console_settings.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="320" src="http://3.bp.blogspot.com/_V_sYr0AnKIc/TURdpeE7MyI/AAAAAAAACik/m-ZT8DOfTVc/s320/Console_settings.png" width="312" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
and for the&lt;b&gt; startup directory&lt;/b&gt;, just specify the directory where you want to open your customized tab.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can select your &lt;b&gt;background color and style&lt;/b&gt; in the background customization tab:&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/_V_sYr0AnKIc/TURevr0PcMI/AAAAAAAACio/t0pB7NdUd3w/s1600/CONSOLE_COLOR.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="320" src="http://4.bp.blogspot.com/_V_sYr0AnKIc/TURevr0PcMI/AAAAAAAACio/t0pB7NdUd3w/s320/CONSOLE_COLOR.png" width="312" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Enjoy!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/743578218566083321-5811329271922723125?l=fandry.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/0TULG-G6ERAUaCrTbwGbois4Ilo/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/0TULG-G6ERAUaCrTbwGbois4Ilo/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/0TULG-G6ERAUaCrTbwGbois4Ilo/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/0TULG-G6ERAUaCrTbwGbois4Ilo/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/TechnologyHighlights/~4/QvWxIeTyF3M" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://fandry.blogspot.com/feeds/5811329271922723125/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=743578218566083321&amp;postID=5811329271922723125" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/743578218566083321/posts/default/5811329271922723125?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/743578218566083321/posts/default/5811329271922723125?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/TechnologyHighlights/~3/QvWxIeTyF3M/increase-your-productivity-on-windows.html" title="Increase your productivity on Windows platforms with Console" /><author><name>fandry</name><uri>http://www.blogger.com/profile/01990790629557446302</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="24" height="32" src="http://bp3.blogger.com/_V_sYr0AnKIc/SEQpDbMcf7I/AAAAAAAABMs/qBizDBN3sXs/S220/fandry.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://1.bp.blogspot.com/_V_sYr0AnKIc/TURa_6UBgmI/AAAAAAAACig/TOiZGx4jfsw/s72-c/VHR-RESRT-API.png" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://fandry.blogspot.com/2011/01/increase-your-productivity-on-windows.html</feedburner:origLink></entry><entry gd:etag="W/&quot;D0cNRng7eSp7ImA9Wx9bFU0.&quot;"><id>tag:blogger.com,1999:blog-743578218566083321.post-9127124280032801940</id><published>2010-12-28T12:55:00.000-08:00</published><updated>2011-02-23T15:51:37.601-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-02-23T15:51:37.601-08:00</app:edited><title>LotusScript Connectors for DB2</title><content type="html">&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&amp;nbsp; &lt;br /&gt;
&lt;br /&gt;
&lt;a href="http://fandry.blogspot.com/2010/11/database-alias-and-db2-odbc-drivers.html"&gt;In my previous post&lt;/a&gt; I was explaining how to install the &lt;a href="http://www-01.ibm.com/support/docview.wss?rs=4020&amp;amp;uid=swg21385217"&gt;IBM Data Server Runtime Client&lt;/a&gt;, including some ODBC DB2 drivers to access a DB2 Database remotely. In this new post I explain the bare minimum to install in order to access a DB2 Data Source via &lt;a href="http://dwmoira.moira.vic.gov.au/help/help85_designer.nsf/b3266a3c17f9bb7085256b870069c0a9/f4f6234a92c5df2e85257607005ffcad?OpenDocument"&gt;LotusScript Extension for Lotus Connectors&lt;/a&gt; (LS LSX-LC).&lt;br /&gt;
&lt;br /&gt;
By the way, the ODBC DataDirect Lotus-branded drivers might be &lt;a href="http://www.blogger.com/"&gt;available only to paying customers&lt;/a&gt; ...&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;u&gt;&lt;span style="font-size: large;"&gt;A. Installing the DB2 ODBC CLI drivers&lt;/span&gt;&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
First you need to install the &lt;a href="http://publib.boulder.ibm.com/infocenter/db2luw/v9r5/index.jsp?topic=/com.ibm.db2.luw.apdv.cli.doc/doc/t0023864.html"&gt;DB2 Client Drivers&lt;/a&gt; on the System (which are different from the those that come with the &lt;a href="http://fandry.blogspot.com/2010/11/database-alias-and-db2-odbc-drivers.html"&gt;IBM Data Server Runtime Client&lt;/a&gt;). I am using a Windows server, so after &lt;a href="http://publib.boulder.ibm.com/infocenter/db2luw/v9r5/index.jsp?topic=/com.ibm.db2.luw.apdv.cli.doc/doc/t0023864.html"&gt;download&lt;/a&gt; I just unzip either v9.7fp3a_nt32_odbc_cli.zip (23 bits) or v9.7fp3a_ntx64_odbc_cli.zip (64 bits) in a folder (e.g. C:\clidriver).&lt;br /&gt;
&lt;br /&gt;
Then I open a command prompt and navigate to my folder (e.g. C:\clidriver\bin) and type:&lt;br /&gt;
&lt;br /&gt;
&lt;div style="color: #38761d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; db2oreg1.exe -i -setup&lt;/div&gt;&lt;br /&gt;
Immediately following this you can set up the data sources in ODBC. Open  Control Panel -&amp;gt; Administrative Tools -&amp;gt; Data Sources (ODBC).&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/_V_sYr0AnKIc/TRo57_e198I/AAAAAAAAChk/AGQoQ-xQV5U/s1600/ODBC_Data_Sources.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="71" src="http://3.bp.blogspot.com/_V_sYr0AnKIc/TRo57_e198I/AAAAAAAAChk/AGQoQ-xQV5U/s320/ODBC_Data_Sources.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You will see a screen that looks like the following, click on the "System DSN" tab:&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/_V_sYr0AnKIc/TRo6hzdSGYI/AAAAAAAACho/NxiuaftaOu0/s1600/ODBC_System_DNS.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="262" src="http://4.bp.blogspot.com/_V_sYr0AnKIc/TRo6hzdSGYI/AAAAAAAACho/NxiuaftaOu0/s320/ODBC_System_DNS.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&amp;nbsp; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Click "Add..." button to get the following, and select "IBM Data Server Driver for ODBC - C:/clidriver:&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_V_sYr0AnKIc/TRo7Ej2pqYI/AAAAAAAAChs/VXXsfERvevk/s1600/ODBC_New_data_source.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="258" src="http://1.bp.blogspot.com/_V_sYr0AnKIc/TRo7Ej2pqYI/AAAAAAAAChs/VXXsfERvevk/s320/ODBC_New_data_source.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Enter a Data Source name, this is used directly in the Lotus Script( use the same name as the  Database itself):&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_V_sYr0AnKIc/TRo8uyrlqQI/AAAAAAAAChw/JHZVPmgbYJY/s1600/ODBC_Alias.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="262" src="http://1.bp.blogspot.com/_V_sYr0AnKIc/TRo8uyrlqQI/AAAAAAAAChw/JHZVPmgbYJY/s320/ODBC_Alias.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Enter the DB2 User ID and password that the agent uses to connect to DB2:&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/_V_sYr0AnKIc/TRo9kJPcftI/AAAAAAAACh0/SVTkuyzU26U/s1600/ODBC_user_id_password.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="239" src="http://2.bp.blogspot.com/_V_sYr0AnKIc/TRo9kJPcftI/AAAAAAAACh0/SVTkuyzU26U/s320/ODBC_user_id_password.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Select the "Save Password" option and click OK on the warning popup for saving the password in db2cli.ini file:&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/_V_sYr0AnKIc/TRo-cvsyL-I/AAAAAAAACh4/FFQ3s1QCkjQ/s1600/ODBC_cli2ini_file.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="240" src="http://2.bp.blogspot.com/_V_sYr0AnKIc/TRo-cvsyL-I/AAAAAAAACh4/FFQ3s1QCkjQ/s320/ODBC_cli2ini_file.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Click on the "Advanced Settings" tab:&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-EPdGALY9jKw/TWWdMVhcXoI/AAAAAAAACiw/r6MWKhuQoAg/s1600/DB2_ODBC_advance_settings.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="246" src="http://1.bp.blogspot.com/-EPdGALY9jKw/TWWdMVhcXoI/AAAAAAAACiw/r6MWKhuQoAg/s320/DB2_ODBC_advance_settings.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;a href="http://4.bp.blogspot.com/_V_sYr0AnKIc/TRo6hzdSGYI/AAAAAAAACho/NxiuaftaOu0/s1600/ODBC_System_DNS.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;br /&gt;
&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Click "Add" and select the "Database" CLI Parameter:&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/_V_sYr0AnKIc/TRpAtOyhdZI/AAAAAAAACiI/A-KFhryuQ1I/s1600/ODBC_CLI_PARAM.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="242" src="http://3.bp.blogspot.com/_V_sYr0AnKIc/TRpAtOyhdZI/AAAAAAAACiI/A-KFhryuQ1I/s320/ODBC_CLI_PARAM.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Enter the Database name in the prompt and click OK:&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/_V_sYr0AnKIc/TRo_vnMFJaI/AAAAAAAACiE/RXUBTXQhmMU/s1600/ODBC_DATABASE_VALUE.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="240" src="http://2.bp.blogspot.com/_V_sYr0AnKIc/TRo_vnMFJaI/AAAAAAAACiE/RXUBTXQhmMU/s320/ODBC_DATABASE_VALUE.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Continue to do this for these parameters:&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;Database: The database name&lt;/li&gt;
&lt;li&gt;Hostname: The DB2 server/host name (IP address is not recommended)&lt;/li&gt;
&lt;li&gt;Port: 50000 (The default value for DB2 TCPIP accepting port)&lt;/li&gt;
&lt;/ul&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/_V_sYr0AnKIc/TRpCJbOIxdI/AAAAAAAACiQ/m67yuXOQcrc/s1600/ODBC_ALL_CLI_PARAMS.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="241" src="http://2.bp.blogspot.com/_V_sYr0AnKIc/TRpCJbOIxdI/AAAAAAAACiQ/m67yuXOQcrc/s320/ODBC_ALL_CLI_PARAMS.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;u&gt;&lt;span style="font-size: large;"&gt;B. Accessing the DB2 Database from LotusScript&lt;/span&gt;&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;u&gt;&lt;span style="font-size: large;"&gt; &lt;/span&gt;&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;1. Get access to the Lotus Connector Extensions (this is always installed)&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: #38761d;"&gt;Option Public&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: #38761d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Option Explicit&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style="color: #38761d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; UseLSX "*lsxlc"&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&amp;nbsp;2. Create the LCSession object at the top of all functions or subroutines&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: #38761d;"&gt;Dim session As New LCSession&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&lt;b&gt;3. Enable Connection pooling&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: #38761d;"&gt;session.ConnectionPooling = true&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&lt;b&gt;4. Create the Connection, using the LCConnection class's constructor that takes a single argument (the name of the connector type). We're using ODBC, which has the Lotus Connector name of "odbc2".&lt;/b&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: #38761d;"&gt;&amp;nbsp; Dim conn As New LCConnection ("odbc2")&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: #38761d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; conn.Server = "RLS" 'Using the ODBC DATA SOURCE name created previously.&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: #38761d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; conn.Connect&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&lt;b&gt;&amp;nbsp; 5. When done with the connection, disconnect - This will not actually disconnect if connection pooling is enabled&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: #38761d;"&gt;&amp;nbsp; conn.Disconnect&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;u&gt;&lt;span style="font-size: large;"&gt;Queries&lt;/span&gt;&lt;/u&gt;&lt;br /&gt;
&lt;br /&gt;
Querying DB2 from a LCConnection object takes a couple of variables for  holding the field names. There are multiple ways to issue a query:&lt;br /&gt;
&lt;h3&gt;LCConnection Execute&lt;/h3&gt;The execute command takes a full SQL statement, which is useful to  capture complex queries. Unfortunately LSX LC (like LS:DO) does not  support any kind of parameterized query syntax or method calls. This  means that the parameter values sent to the database need to be encoded  specifically for DB2. This kind of encoding may be difficult from  LotusScript, and therefore it is recommended that for complex queries we  use stored procedures in either SQL or Java. For simple select queries  involving one table (or potentially view) and "ANDed" WHERE clause  predicates, one can use the Select method against the LCConnection  class.&lt;br /&gt;
&lt;br /&gt;
Execute example code:&lt;br /&gt;
&lt;pre class="code-java" style="color: #38761d;"&gt;Dim fldLst As New LCFieldList&lt;/pre&gt;&lt;pre class="code-java" style="color: #38761d;"&gt;conn.Execute &lt;span class="code-quote"&gt;"SELECT * from TEST.CUSTOMER"&lt;/span&gt;, fldLst ' fldLst is only used &lt;span class="code-keyword"&gt;for&lt;/span&gt; result set purposes&lt;/pre&gt;&lt;pre class="code-java" style="color: #38761d;"&gt;Set fld = fldLst.Lookup (&lt;span class="code-quote"&gt;"CUST_NAME"&lt;/span&gt;)
While (conn.Fetch(fldLst) &amp;gt; 0)
 Dim sName As string
 sName = fld.text(0) '' Do something with &lt;span class="code-keyword"&gt;this&lt;/span&gt; column value
Wend&lt;/pre&gt;&lt;pre class="code-java"&gt;&lt;/pre&gt;&lt;h3&gt;LCConnection Select&lt;/h3&gt;The Select command is best described in the &lt;a href="http://publib.boulder.ibm.com/infocenter/domhelp/v8r0/index.jsp?topic=/com.ibm.designer.domino.main.doc/H_LSX_DATA_TYPES_8280_OVER.html"&gt;LC LSX Manual&lt;/a&gt;, as there  are many options. In the example code it shows the user accessing a  "count" of returned records, this is not accurate for the &lt;b&gt;DB2 &lt;/b&gt;and &lt;b&gt;ODBC&lt;/b&gt;  setup we are using. Instead, like the Execute method, the count can only  be determined by the amount of times we loop in Fetching each row. &lt;br /&gt;
&lt;h4&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=743578218566083321&amp;amp;postID=9127124280032801940" name="LotusScriptExtensionforLotusConnectors-Metadataproperty"&gt;&lt;/a&gt;&lt;span style="font-weight: normal;"&gt;&lt;/span&gt;&lt;/h4&gt;When using Select you must set the &lt;b&gt;Metadata &lt;/b&gt;property to the schema  and table name you're selecting from. Always use the form  "schemaname.tablename" to avoid runtime errors later.&lt;br /&gt;
&lt;br /&gt;
Select example code:&lt;br /&gt;
&lt;div class="code panel" style="border-width: 1px;"&gt;&lt;div class="codeContent panelContent"&gt;&lt;pre class="code-java" style="color: #38761d;"&gt;Dim result As New LCFieldList&lt;/pre&gt;&lt;pre class="code-java" style="color: #38761d;"&gt;conn.Metadata = &lt;span class="code-quote"&gt;"TEST.CUSTOMER"&lt;/span&gt;&amp;nbsp;&lt;/pre&gt;&lt;pre class="code-java" style="color: #38761d;"&gt;conn.Select Nothing, 1, result ' Is like SELECT * FROM TEST.CUSTOMER&lt;span class="code-keyword"&gt;&lt;/span&gt;&lt;span class="code-keyword"&gt;&lt;/span&gt;&amp;nbsp;&lt;/pre&gt;&lt;pre class="code-java" style="color: #38761d;"&gt;Set fld = result.Lookup (&lt;span class="code-quote"&gt;"CUST_NAME"&lt;/span&gt;)&lt;/pre&gt;&lt;pre class="code-java" style="color: #38761d;"&gt;While (conn.Fetch(result) &amp;gt; 0)
 MessageBox fld.text(0) ' display the result&lt;/pre&gt;&lt;pre class="code-java" style="color: #38761d;"&gt;Wend&lt;/pre&gt;&lt;pre class="code-java" style="color: #38761d;"&gt;&amp;nbsp;&lt;/pre&gt;&lt;pre class="code-java"&gt;&lt;/pre&gt;For more on LotusScript see the &lt;a href="http://publib.boulder.ibm.com/infocenter/domhelp/v8r0/index.jsp"&gt;IBM documentation on Lotus Domino&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;/div&gt;&lt;/div&gt;&lt;pre class="code-java"&gt;&lt;/pre&gt;I would also like to thank you my colleague Ravi L. for his walk through step by step on this topic!&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/743578218566083321-9127124280032801940?l=fandry.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/XSMQdx_oxVmWAN8_4RLsJqGWOag/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/XSMQdx_oxVmWAN8_4RLsJqGWOag/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/XSMQdx_oxVmWAN8_4RLsJqGWOag/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/XSMQdx_oxVmWAN8_4RLsJqGWOag/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/TechnologyHighlights/~4/CiqhK1DGym0" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://fandry.blogspot.com/feeds/9127124280032801940/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=743578218566083321&amp;postID=9127124280032801940" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/743578218566083321/posts/default/9127124280032801940?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/743578218566083321/posts/default/9127124280032801940?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/TechnologyHighlights/~3/CiqhK1DGym0/lotusscript-connectors-for-db2.html" title="LotusScript Connectors for DB2" /><author><name>fandry</name><uri>http://www.blogger.com/profile/01990790629557446302</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="24" height="32" src="http://bp3.blogger.com/_V_sYr0AnKIc/SEQpDbMcf7I/AAAAAAAABMs/qBizDBN3sXs/S220/fandry.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://3.bp.blogspot.com/_V_sYr0AnKIc/TRo57_e198I/AAAAAAAAChk/AGQoQ-xQV5U/s72-c/ODBC_Data_Sources.png" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://fandry.blogspot.com/2010/12/lotusscript-connectors-for-db2.html</feedburner:origLink></entry><entry gd:etag="W/&quot;D0UCSXY6eip7ImA9Wx9bFU0.&quot;"><id>tag:blogger.com,1999:blog-743578218566083321.post-4405258411120092392</id><published>2010-11-24T11:07:00.000-08:00</published><updated>2011-02-23T15:54:28.812-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-02-23T15:54:28.812-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="DB2 CLI ODBC Driver delete Database Alias Windows UNCATALOG Management Service db2cli.ini" /><title>Database Alias and DB2 ODBC Drivers</title><content type="html">&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;One of my recent project required to use &lt;a href="http://www.blogger.com/"&gt;ODBC&lt;/a&gt; to access &lt;a href="http://www-01.ibm.com/software/data/db2/"&gt;DB2&lt;/a&gt; databases located on remote &lt;a href="http://www.vmware.com/products/labmanager/"&gt;VMWare LabManager&lt;/a&gt; images. I am using a Windows PC (Vista) laptop to develop and test my project (&lt;a href="http://en.wikipedia.org/wiki/LotusScript"&gt;LotusScript&lt;/a&gt; &lt;a href="http://www-12.lotus.com/ldd/doc/domino_notes/7.0/help7_designer.nsf/855dc7fcfd5fec9a85256b870069c0ab/78d24cb03a97df7f8525704a003f58d8?OpenDocument#194043580829212603"&gt;Data Object code&lt;/a&gt;) - a Lotus Notes/Domino DB2 &lt;a href="http://www.jpgtutorials.com/lotus-notesdomino-rdbms-integration-using-odbc"&gt;integration using ODBC&lt;/a&gt;. The first step for me was to&lt;a href="http://www.groupsrv.com/computers/about658521.html"&gt; install the ODBC DB2 drivers&lt;/a&gt; since I did not have DB2 installed on my laptop. &lt;br /&gt;
&lt;br /&gt;
Several installations options were offered to me for &lt;a href="http://www-01.ibm.com/support/docview.wss?rs=4020&amp;amp;uid=swg21385217"&gt;DB2 9.7&lt;/a&gt;:&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href="http://publib.boulder.ibm.com/infocenter/db2luw/v9r5/index.jsp?topic=/com.ibm.db2.luw.apdv.cli.doc/doc/t0023864.html"&gt;IBM Data Server Driver for ODBC and CLI (CLI Driver)&lt;/a&gt; : the smallest footprint - a 13MG zip file (installing the drivers manually might be a little bit tricky - &lt;a href="http://fandry.blogspot.com/2010/12/lotusscript-connectors-for-db2.html"&gt;see my next post on this&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www-01.ibm.com/software/data/db2/"&gt;IBM DB2 (server + client tools)&lt;/a&gt;&amp;nbsp; : this would work but this much more than I need since DB2 is already installed on my remote LabManager image&lt;/li&gt;
&lt;li&gt;&lt;b&gt;&lt;a href="http://www-01.ibm.com/support/docview.wss?rs=4020&amp;amp;uid=swg21385217"&gt;IBM Data Server Runtime Client&lt;/a&gt; &lt;/b&gt;: the best solution for me (34MB zip file), especially if I have installed other tools such as &lt;a href="http://www-01.ibm.com/software/data/optim/data-studio/features.html"&gt;IBM Data Studio&lt;/a&gt; for managing my DB2 databases instances remotely.&lt;/li&gt;
&lt;/ul&gt;The installation of&amp;nbsp; the &lt;a href="http://www-01.ibm.com/support/docview.wss?rs=4020&amp;amp;uid=swg21385217"&gt;IBM Data Server Runtime Client&lt;/a&gt; is very fast and straightforward. It installs the ODBC/CLI drivers and a &lt;b&gt;small set of useful command line setup tools&lt;/b&gt;:&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/_V_sYr0AnKIc/TO1f8fgR8zI/AAAAAAAAChE/OmO7ISpZbKs/s1600/DB2_runtime_client.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://2.bp.blogspot.com/_V_sYr0AnKIc/TO1f8fgR8zI/AAAAAAAAChE/OmO7ISpZbKs/s1600/DB2_runtime_client.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
After this, we can create the &lt;b&gt;Database Aliases&lt;/b&gt; using the &lt;a href="http://msdn.microsoft.com/en-us/library/ms188691.aspx"&gt;Windows ODBC Data Source Administrator&lt;/a&gt;.&lt;br /&gt;
When you look at the&lt;b&gt; Drivers tab&lt;/b&gt;, you should now see your DB2 ODBC drivers&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/_V_sYr0AnKIc/TO1dy80G0BI/AAAAAAAACgw/uQyyw_IpcNw/s1600/DB2_ODBC_drivers.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="263" src="http://4.bp.blogspot.com/_V_sYr0AnKIc/TO1dy80G0BI/AAAAAAAACgw/uQyyw_IpcNw/s320/DB2_ODBC_drivers.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;To add a &lt;a href="http://publib.boulder.ibm.com/infocenter/dzichelp/v2r2/index.jsp?topic=/com.ibm.qmf.doc.imww/dsqxmst76.htm"&gt;DB2 Data Source Name (DSN)&lt;/a&gt;:&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;select User or System and click on the Add... button. &lt;/li&gt;
&lt;li&gt;select the DB2 ODBC/CLI driver &lt;/li&gt;
&lt;li&gt;enter a Data source name and add an Alias if needed (click on the Add button next to your existing aliases if needed)&lt;/li&gt;
&lt;li&gt;enter &lt;b&gt;Data Source&lt;/b&gt; parameters (Description, user ID, password) - &lt;b&gt;click "Save password" checkbox&lt;/b&gt;&amp;nbsp; to save your login and password locally in your &lt;b&gt;&lt;a href="http://publib.boulder.ibm.com/infocenter/db2luw/v9r7/index.jsp?topic=/com.ibm.db2.luw.apdv.cli.doc/doc/c0007882.html"&gt;db2cli.ini&lt;/a&gt;&lt;/b&gt; file. &lt;/li&gt;
&lt;li&gt;enter your &lt;b&gt;TCP/IP &lt;/b&gt;connection (port number is 50000 by default for me for DB2), the host name is the IP address of my DB2 server VMWare image.&lt;/li&gt;
&lt;li&gt;I did not have to change anything in the defaults of &lt;b&gt;Security options&lt;/b&gt; and &lt;b&gt;Advanced Settings&lt;/b&gt;.&lt;/li&gt;
&lt;/ul&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/_V_sYr0AnKIc/TO1eDsAIWpI/AAAAAAAACg0/V8XkqKymdpU/s1600/DB2_ODBC_DSN_add.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="148" src="http://2.bp.blogspot.com/_V_sYr0AnKIc/TO1eDsAIWpI/AAAAAAAACg0/V8XkqKymdpU/s200/DB2_ODBC_DSN_add.png" width="200" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;ul&gt;&lt;/ul&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/_V_sYr0AnKIc/TO1elO8hAzI/AAAAAAAACg4/uPVDNw6bhjs/s1600/DB2_ODBC_DSN_Alias.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="141" src="http://3.bp.blogspot.com/_V_sYr0AnKIc/TO1elO8hAzI/AAAAAAAACg4/uPVDNw6bhjs/s200/DB2_ODBC_DSN_Alias.png" width="200" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/_V_sYr0AnKIc/TO1gb-wMQ0I/AAAAAAAAChI/1vgLE0DK1eg/s1600/DB2_ODBC_DSN_Data_Source.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="154" src="http://3.bp.blogspot.com/_V_sYr0AnKIc/TO1gb-wMQ0I/AAAAAAAAChI/1vgLE0DK1eg/s200/DB2_ODBC_DSN_Data_Source.png" width="200" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/_V_sYr0AnKIc/TO1gd_hsUZI/AAAAAAAAChM/9T8PMG8ljTQ/s1600/DB2_ODBC_DSN_password.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="76" src="http://4.bp.blogspot.com/_V_sYr0AnKIc/TO1gd_hsUZI/AAAAAAAAChM/9T8PMG8ljTQ/s200/DB2_ODBC_DSN_password.png" width="200" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-56nAmjVs3J8/TWWeI75AryI/AAAAAAAACi0/qRDGwVoxGSE/s1600/DB2_ODBC_DSN_TCP_IP.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="154" src="http://3.bp.blogspot.com/-56nAmjVs3J8/TWWeI75AryI/AAAAAAAACi0/qRDGwVoxGSE/s200/DB2_ODBC_DSN_TCP_IP.png" width="200" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;a href="http://3.bp.blogspot.com/_V_sYr0AnKIc/TO1gfuZefoI/AAAAAAAAChQ/uuQUya__s30/s1600/DB2_ODBC_DSN_TCP_IP.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;br /&gt;
&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
From there you are ready to use your &lt;b&gt;ODBC DSN &lt;/b&gt;ready to connect to your DB2 Database.&lt;br /&gt;
&lt;br /&gt;
One issue you will encounter though will be &lt;b&gt;how to delete an existing Database Alias&lt;/b&gt; from the &lt;b&gt;DB2 ODBC tab&lt;/b&gt; either to modify an existing one or to remove an old one.&lt;br /&gt;
These appear in the drop down of the &lt;a href="http://publib.boulder.ibm.com/infocenter/db2luw/v9/index.jsp?topic=/com.ibm.db2.udb.apdv.cli.doc/doc/c0023378.htm"&gt;ODBC IBM DB2 Driver&lt;/a&gt; - Add popup window.&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/_V_sYr0AnKIc/TO1gtd1c2bI/AAAAAAAAChU/v-LWVU_9dxo/s1600/DB2_ODBC_old_aliases.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="140" src="http://4.bp.blogspot.com/_V_sYr0AnKIc/TO1gtd1c2bI/AAAAAAAAChU/v-LWVU_9dxo/s200/DB2_ODBC_old_aliases.png" width="200" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The truth is that even though you are accessing a remote DB2 server machine, &lt;b&gt;these aliases are stored locally on your DB2 installation&lt;/b&gt;.&lt;br /&gt;
To remove the DB2 Database Aliases ODBC drivers, just start the &lt;a href="http://publib.boulder.ibm.com/infocenter/db2luw/v8/index.jsp?topic=/com.ibm.db2.udb.doc/core/r0010409.htm"&gt;IBM DB2 Command Line Processor&lt;/a&gt; and use the following command:&lt;br /&gt;
&lt;br /&gt;
&lt;div style="color: #38761d;"&gt;UNCATALOG DATABASE &amp;lt;database_alias&amp;gt;&lt;/div&gt;&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/_V_sYr0AnKIc/TO1gz03ZikI/AAAAAAAAChY/VEJ1uHpHAkM/s1600/DB2_ODBC_uncatalog.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="160" src="http://4.bp.blogspot.com/_V_sYr0AnKIc/TO1gz03ZikI/AAAAAAAAChY/VEJ1uHpHAkM/s320/DB2_ODBC_uncatalog.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;database alias=""&gt;&lt;/database&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In certain cases, you also need to&lt;b&gt; refresh the directory cache&lt;/b&gt;. For this, just &lt;b&gt;stop and restart&lt;/b&gt; the &lt;a href="http://publib.boulder.ibm.com/infocenter/db2luw/v9/index.jsp?topic=/com.ibm.db2.udb.uprun.doc/doc/r0023249.htm"&gt;DB2 Management Service&lt;/a&gt; on your local Windows machine.&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_V_sYr0AnKIc/TO1g5240hfI/AAAAAAAAChc/EpPUodsO1sQ/s1600/DB2_ODBC_services.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="117" src="http://1.bp.blogspot.com/_V_sYr0AnKIc/TO1g5240hfI/AAAAAAAAChc/EpPUodsO1sQ/s320/DB2_ODBC_services.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/743578218566083321-4405258411120092392?l=fandry.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/lgM0rZWz2QynbEetl8kdvt3g3SE/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/lgM0rZWz2QynbEetl8kdvt3g3SE/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/lgM0rZWz2QynbEetl8kdvt3g3SE/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/lgM0rZWz2QynbEetl8kdvt3g3SE/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/TechnologyHighlights/~4/Uu8LRSgsDw8" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://fandry.blogspot.com/feeds/4405258411120092392/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=743578218566083321&amp;postID=4405258411120092392" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/743578218566083321/posts/default/4405258411120092392?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/743578218566083321/posts/default/4405258411120092392?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/TechnologyHighlights/~3/Uu8LRSgsDw8/database-alias-and-db2-odbc-drivers.html" title="Database Alias and DB2 ODBC Drivers" /><author><name>fandry</name><uri>http://www.blogger.com/profile/01990790629557446302</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="24" height="32" src="http://bp3.blogger.com/_V_sYr0AnKIc/SEQpDbMcf7I/AAAAAAAABMs/qBizDBN3sXs/S220/fandry.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://2.bp.blogspot.com/_V_sYr0AnKIc/TO1f8fgR8zI/AAAAAAAAChE/OmO7ISpZbKs/s72-c/DB2_runtime_client.png" height="72" width="72" /><thr:total>1</thr:total><feedburner:origLink>http://fandry.blogspot.com/2010/11/database-alias-and-db2-odbc-drivers.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DU4BQn48fSp7ImA9Wx9XFkQ.&quot;"><id>tag:blogger.com,1999:blog-743578218566083321.post-3178067694806742319</id><published>2010-10-29T13:39:00.000-07:00</published><updated>2011-01-10T14:19:13.075-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-01-10T14:19:13.075-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Healthcare REST API JSON XML CCD REStEasy marshall POJO HL7" /><title>Healthcare REST APIs - JSON or XML?</title><content type="html">I have been working recently on a &lt;a href="http://en.wikipedia.org/wiki/Restful"&gt;REST API&lt;/a&gt; which produces subsets of &lt;a href="http://en.wikipedia.org/wiki/Continuity_of_Care_Document"&gt;Continuity of Care Documents (CCD)&lt;/a&gt;. This REST API is used by an iPhone application which is targeted to physicians and nurses. Since I wanted to minimize the amount of data exchange between the server and the client, I originally used &lt;a href="http://www.json.org/"&gt;JSON&lt;/a&gt; as my data exchange format. The motivation to use &lt;b&gt;&lt;a class="external-link" href="http://www.json.org/" rel="nofollow"&gt;JSON&lt;/a&gt;&lt;/b&gt; was to have a compact format that offers better performance than a more complex XML representation.&lt;br /&gt;
&lt;br /&gt;
For example, the request to obtain lab-results from a &lt;a href="http://en.wikipedia.org/wiki/Continuity_of_Care_Document"&gt;CCD&lt;/a&gt; is as following:&lt;br /&gt;
&lt;pre style="color: #38761d;"&gt;GET /users/&amp;lt;user-id&amp;gt;/patients/&amp;lt;patient-id&amp;gt;/lab-results?hl7v3=true&amp;amp;max=&amp;lt;max&amp;gt;offset=&amp;amp;&amp;lt;offset&amp;gt;
&lt;/pre&gt;&lt;br /&gt;
The resulting of this request to the API is a &lt;a href="http://www.json.org/"&gt;JSON&lt;/a&gt; object containing a list of lab results:&lt;br /&gt;
&lt;pre style="color: #38761d;"&gt;{"lab-results":{
    "list":[{"lab-result":{"entry":"...",
                           "facility":"...",
                           "normalcy":"...",
                           "orderedBy":"...",
                           "status":"...",
                           "subject":"...",
                           "urgency":"..."}},
            {"lab-result":{...}},...],
    "count":"...",
    "offset":"...",
    "remain":"..."}}
&lt;/pre&gt;&lt;br /&gt;
A lab result HL7 V3 entry is returned as the following JSON object:&lt;br /&gt;
&lt;pre style="color: #38761d;"&gt;{"entry":{
    "organizer":{
        "code":{"displayName":"..."}},
        "components":[
            {"component":{...}},
            {"component":{...}},...],
        "notes":[...]}}}
&lt;/pre&gt;&lt;br /&gt;
A lab-result component itself:&lt;br /&gt;
&lt;pre style="color: #38761d;"&gt;{"component":{
    "observation":{
        "code":{"displayName":"..."},
        "effectiveTime":{"value":"&lt;iso-8601&gt;"},
        "value":...,
        "interpretationCode":{"code":"..."},
        "referenceRange":{
            "observationRange":{...}},
        "notes":[...]}}}
&lt;/iso-8601&gt;&lt;/pre&gt;&lt;br /&gt;
An observation value is returned as a JSON object containing either a string value, a unit and a type, or just some text.&lt;br /&gt;
&lt;pre style="color: #38761d;"&gt;{"value":{"unit":"...","value":"...",type:"..."}}

{"value":"..."}
&lt;/pre&gt;&lt;br /&gt;
An observationRange is returned as a JSON value object containing a low and high value, or just some text.&lt;br /&gt;
&lt;pre style="color: #38761d;"&gt;{"observationRange":{
    "value":{
        "low":{"value":"..."},
        "high":{"value":"..."}}}}

{"observationRange":{"text":"..."}
&lt;/pre&gt;&lt;br /&gt;
All these JSON objects are &lt;a href="http://en.wikipedia.org/wiki/Marshalling_%28computer_science%29"&gt;marshalled&lt;/a&gt; from annotated Java POJOs using &lt;a href="http://community.jboss.org/wiki/ResteasyWIKI"&gt;JBOSS RestEasy&lt;/a&gt; framework and &lt;a href="http://jackson.codehaus.org/Home"&gt;Jackson&lt;/a&gt;:&lt;br /&gt;
&lt;pre style="color: #38761d;"&gt;XmlRootElement(name = "high")
public class HighValue {

 private String value = "";

 /**
  * Construct a new instance.
  */
 public HighValue() { }    // Empty constructor

 /**
  * Create a new {@code HighValue} during JAXB unmarshalling.
  * @param value
  *            String as value for the high value.
  */
 public HighValue(final String value) {
  if (value != null)
   this.value = value.trim();
 }

 /**
  * Get the {@code value} attribute.
  * @return {@code value} attribute value (may be {@code null}).
  */
 @XmlElement
 public String getValue() {
  return value;
 }

 /**
  * Set the {@code value} attribute.
  * @param value
  *            value to set.
  * @see #getValue()
  */
 public void setValue(final String value) {
  if (value != null)
   this.value = value.trim();
 }
}
&lt;/pre&gt;This was fine initially since I was focusing on just lab results and I was using a specific back-end API that providing values to populate my POJOs. This solution started to become more complex when I was asked to generated a large set of CCD data types. As a result, the number of Java objects became quickly larger.&lt;br /&gt;
&lt;br /&gt;
The other option I had was to use another internal API I could use which was already generated full or subset of CCD. However the resulting CCD format provided was in &lt;a href="http://www.w3.org/XML/"&gt;XML&lt;/a&gt;:&lt;br /&gt;
&lt;pre style="color: #38761d;"&gt;&amp;lt;component&amp;gt;
  &amp;lt;observation classCode="OBS" moodCode="EVN"&amp;gt;
    &amp;lt;templateId root="2.16.840.1.113883.10.20.1.31"/&amp;gt;
    &amp;lt;templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.13"/&amp;gt;
    &amp;lt;templateId root="2.16.840.1.113883.3.88.11.83.15"/&amp;gt;
    &amp;lt;id root="1"/&amp;gt;
      &amp;lt;code code="Remark" codeSystemName="L" displayName="Remark"/&amp;gt;
      &amp;lt;text&amp;gt;
        &amp;lt;reference value="#Observation_504ccbaf5ecea7b1096720"/&amp;gt;
      &amp;lt;/text&amp;gt;
      &amp;lt;statusCode code="completed"/&amp;gt;
      &amp;lt;effectiveTime value="20091223231100"/&amp;gt;
        &amp;lt;value xsi:type="ST"&amp;gt;Spec #106641063: 23 Dec 09  2311&amp;lt;/value&amp;gt;
      &amp;lt;interpretationCode code="N" codeSystem="2.16.840.1.113883.5.83" codeSystemName="ObservationInterpretation" displayName="Normal"/&amp;gt;
  &amp;lt;/observation&amp;gt;
&amp;lt;/component&amp;gt;
&lt;/pre&gt;&lt;br /&gt;
I could of course just used it as it is and have my &lt;a href="http://en.wikipedia.org/wiki/Restful"&gt;REST API&lt;/a&gt; return XML CCD subsets in XML:&lt;br /&gt;
&lt;pre style="color: #38761d;"&gt;GET /users/&amp;lt;user-id&amp;gt;/patients/&amp;lt;patient-id&amp;gt;/CCD&amp;amp;section=&amp;lt;section&amp;gt;
&lt;/pre&gt;&lt;br /&gt;
They are several issues with this:&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;As you can see XML is much more complex to understand, parse and debug than JSON&lt;/li&gt;
&lt;li&gt;XML increases bandwidth consumption&lt;/li&gt;
&lt;li&gt;Browsers and client application (e.g. mobile devices) can consume JSON much more efficiently than XML&lt;/li&gt;
&lt;/ul&gt;For me, the best solution was to have the internal API marshalling the CCD in both XML and JSON so I will not have to &lt;a href="http://en.wikipedia.org/wiki/Marshalling_%28computer_science%29"&gt;unmarshall&lt;/a&gt; the CCDs again into &lt;a href="http://en.wikipedia.org/wiki/POJO"&gt;POJOS&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
The good news for all of us is that you can use java tools such as &lt;a href="http://en.wikipedia.org/wiki/Java_Architecture_for_XML_Binding"&gt;JAXB&lt;/a&gt; which has adapters to support other formats than &lt;a href="http://www.w3.org/XML/"&gt;XML&lt;/a&gt; such as &lt;a href="http://www.json.org/"&gt;JSON&lt;/a&gt;. With Java annotations, this is &lt;a href="http://fandry.blogspot.com/2010/06/jaxb-json-rest-api-using-resteasy-on.html"&gt;very easy to implement&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/743578218566083321-3178067694806742319?l=fandry.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/XbGc40S5BfYjfuwVNJd1w0D8TDc/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/XbGc40S5BfYjfuwVNJd1w0D8TDc/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/XbGc40S5BfYjfuwVNJd1w0D8TDc/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/XbGc40S5BfYjfuwVNJd1w0D8TDc/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/TechnologyHighlights/~4/v_oJmDzwK0s" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://fandry.blogspot.com/feeds/3178067694806742319/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=743578218566083321&amp;postID=3178067694806742319" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/743578218566083321/posts/default/3178067694806742319?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/743578218566083321/posts/default/3178067694806742319?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/TechnologyHighlights/~3/v_oJmDzwK0s/rest-apis-json-or-xml.html" title="Healthcare REST APIs - JSON or XML?" /><author><name>fandry</name><uri>http://www.blogger.com/profile/01990790629557446302</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="24" height="32" src="http://bp3.blogger.com/_V_sYr0AnKIc/SEQpDbMcf7I/AAAAAAAABMs/qBizDBN3sXs/S220/fandry.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://fandry.blogspot.com/2010/10/rest-apis-json-or-xml.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CkAAQ3k6fSp7ImA9Wx5XEUg.&quot;"><id>tag:blogger.com,1999:blog-743578218566083321.post-138444482703183159</id><published>2010-09-10T11:31:00.000-07:00</published><updated>2010-09-10T13:32:22.715-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-09-10T13:32:22.715-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Spring import beans JBoss Dependency Injection CLASSPATH WINDOWS RUN.BAT WEB-INF Configuration resources.xml" /><title>Spring Dependency Injection with JBOSS : the CLASSPATH issue</title><content type="html">&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/_V_sYr0AnKIc/TIpyy_BG5-I/AAAAAAAACgk/W_2B0sB0t6M/s1600/Spring-JBOSS.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://2.bp.blogspot.com/_V_sYr0AnKIc/TIpyy_BG5-I/AAAAAAAACgk/W_2B0sB0t6M/s320/Spring-JBOSS.png" /&gt;&lt;/a&gt;&lt;/div&gt;When facing the problem of deploying &lt;a href="http://download.oracle.com/docs/cd/E13222_01/wls/docs61/webServices/package.html"&gt;web archives (war)&lt;/a&gt; to be configured through &lt;a href="http://www.springsource.com/webinar/spring-dependency-injection-styles"&gt;Spring dependency injection,&lt;/a&gt; you probably want to have generic applications that do not have to be recompile every time you deploy them on new configurations.&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;In my current project I need to configure a REST API with various parameters (host name, database paths, maximum of records per request). For this I use &lt;a href="http://www.springsource.org/"&gt;Spring&lt;/a&gt; dependency injection where the parameters are injected at run-time via a resource file located outside the war file, in a folder specified by the Windows &lt;b&gt;CLASSPATH &lt;/b&gt;variable (my testing and production platforms are windows machine).&lt;br /&gt;
&lt;br /&gt;
First I need to add a windows &lt;b&gt;CLASSPATH &lt;/b&gt;system variable (in your &lt;i&gt;system properties/environment variables&lt;/i&gt;)&amp;nbsp; if this variable does not exist. Then I add the &lt;b&gt;resources.xml&lt;/b&gt; file directly in the folder specified by &lt;b&gt;CLASSPATH&lt;/b&gt;. You can also use a sub-folder but you will need to hard-code the name of the folder in your spring config file - in my case &lt;b&gt;applicationContext.xml&lt;/b&gt; located in &lt;b style="color: #38761d;"&gt;./src/main/webapp/WEB-INF/&lt;/b&gt;&lt;br /&gt;
&lt;div style="color: #38761d;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;pre style="color: #38761d;"&gt;&amp;lt;beans xmlns="http://www.springframework.org/schema/beans"
 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
 xmlns:context="http://www.springframework.org/schema/context"
 xsi:schemaLocation="
        http://www.springframework.org/schema/context 
        http://www.springframework.org/schema/context/spring-context-2.5.xsd
        http://www.springframework.org/schema/beans 
        http://www.springframework.org/schema/beans/spring-beans.xsd"&amp;gt;
    &amp;lt;import resource="classpath:/resources.xml" /&amp;gt;
&amp;lt;/beans&amp;gt;
&lt;/pre&gt;&lt;br /&gt;
My &lt;b&gt;resources.xml&lt;/b&gt; looks like this: &lt;br /&gt;
&lt;br /&gt;
&lt;pre style="color: #38761d;"&gt;&amp;lt;beans xmlns="http://www.springframework.org/schema/beans"
 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
 xmlns:context="http://www.springframework.org/schema/context"
 xsi:schemaLocation="
        http://www.springframework.org/schema/context 
        http://www.springframework.org/schema/context/spring-context-3.0.xsd
        http://www.springframework.org/schema/beans 
        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd"&amp;gt;
  &amp;lt;bean id="custService" 
                      scope="prototype"
                      class="....."&amp;gt;
   &amp;lt;property name="hostName" value="121.122.123.124"/&amp;gt;
   &amp;lt;property name="databasePath" value="..."/&amp;gt;
   &amp;lt;property name="maxRecordsPerRequest" value="1000"/&amp;gt;
  &amp;lt;/bean&amp;gt;&lt;/pre&gt;&lt;pre style="color: #38761d;"&gt;&amp;lt;/beans&amp;gt;
&lt;/pre&gt;&lt;br /&gt;
One issue you might encounter when you try to deploy your application on JBoss is that the web application server does not take into account the &lt;b&gt;CLASSPATH &lt;/b&gt;out-of-the-box (I am using &lt;a href="http://www.redhat.com/docs/en-US/JBoss_Enterprise_Application_Platform/"&gt;redhat EAP 5.0.X&lt;/a&gt; - production setting), but this might be also the case with &lt;a href="https://community.jboss.org/index.jspa"&gt;JBOSS community edition&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
Your &lt;i&gt;war file will probably fail to deploy&lt;/i&gt; and you will find a &lt;i&gt;bunch of errors&lt;/i&gt; in your &lt;b&gt;log file&lt;/b&gt; .&lt;b style="color: #38761d;"&gt;/jboss-as/server/&amp;lt;setting&amp;gt;/log/server.log&lt;/b&gt;&amp;nbsp; including:&lt;br /&gt;
&lt;br /&gt;
&lt;pre style="color: red;"&gt;org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: 
Failed to import bean definitions from URL location [classpath:/resources.xml]
Offending resource: ServletContext resource [/WEB-INF/applicationContext.xml]; nested exception is org.springframework.beans.factory.BeanDefinitionStoreException:
IOException parsing XML document from class path resource [resources.xml]; 
nested exception is java.io.FileNotFoundException: 
class path resource [resources.xml] cannot be opened because it does not exist
&lt;/pre&gt;&lt;br /&gt;
What is missing is that you need to tell JBoss about your CLASSPATH variable.&lt;br /&gt;
Just edit &lt;b style="color: #38761d;"&gt;./jboss-as/bin/run.bat&lt;/b&gt; and add the &lt;b&gt;CLASSPATH&lt;/b&gt; variable and you will be up and running in no time.&lt;br /&gt;
&lt;br /&gt;
&lt;pre style="color: #38761d;"&gt;:RESTART
"%JAVA%" %JAVA_OPTS% ^
   -Djava.endorsed.dirs="%JBOSS_ENDORSED_DIRS%" ^
   -classpath "%JBOSS_CLASSPATH%;%CLASSPATH%" ^
   org.jboss.Main -b 0.0.0.0 -c production %*
&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/743578218566083321-138444482703183159?l=fandry.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/RQ2BlSqdCaHAGHC5-8tG09Sp_mM/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/RQ2BlSqdCaHAGHC5-8tG09Sp_mM/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/RQ2BlSqdCaHAGHC5-8tG09Sp_mM/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/RQ2BlSqdCaHAGHC5-8tG09Sp_mM/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/TechnologyHighlights/~4/d80xOB0ojYM" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://fandry.blogspot.com/feeds/138444482703183159/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=743578218566083321&amp;postID=138444482703183159" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/743578218566083321/posts/default/138444482703183159?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/743578218566083321/posts/default/138444482703183159?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/TechnologyHighlights/~3/d80xOB0ojYM/spring-dependency-injection-with-jboss.html" title="Spring Dependency Injection with JBOSS : the CLASSPATH issue" /><author><name>fandry</name><uri>http://www.blogger.com/profile/01990790629557446302</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="24" height="32" src="http://bp3.blogger.com/_V_sYr0AnKIc/SEQpDbMcf7I/AAAAAAAABMs/qBizDBN3sXs/S220/fandry.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://2.bp.blogspot.com/_V_sYr0AnKIc/TIpyy_BG5-I/AAAAAAAACgk/W_2B0sB0t6M/s72-c/Spring-JBOSS.png" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://fandry.blogspot.com/2010/09/spring-dependency-injection-with-jboss.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CU4AQ3Y5eCp7ImA9Wx5RFkU.&quot;"><id>tag:blogger.com,1999:blog-743578218566083321.post-983218863341494309</id><published>2010-08-24T13:09:00.000-07:00</published><updated>2010-08-24T14:05:42.820-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-08-24T14:05:42.820-07:00</app:edited><title>RESTeasy JAX-RS embeddable server and SpringBeanProcessor</title><content type="html">&lt;a href="http://tjws.sourceforge.net/"&gt;TJWS&lt;/a&gt; (Tiny Java Web Server and Servlet Container) is a very convenient miniature Java Web Server build as a servlet container with HTTPD servlet providing         standard Web server functionality.&lt;br /&gt;
&lt;br /&gt;
I have been using TJWS for testing a &lt;a href="http://en.wikipedia.org/wiki/Restful"&gt;REST API&lt;/a&gt; to be deployed on JBoss application server. The advantage is that &lt;a href="http://www.junit.org/"&gt;JUnit tests&lt;/a&gt; can run without the need to deploy a war file on JBoss. Since I have implemented the REST API with RESTEasy, I am using the embedded TJWS server part of the &lt;span style="color: #38761d;"&gt;org.jboss.resteasy.plugins.server.tjws.TJWSEmbeddedJaxrsServer&lt;/span&gt; package.&lt;br /&gt;
&lt;br /&gt;
The &lt;a href="http://docs.jboss.org/resteasy/docs/1.0.0.GA/userguide/html_single/index.html"&gt;RESTEasy documentation (chapter 23)&lt;/a&gt; describes how to use the embedded container.&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;&lt;span style="color: #38761d;"&gt;@Path("/")&lt;/span&gt;&lt;span style="color: #38761d;"&gt;public class MyResource {

   @GET
   public String get() { return "hello world"; }
 
   public static void main(String[] args) throws Exception 
   {
      TJWSEmbeddedJaxrsServer tjws = new TJWSEmbeddedJaxrsServer();
      tjws.setPort(8081);
      tjws.getRegistry().addPerRequestResource(MyResource.class);
      tjws.start();
   }
}&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;
As you can see, TJWS is very simple to use. You create an instance of the server, setup the port (this is very useful when for example certain ports are already used - I had to set a specific port for our &lt;a href="http://hudson-ci.org/"&gt;Hudson&lt;/a&gt; continuous builds). Then you specify the class to test and you start the server.&lt;br /&gt;
&lt;br /&gt;
In my JUnit tests, I start the server before each tests and stop it after the tests are completed:&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;&lt;span style="color: #38761d;"&gt;private TJWSEmbeddedJaxrsServer server; 

@Before
    public void start() {
      
     server = new TJWSEmbeddedJaxrsServer();
     server.setPort(SERVER_PORT);
     server.getDeployment().getActualResourceClasses().add(MyResource.class);
     server.start();
    }

@After
    public void stop() {
     server.stop();
    }&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;
Since I am using &lt;a href="http://www.springsource.org/"&gt;Spring&lt;/a&gt; I was interested to leverage the framework for dependency injection in order to configure certain server settings. However the &lt;a href="http://www.blogger.com/"&gt;RESTeasy documentation&lt;/a&gt; provides only some pseudo-code example:&lt;br /&gt;
&lt;br /&gt;
&lt;pre style="color: #38761d;"&gt;public static void main(String[] args) throws Exception 
   {
      final TJWSEmbeddedJaxrsServer tjws = new TJWSEmbeddedJaxrsServer();
      tjws.setPort(8081);

      org.resteasy.plugins.server.servlet.SpringBeanProcessor processor = new SpringBeanProcessor(tjws.getRegistry(), tjws.getFactory();
      ConfigurableBeanFactory factory = new XmlBeanFactory(...);
      factory.addBeanPostProcessor(processor);

      tjws.start();
   }
&lt;/pre&gt;&lt;br /&gt;
I had to make some modifications to the code provided as follow:&lt;br /&gt;
&lt;br /&gt;
&lt;pre style="color: #38761d;"&gt;@Before
    public void start() {
      
     server = new TJWSEmbeddedJaxrsServer();
     server.setPort(SERVER_PORT);
     server.getDeployment().getActualResourceClasses().add(MyResource.class);
     server.start();
     
     Resource resource = new FileSystemResource("src/test/resources/resources.xml");
     ConfigurableListableBeanFactory factory = new XmlBeanFactory(resource);
     SpringBeanProcessor processor = new SpringBeanProcessor(
             server.getDeployment().getDispatcher(),
             server.getDeployment().getRegistry(), 
             server.getDeployment().getProviderFactory());
     processor.postProcessBeanFactory(factory);
    }
&lt;/pre&gt;&lt;br /&gt;
Alternatively you can define your &lt;a href="http://static.springsource.org/spring/docs/2.5.x/reference/resources.html"&gt;Spring resource file&lt;/a&gt; in a static string directly in your &lt;a href="http://www.junit.org/"&gt;JUnit&lt;/a&gt; test class:&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;&lt;span style="color: #38761d;"&gt;Resource resource = new ByteArrayResource(SPRING_BEAN_CONFIG_FILE.getBytes());&lt;/span&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/743578218566083321-983218863341494309?l=fandry.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/qQGZ9XttvZFHwgmRhuTfuO1rIsY/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/qQGZ9XttvZFHwgmRhuTfuO1rIsY/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/qQGZ9XttvZFHwgmRhuTfuO1rIsY/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/qQGZ9XttvZFHwgmRhuTfuO1rIsY/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/TechnologyHighlights/~4/EtwZsy8tnmM" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://fandry.blogspot.com/feeds/983218863341494309/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=743578218566083321&amp;postID=983218863341494309" title="2 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/743578218566083321/posts/default/983218863341494309?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/743578218566083321/posts/default/983218863341494309?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/TechnologyHighlights/~3/EtwZsy8tnmM/resteasy-jax-rs-embeddable-server-and.html" title="RESTeasy JAX-RS embeddable server and SpringBeanProcessor" /><author><name>fandry</name><uri>http://www.blogger.com/profile/01990790629557446302</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="24" height="32" src="http://bp3.blogger.com/_V_sYr0AnKIc/SEQpDbMcf7I/AAAAAAAABMs/qBizDBN3sXs/S220/fandry.jpg" /></author><thr:total>2</thr:total><feedburner:origLink>http://fandry.blogspot.com/2010/08/resteasy-jax-rs-embeddable-server-and.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DkYMR3c-cSp7ImA9WhdaFEo.&quot;"><id>tag:blogger.com,1999:blog-743578218566083321.post-7077646593182833797</id><published>2010-07-28T17:18:00.000-07:00</published><updated>2011-10-24T09:36:26.959-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-10-24T09:36:26.959-07:00</app:edited><title>How to secure the JBoss JMX and Web Consoles?</title><content type="html">&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_V_sYr0AnKIc/TEprmJpo-fI/AAAAAAAACf0/NCWTJxwepyE/s1600/JBoss_consoles1.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://1.bp.blogspot.com/_V_sYr0AnKIc/TEprmJpo-fI/AAAAAAAACf0/NCWTJxwepyE/s320/JBoss_consoles1.png" /&gt;&lt;/a&gt;&lt;/div&gt;Lately I have been using JBoss more and more as my deployment platform of choice. I am currently using the latest &lt;a href="https://www.jboss.com/downloads/"&gt;JBoss Enterprise Middleware&lt;/a&gt; solution (EAP version 5.0.1). This is a commercial version, but you can also use the &lt;a href="https://community.jboss.org/"&gt;community edition&lt;/a&gt; as well which offers most of the same features.&lt;br /&gt;
&lt;br /&gt;
One of the issue I have encountered recently was &lt;b&gt;how to secure the web based administration consoles&lt;/b&gt;?&lt;br /&gt;
&lt;br /&gt;
As a matter of fact, the default installation offers a &lt;b&gt;login &lt;/b&gt;and &lt;b&gt;password &lt;/b&gt;for the &lt;a href="http://localhost:8080/admin-console"&gt;&lt;b&gt;admin console&lt;/b&gt;&lt;/a&gt; which is typically accessible on &lt;a href="http://localhost:8080/admin-console"&gt;http://localhost:8080/admin-console&lt;/a&gt; if your web application runs locally, or more generally on &lt;span style="color: #38761d;"&gt;http://&amp;lt;host&amp;gt;:&amp;lt;port&amp;gt;/admin-console&lt;/span&gt;.&lt;br /&gt;
However if you want to protect the JMX console (&lt;a href="http://localhost:8080/jmx-console/"&gt;http://localhost:8080/jmx-console&lt;/a&gt;) and the JBoss Web console (&lt;a href="http://localhost:8080/web-console"&gt;http://localhost:8080/web-console&lt;/a&gt;) you have to make sure that certain files in your installation are setup correctly.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Generally, the JBoss community and RedHat are quite good at documenting the features of their products, but I was disappointed to find incomplete information in the &lt;a href="http://community.jboss.org/wiki/securetheJmxConsole"&gt;main page on this subject&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
This page explains that "the &lt;a class="jive-link-wiki-small" href="http://community.jboss.org/docs/DOC-10941"&gt;jmx-console&lt;/a&gt; and &lt;a class="jive-link-wiki-small" href="http://community.jboss.org/docs/DOC-12659"&gt;web-console&lt;/a&gt; are standard servlet 2.3 deployments that can&lt;br /&gt;
be secured using &lt;a href="http://docs.sun.com/source/819-0130/agsecure.html"&gt;J2EE role based security&lt;/a&gt;.&amp;nbsp; Both also have a skeleton setup to allow one to easily enable security using username/password/role mappings found in the&lt;span style="color: #38761d;"&gt; jmx-console.war&lt;/span&gt; and &lt;span style="color: #38761d;"&gt;web-console.war&lt;/span&gt; deployments in the corresponding &lt;span style="color: #38761d;"&gt;WEB-INF/classes&lt;/span&gt; &lt;b&gt;users.properties&lt;/b&gt; and &lt;b&gt;roles.properties&lt;/b&gt; files".&lt;br /&gt;
&lt;div style="height: 8pt; min-height: 8pt; padding: 0px;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="height: 8pt; min-height: 8pt; padding: 0px;"&gt;Until this point, it is quite clear. The difficulty starts with a vague description where to find the files in questions :&lt;/div&gt;&lt;div style="height: 8pt; min-height: 8pt; padding: 0px;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;i&gt;To secure the JMX Console using a username/password file -&lt;/i&gt;&lt;br /&gt;
&lt;ul&gt;&lt;li type="ul"&gt;&lt;i&gt;Locate the&amp;nbsp; directory.&amp;nbsp; This will normally be in&amp;nbsp; directory..&lt;/i&gt;&lt;br /&gt;
&lt;/li&gt;
&lt;/ul&gt;&lt;div style="height: 8pt; min-height: 8pt; padding: 0px;"&gt;&lt;/div&gt;The author probably assumes that the various locations are obvious to everyone. Let me be more precise and generous in details:&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/_V_sYr0AnKIc/TEpz6SgiYHI/AAAAAAAACf8/sEcdgL9QKjg/s1600/Jboss_configs.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="320" src="http://4.bp.blogspot.com/_V_sYr0AnKIc/TEpz6SgiYHI/AAAAAAAACf8/sEcdgL9QKjg/s320/Jboss_configs.png" width="216" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
First you will need to know which profile/configuration you are running. JBoss EAP has &lt;a href="http://www.redhat.com/docs/en-US/JBoss_Enterprise_Application_Platform/5.0.1/html/Administration_And_Configuration_Guide/Standard_Server_Profiles.html"&gt;six configurations&lt;/a&gt; based on your needs:&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;&lt;b&gt;&lt;span class="emphasis"&gt;&lt;i&gt;all&lt;/i&gt;&lt;/span&gt;&lt;/b&gt; (everything, including clustering support and other enterprise extensions)&lt;/li&gt;
&lt;li&gt;&lt;b&gt;&lt;span class="emphasis"&gt;&lt;i&gt;default&lt;/i&gt;&lt;/span&gt; &lt;/b&gt;(for application developers) &lt;/li&gt;
&lt;li&gt;&lt;i&gt;&lt;b&gt;minimal &lt;/b&gt;&lt;/i&gt;(the strict minimum)&lt;/li&gt;
&lt;li&gt;&lt;b&gt;&lt;span class="emphasis"&gt;&lt;i&gt;production&lt;/i&gt;&lt;/span&gt; (&lt;/b&gt;everything but optimized for production environments)&lt;/li&gt;
&lt;li&gt;&lt;b&gt;&lt;span class="emphasis"&gt;&lt;i&gt;standard&lt;/i&gt;&lt;/span&gt; &lt;/b&gt;(tested for Java EE compliance)&lt;/li&gt;
&lt;li&gt;&lt;i&gt;&lt;b&gt;web &lt;/b&gt;&lt;/i&gt;&lt;span class="emphasis"&gt;&lt;i&gt;(&lt;/i&gt;&lt;/span&gt;experimental lightweight configuration)&amp;nbsp;&lt;/li&gt;
&lt;/ul&gt;&lt;br /&gt;
&lt;ul&gt;&lt;/ul&gt;If you did not specify your profile explicitly at starting time (&lt;code class="code"&gt;&lt;span style="color: #38761d;"&gt;run.sh -c &lt;profile&gt;&lt;/profile&gt;&lt;/span&gt;)&lt;/code&gt;you most likely use the default profile.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span class="headerText"&gt;&lt;/span&gt;&lt;br /&gt;
&lt;a href="http://1.bp.blogspot.com/_V_sYr0AnKIc/TEp1U8Z9uiI/AAAAAAAACgE/Sz6-1kn692g/s1600/default_profile.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://1.bp.blogspot.com/_V_sYr0AnKIc/TEp1U8Z9uiI/AAAAAAAACgE/Sz6-1kn692g/s320/default_profile.png" /&gt;&lt;/a&gt;&lt;span class="headerText"&gt;&lt;/span&gt;&lt;br /&gt;
You can check which profile is running by looking at your &lt;span class="headerText"&gt;JBoss EAP Admin Console. The name of the profile/configuration is indicated at the top of the server hierarchy.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span class="headerText"&gt;By the way, the various applications that you will likely developed (war, ear, rar or jar files) will be deployed under the corresponding folders under the Applications node.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span class="headerText"&gt;First you might want to change the login and password of the admin console itself before adding those for the JMX and Web consoles?&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span class="headerText"&gt; &lt;/span&gt;&lt;br /&gt;
&lt;span class="headerText"&gt;One important "meta" file is login-config.xml which is located under &lt;span style="color: #38761d;"&gt;\jboss-as\server\&lt;profile&gt;&lt;/profile&gt;&lt;/span&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span class="headerText"&gt;&lt;br /&gt;
&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span class="headerText"&gt;This file specify for a specific profile (e.g. default) the &lt;/span&gt;security-domain values for the consoles:&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;&lt;span style="color: #38761d;"&gt;&amp;lt;application-policy name = "jmx-console"&amp;gt;
    &amp;lt;authentication&amp;gt;
      &amp;lt;login-module code="org.jboss.security.auth.spi.UsersRolesLoginModule"
        flag="required"&amp;gt;
        &amp;lt;module-option name="usersProperties"&amp;gt;props/jmx-console-users.properties&amp;lt;/module-option&amp;gt;
        &amp;lt;module-option name="rolesProperties"&amp;gt;props/jmx-console-roles.properties&amp;lt;/module-option&amp;gt;
      &amp;lt;/login-module&amp;gt;
    &amp;lt;/authentication&amp;gt;
  &amp;lt;/application-policy&amp;gt;&lt;/span&gt;&amp;nbsp;&lt;/pre&gt;&lt;br /&gt;
&lt;pre&gt;&lt;span style="color: #38761d;"&gt;&amp;lt;application-policy name = "web-console"&amp;gt;
    &amp;lt;authentication&amp;gt;
      &amp;lt;login-module code="org.jboss.security.auth.spi.UsersRolesLoginModule"
        flag="required"&amp;gt;
        &amp;lt;module-option name="usersProperties"&amp;gt;web-console-users.properties&amp;lt;/module-option&amp;gt;
        &amp;lt;module-option name="rolesProperties"&amp;gt;web-console-roles.properties&amp;lt;/module-option&amp;gt;
      &amp;lt;/login-module&amp;gt;
    &amp;lt;/authentication&amp;gt;
  &amp;lt;/application-policy&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;
In other words, this file can help you locate and map how authentication (login and password in users.properties file) and authorization (access control in roles.properties file) is specified.&lt;br /&gt;
&lt;br /&gt;
Since these consoles are themselves web applications, you will need to look at exploded war files under your profile, under the deploy folder. &lt;br /&gt;
&lt;br /&gt;
&lt;span style="font-size: large;"&gt;&lt;b&gt;Securing the JMX Console:&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/_V_sYr0AnKIc/TEp8xQQ83WI/AAAAAAAACgM/EcnsHxTePIA/s1600/jmx-console.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="320" src="http://2.bp.blogspot.com/_V_sYr0AnKIc/TEp8xQQ83WI/AAAAAAAACgM/EcnsHxTePIA/s320/jmx-console.png" width="158" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;ul&gt;&lt;li&gt;Locate the folder jmx-console.war under &lt;span style="color: #38761d;"&gt;./server/&amp;lt;config&amp;gt;/deploy&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;Open the file &lt;span style="color: #38761d;"&gt;./server/&amp;lt;config&amp;gt;/deploy/mx-console.war/WEB-INF/web.xml &lt;/span&gt;&lt;/li&gt;
&lt;li&gt;Verify that the &lt;span style="color: #38761d;"&gt;&amp;lt;security-constraint&amp;gt;&lt;/span&gt; section is not commented (in this section, you should see specified&amp;nbsp; the roles for authorization (see below)&lt;/li&gt;
&lt;/ul&gt;&lt;pre&gt;&lt;span style="color: #38761d;"&gt;&amp;lt;security-constraint&amp;gt;
     &amp;lt;web-resource-collection&amp;gt;
       &amp;lt;web-resource-name&amp;gt;HtmlAdaptor&amp;lt;/web-resource-name&amp;gt;
       &amp;lt;description&amp;gt;An example security config that only allows users with the
         role JBossAdmin to access the HTML JMX console web application
       &amp;lt;/description&amp;gt;
       &amp;lt;url-pattern&amp;gt;/*&amp;lt;/url-pattern&amp;gt;
     &amp;lt;/web-resource-collection&amp;gt;
     &amp;lt;auth-constraint&amp;gt;
       &amp;lt;role-name&amp;gt;JBossAdmin&amp;lt;/role-name&amp;gt;
     &amp;lt;/auth-constraint&amp;gt;
   &amp;lt;/security-constraint&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;ul&gt;&lt;li&gt;Locate the file: &lt;span style="color: #38761d;"&gt;.\server\&amp;lt;config&amp;gt;\conf\props\jmx-console-users.properties&lt;/span&gt; (if the file name has not been changed in &lt;span class="headerText"&gt;&lt;span style="color: #38761d;"&gt;login-config.xml&lt;/span&gt;)&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class="headerText"&gt;change &lt;span style="color: #38761d;"&gt;admin=admin&lt;/span&gt; to your new &lt;span style="color: #38761d;"&gt;&amp;lt;new_login&amp;gt;=&lt;/span&gt;&lt;/span&gt;&lt;span class="headerText" style="color: #38761d;"&gt;&amp;lt;new_password&amp;gt;&lt;/span&gt; &lt;/li&gt;
&lt;/ul&gt;The authentication method is specified in the following section:&lt;br /&gt;
&lt;pre&gt;&lt;span style="color: #38761d;"&gt; &amp;lt;login-config&amp;gt;
      &amp;lt;auth-method&amp;gt;BASIC&amp;lt;/auth-method&amp;gt;
      &amp;lt;realm-name&amp;gt;JBoss JMX Console&amp;lt;/realm-name&amp;gt;
   &amp;lt;/login-config&amp;gt;

   &amp;lt;security-role&amp;gt;
      &amp;lt;role-name&amp;gt;JBossAdmin&amp;lt;/role-name&amp;gt;
   &amp;lt;/security-role&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;
&lt;span style="font-size: large;"&gt;&lt;b&gt;Securing the Web Console:&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;Login credentials are the same as used for the JMX console - in : &lt;span style="color: #38761d;"&gt;.\server\&lt;/span&gt;&lt;span style="color: #38761d;"&gt;&amp;lt;config&amp;gt;&lt;/span&gt;&lt;span style="color: #38761d;"&gt;\conf\props\jmx-console-users.properties&lt;/span&gt;&amp;nbsp;&lt;/li&gt;
&lt;li&gt;&lt;span class="headerText"&gt;change &lt;span style="color: #38761d;"&gt;admin=admin&lt;/span&gt; to your new &lt;span style="color: #38761d;"&gt;&amp;lt;new_login&amp;gt;=&lt;/span&gt;&lt;/span&gt;&lt;span class="headerText" style="color: #38761d;"&gt;&amp;lt;new_password&amp;gt;&amp;nbsp; &lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;/div&gt;&lt;br /&gt;
For more information and this topic you can also look at Securing the &lt;a href="http://community.jboss.org/wiki/SecureTheJmxConsole"&gt;JMX Console and Web Console (HTTP)&lt;/a&gt;.&lt;br /&gt;
&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/743578218566083321-7077646593182833797?l=fandry.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/KnvGlDWJBY-X_RfYDadVH86bq8E/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/KnvGlDWJBY-X_RfYDadVH86bq8E/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/KnvGlDWJBY-X_RfYDadVH86bq8E/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/KnvGlDWJBY-X_RfYDadVH86bq8E/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/TechnologyHighlights/~4/3liD_iBE1iA" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://fandry.blogspot.com/feeds/7077646593182833797/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=743578218566083321&amp;postID=7077646593182833797" title="2 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/743578218566083321/posts/default/7077646593182833797?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/743578218566083321/posts/default/7077646593182833797?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/TechnologyHighlights/~3/3liD_iBE1iA/how-to-secure-jboss-jmx-and-web.html" title="How to secure the JBoss JMX and Web Consoles?" /><author><name>fandry</name><uri>http://www.blogger.com/profile/01990790629557446302</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="24" height="32" src="http://bp3.blogger.com/_V_sYr0AnKIc/SEQpDbMcf7I/AAAAAAAABMs/qBizDBN3sXs/S220/fandry.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://1.bp.blogspot.com/_V_sYr0AnKIc/TEprmJpo-fI/AAAAAAAACf0/NCWTJxwepyE/s72-c/JBoss_consoles1.png" height="72" width="72" /><thr:total>2</thr:total><feedburner:origLink>http://fandry.blogspot.com/2010/07/how-to-secure-jboss-jmx-and-web.html</feedburner:origLink></entry><entry gd:etag="W/&quot;D0EHSHsycCp7ImA9WxFUGEg.&quot;"><id>tag:blogger.com,1999:blog-743578218566083321.post-1532506141731170508</id><published>2010-06-10T14:50:00.000-07:00</published><updated>2010-06-29T16:53:59.598-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-06-29T16:53:59.598-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Google Health Data API PHR java authentication" /><category scheme="http://www.blogger.com/atom/ns#" term="RESTEasy" /><category scheme="http://www.blogger.com/atom/ns#" term="HTTP" /><category scheme="http://www.blogger.com/atom/ns#" term="GenericEntity" /><category scheme="http://www.blogger.com/atom/ns#" term="Generic" /><category scheme="http://www.blogger.com/atom/ns#" term="POST" /><category scheme="http://www.blogger.com/atom/ns#" term="Rest API" /><title>Response objects and the use of GenericEntity class with RESTEasy</title><content type="html">Recently during the &lt;a href="http://fandry.blogspot.com/2010/06/jaxb-json-rest-api-using-resteasy-on.html"&gt;implementation of a REST API&lt;/a&gt;, I wanted to return a complex response containing a list of objects (Patients). The issue was that the &lt;a href="http://jboss.org/resteasy"&gt;RESTEasy&lt;/a&gt; build-in JAXB MessageBodyWriter could not directly handle lists of &lt;a href="http://en.wikipedia.org/wiki/JAXB"&gt;JAXB&lt;/a&gt; objects (Java has trouble obtaining generic type information at runtime).&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/_V_sYr0AnKIc/TBFbfpB5XwI/AAAAAAAACfs/J1O-vBeZlA4/s1600/REST_Arch.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://3.bp.blogspot.com/_V_sYr0AnKIc/TBFbfpB5XwI/AAAAAAAACfs/J1O-vBeZlA4/s320/REST_Arch.png" /&gt;&lt;/a&gt;&lt;/div&gt;I was recently in a situation where I had to create a complex response to a &lt;a href="http://en.wikipedia.org/wiki/HTTP_POST"&gt;HTTP POST&lt;/a&gt; for my REST API. I am using &lt;a href="http://fandry.blogspot.com/2010/06/jaxb-json-rest-api-using-resteasy-on.html"&gt;JAXB /JSON support from RESTEasy&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
I found some element of answer in the book "&lt;a href="http://www.amazon.com/RESTful-Java-Jax-RS-Animal-Guide/dp/0596158041/ref=sr_1_1?ie=UTF8&amp;amp;s=books&amp;amp;qid=1276203466&amp;amp;sr=1-1"&gt;RESTFul Java with JAX-RS&lt;/a&gt;" from Bill Burke (pp 102). However the code snippet had a couple of errors:&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; • the &lt;a href="http://www.kiwidoc.com/java/l/x/javax.ws.rs/jsr311-api/1.1/p/javax.ws.rs.core/c/GenericEntity"&gt;GenericEntity &lt;/a&gt;object cannot be passed to the &lt;a href="http://www.kiwidoc.com/java/l/x/javax.ws.rs/jsr311-api/1.1/p/javax.ws.rs.core/c/Response"&gt;Response&lt;/a&gt;.ok() method directly (a &lt;a href="http://www.kiwidoc.com/java/l/x/javax.ws.rs/jsr311-api/1.1/p/javax.ws.rs.core/c/Response.ResponseBuilder"&gt;ResponseBuilder&lt;/a&gt; is required).&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; • references to &lt;a href="http://www.kiwidoc.com/java/l/x/javax.ws.rs/jsr311-api/1.1/p/javax.ws.rs.core/c/GenericEntity"&gt;GenericEntity&lt;/a&gt;&lt;t&gt; needs to be parameterized.&lt;br /&gt;
&lt;br /&gt;
My use case is a little more complex than in the book. I am receiving a user-name and password from a POST (e.g. a form submit). I then perform the authentication and returns a list of Patient objects in a JSON/GZIP compressed format (instead a list of Customer objects) together with an authentication token.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The resulting code looks like this:&lt;br /&gt;
&lt;/t&gt;&lt;br /&gt;
&lt;pre&gt;&lt;span style="color: #38761d;"&gt;
   @POST
   @Path("/token")
   @Consumes("application/x-www-form-urlencoded")
   @Produces("application/json")
   @GZIP
   public Response getPatientsWithToken(@FormParam("username") String username, @FormParam("password") String password) {
  
        Login login = new Login(username, password);
        // ... perform authentication here ....
    
        // Build the returning patient list
        List&amp;lt;Patient&amp;gt; returnList = new ArrayList&amp;lt;Patient&amp;gt;();
        returnList.addAll(patients.values());
        Collections.sort(returnList);
      
        GenericEntity&amp;lt;List&amp;lt;Patient&amp;gt;&amp;gt; entity = new GenericEntity&amp;lt;List&amp;lt;Patient&amp;gt;&amp;gt;(returnList){};
      
        // Create the response
        ResponseBuilder builder = Response.ok(entity);
        return builder.build();
   }&lt;/span&gt;

&lt;/pre&gt;&lt;div style="color: #38761d;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;br /&gt;
Of course you will have to import the following classes as well:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;pre style="color: #38761d;"&gt;import javax.ws.rs.core.GenericEntity;
import javax.ws.rs.core.Response;
import javax.ws.rs.core.Response.ResponseBuilder;
&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/743578218566083321-1532506141731170508?l=fandry.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/jYBT0-68kiG-IYC-YxMVdd5Ftno/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/jYBT0-68kiG-IYC-YxMVdd5Ftno/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/jYBT0-68kiG-IYC-YxMVdd5Ftno/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/jYBT0-68kiG-IYC-YxMVdd5Ftno/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/TechnologyHighlights/~4/pKaEyDFLlTU" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://fandry.blogspot.com/feeds/1532506141731170508/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=743578218566083321&amp;postID=1532506141731170508" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/743578218566083321/posts/default/1532506141731170508?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/743578218566083321/posts/default/1532506141731170508?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/TechnologyHighlights/~3/pKaEyDFLlTU/response-objects-and-use-genericentity.html" title="Response objects and the use of GenericEntity class with RESTEasy" /><author><name>fandry</name><uri>http://www.blogger.com/profile/01990790629557446302</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="24" height="32" src="http://bp3.blogger.com/_V_sYr0AnKIc/SEQpDbMcf7I/AAAAAAAABMs/qBizDBN3sXs/S220/fandry.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://3.bp.blogspot.com/_V_sYr0AnKIc/TBFbfpB5XwI/AAAAAAAACfs/J1O-vBeZlA4/s72-c/REST_Arch.png" height="72" width="72" /><thr:total>1</thr:total><feedburner:origLink>http://fandry.blogspot.com/2010/06/response-objects-and-use-genericentity.html</feedburner:origLink></entry><entry gd:etag="W/&quot;D08NQnk_eSp7ImA9WxFUGEg.&quot;"><id>tag:blogger.com,1999:blog-743578218566083321.post-2790171800820442860</id><published>2010-06-09T13:25:00.001-07:00</published><updated>2010-06-29T16:58:13.741-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-06-29T16:58:13.741-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Healthcare" /><category scheme="http://www.blogger.com/atom/ns#" term="SOAP" /><category scheme="http://www.blogger.com/atom/ns#" term="REST" /><category scheme="http://www.blogger.com/atom/ns#" term="API" /><category scheme="http://www.blogger.com/atom/ns#" term="market" /><category scheme="http://www.blogger.com/atom/ns#" term="NHIN Direct" /><title>Open APIs: State of the Market, May 2010</title><content type="html">Today, I was looking at the presentation from John Musser related to Open APIs (see below). Even though these statistics comes mainly from mashup and consumer applications, I was surprised by the fact that &lt;a href="http://en.wikipedia.org/wiki/Restful"&gt;REST APIs&lt;/a&gt; are gaining market shares over &lt;a href="http://en.wikipedia.org/wiki/SOAP"&gt;SOAP APIs&lt;/a&gt; so rapidly. &lt;br /&gt;
&lt;br /&gt;
&lt;a href="http://1.bp.blogspot.com/_V_sYr0AnKIc/TA_-YaQKe4I/AAAAAAAACfc/_ihM92dSrdk/s1600/SOAP_vs_REST.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://1.bp.blogspot.com/_V_sYr0AnKIc/TA_-YaQKe4I/AAAAAAAACfc/_ihM92dSrdk/s320/SOAP_vs_REST.png" /&gt;&lt;/a&gt;In B2B and in the enterprise world in general &lt;a href="http://en.wikipedia.org/wiki/SOAP"&gt;SOAP&lt;/a&gt; is often the top choice. The advantages for SOAP &lt;a href="http://www.taranfx.com/rest-vs-soap-using-http-choosing-the-right-webservice-protocol"&gt;often mentioned&lt;/a&gt; are:&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;Type checking (via the WSDL files)&lt;/li&gt;
&lt;li&gt;Availability of development tools&lt;/li&gt;
&lt;/ul&gt;On the other hand, &lt;a href="http://en.wikipedia.org/wiki/Restful"&gt;REST&lt;/a&gt; offers the following:&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;Lightweight and easy to build &lt;/li&gt;
&lt;li&gt;Human Readable Results&lt;/li&gt;
&lt;li&gt;Extensibility&lt;/li&gt;
&lt;li&gt;Scalability&lt;/li&gt;
&lt;/ul&gt;&lt;br /&gt;
In Health Care, SOAP is still widespread and prevalent. However there are some interesting projects such as &lt;a href="http://nhindirect.org/Concrete+Implementation+Workgroup"&gt;NHIN Direct Health Information Exchange&lt;/a&gt; where the &lt;a href="http://searchhealthit.techtarget.com/healthitexchange/healthitpulse/nhin-direct-prescribes-soap-and-rest-for-health-information-exchange/"&gt;relevance of REST vs other API protocols are discussed&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
It will be interesting to see what will be the outcome of such discussions.&lt;br /&gt;
&lt;div id="__ss_4322128" style="width: 425px;"&gt;&lt;b style="display: block; margin: 12px 0pt 4px;"&gt; &lt;/b&gt;&lt;b style="display: block; margin: 12px 0pt 4px;"&gt;&lt;a href="http://www.slideshare.net/jmusser/pw-glue-conmay2010" title="Open APIs: State of the Market, May 2010"&gt;Open APIs: State of the Market, May 2010&lt;/a&gt;&lt;/b&gt;&lt;object height="355" id="__sse4322128" width="425"&gt;&lt;param name="movie" value="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=pwglueconmay2010-100526172639-phpapp02&amp;stripped_title=pw-glue-conmay2010" /&gt;&lt;param name="allowFullScreen" value="true"/&gt;&lt;param name="allowScriptAccess" value="always"/&gt;&lt;embed name="__sse4322128" src="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=pwglueconmay2010-100526172639-phpapp02&amp;stripped_title=pw-glue-conmay2010" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="355"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;br /&gt;
&lt;div style="padding: 5px 0pt 12px;"&gt;View more &lt;a href="http://www.slideshare.net/"&gt;presentations&lt;/a&gt; from &lt;a href="http://www.slideshare.net/jmusser"&gt;jmusser&lt;/a&gt;.&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/743578218566083321-2790171800820442860?l=fandry.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/TeO11wdNYffcGZHKPcEQMHMXGl8/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/TeO11wdNYffcGZHKPcEQMHMXGl8/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/TeO11wdNYffcGZHKPcEQMHMXGl8/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/TeO11wdNYffcGZHKPcEQMHMXGl8/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/TechnologyHighlights/~4/3Qz2YuB_eGY" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://fandry.blogspot.com/feeds/2790171800820442860/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=743578218566083321&amp;postID=2790171800820442860" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/743578218566083321/posts/default/2790171800820442860?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/743578218566083321/posts/default/2790171800820442860?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/TechnologyHighlights/~3/3Qz2YuB_eGY/open-apis-state-of-market-may-2010.html" title="Open APIs: State of the Market, May 2010" /><author><name>fandry</name><uri>http://www.blogger.com/profile/01990790629557446302</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="24" height="32" src="http://bp3.blogger.com/_V_sYr0AnKIc/SEQpDbMcf7I/AAAAAAAABMs/qBizDBN3sXs/S220/fandry.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://1.bp.blogspot.com/_V_sYr0AnKIc/TA_-YaQKe4I/AAAAAAAACfc/_ihM92dSrdk/s72-c/SOAP_vs_REST.png" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://fandry.blogspot.com/2010/06/open-apis-state-of-market-may-2010.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DUQMRXc_cSp7ImA9Wx9aFk8.&quot;"><id>tag:blogger.com,1999:blog-743578218566083321.post-3472093302532316093</id><published>2010-06-01T17:32:00.000-07:00</published><updated>2011-03-08T15:36:24.949-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-03-08T15:36:24.949-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="POM" /><category scheme="http://www.blogger.com/atom/ns#" term="JBOSS" /><category scheme="http://www.blogger.com/atom/ns#" term="JSON" /><category scheme="http://www.blogger.com/atom/ns#" term="RESTEasy" /><category scheme="http://www.blogger.com/atom/ns#" term="JAXB" /><category scheme="http://www.blogger.com/atom/ns#" term="Maven 2" /><category scheme="http://www.blogger.com/atom/ns#" term="Eclipse" /><category scheme="http://www.blogger.com/atom/ns#" term="Rest API" /><category scheme="http://www.blogger.com/atom/ns#" term="JUnit" /><category scheme="http://www.blogger.com/atom/ns#" term="GZIP" /><title>JAXB-JSON Rest API using RESTEasy on JBoss EAP</title><content type="html">&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;In this second part of my evaluation of JBoss RESTEasy, I focus on adapting the &lt;a href="http://en.wikipedia.org/wiki/Java_Architecture_for_XML_Binding"&gt;JAXB&lt;/a&gt;-&lt;a href="http://www.json.org/"&gt;JSON&lt;/a&gt; samples provided by &lt;a href="http://www.redhat.com/docs/en-US/JBoss_Enterprise_Application_Platform/5.0.1/html/RESTEasy/index.html"&gt;RESTEasy&lt;/a&gt; for &lt;a href="http://www.redhat.com/docs/en-US/JBoss_Enterprise_Application_Platform/"&gt;JBoss Enterprise Application Platform 5.0.1&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
Earlier I find myself to adapt the &lt;a href="http://en.wikipedia.org/wiki/Apache_Maven"&gt;maven POM file&lt;/a&gt; to have the proper dependencies for the &lt;a href="http://fandry.blogspot.com/2010/05/enhanced-pom-for-jboss-resteasy-twitter.html"&gt;Twitter RESTEasy client&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
Initially this simple JAXB-JSON sample had been designed to run on &lt;a href="http://jetty.codehaus.org/jetty/"&gt;Jetty Web Server&lt;/a&gt; which run fine out-of-the box. However I had to make some modifications to the original project structure to have the code running as a simple &lt;a href="http://www.eclipse.org/"&gt;eclipse&lt;/a&gt; project that can be deploy on &lt;a href="http://www.redhat.com/docs/en-US/JBoss_Enterprise_Application_Platform/"&gt;JBoss EAP 5.0.X&lt;/a&gt; from &lt;a href="http://www.redhat.com/"&gt;RedHa&lt;/a&gt;t (this will also work on &lt;a href="http://community.jboss.org/"&gt;Jboss community edition&lt;/a&gt;).&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;The new project (eclipse) structure looks as below:&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;a href="http://1.bp.blogspot.com/_V_sYr0AnKIc/TAWRiQmkV6I/AAAAAAAACfE/zUxp4sCcmVs/s1600/JAXB-JSON-eclipse.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="400" src="http://1.bp.blogspot.com/_V_sYr0AnKIc/TAWRiQmkV6I/AAAAAAAACfE/zUxp4sCcmVs/s400/JAXB-JSON-eclipse.jpg" width="215" /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Notice that I have also moved the code for both packages:&amp;nbsp; &lt;span style="color: #38761d;"&gt;org.jboss.resteasy.annotations.providers.jaxb.json&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: #38761d;"&gt;org.jboss.resteasy.plugins.providers.jaxb.json&lt;/span&gt;&lt;br /&gt;
at the root of my project, since I am not using the remaining code of the example.&lt;br /&gt;
&lt;br /&gt;
I also made some additional adaptations for JBoss to some of the project files including:&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;pom.xml file&lt;/li&gt;
&lt;li&gt; web.xml&lt;/li&gt;
&lt;/ul&gt;I also added a small test suite to test the REST API operations using JUnit which will work after the first deployment (I run JBoss locally on &lt;span style="color: #38761d;"&gt;http://localhost:8080&lt;/span&gt;).&lt;br /&gt;
&lt;br /&gt;
By the way, make sure you have &lt;span style="color: #38761d;"&gt;src/main/resources/META-INF/services/javax.ws.rs.ext.Providers&lt;/span&gt; included in your project.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Here is the content of my new pom.xml file for JBoss:&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;pre style="color: #38761d;"&gt;&amp;lt;?xml version="1.0" encoding="UTF-8"?&amp;gt;
&amp;lt;project xmlns="http://maven.apache.org/POM/4.0.0"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"&amp;gt;
    &amp;lt;modelVersion&amp;gt;4.0.0&amp;lt;/modelVersion&amp;gt;
    &amp;lt;groupId&amp;gt;org.jboss.resteasy.examples&amp;lt;/groupId&amp;gt;
    &amp;lt;artifactId&amp;gt;jaxb-json&amp;lt;/artifactId&amp;gt;
    &amp;lt;version&amp;gt;0.1.0&amp;lt;/version&amp;gt;
    &amp;lt;packaging&amp;gt;war&amp;lt;/packaging&amp;gt;
    &amp;lt;name/&amp;gt;
    &amp;lt;description/&amp;gt;

    &amp;lt;repositories&amp;gt;
        &amp;lt;repository&amp;gt;
            &amp;lt;id&amp;gt;java.net&amp;lt;/id&amp;gt;
            &amp;lt;url&amp;gt;http://download.java.net/maven/1&amp;lt;/url&amp;gt;
            &amp;lt;layout&amp;gt;legacy&amp;lt;/layout&amp;gt;
        &amp;lt;/repository&amp;gt;
        &amp;lt;repository&amp;gt;
            &amp;lt;id&amp;gt;maven repo&amp;lt;/id&amp;gt;
            &amp;lt;name&amp;gt;maven repo&amp;lt;/name&amp;gt;
            &amp;lt;url&amp;gt;http://repo1.maven.org/maven2/&amp;lt;/url&amp;gt;
        &amp;lt;/repository&amp;gt;
        &amp;lt;!-- For resteasy --&amp;gt;
        &amp;lt;repository&amp;gt;
            &amp;lt;id&amp;gt;jboss&amp;lt;/id&amp;gt;
            &amp;lt;name&amp;gt;jboss repo&amp;lt;/name&amp;gt;
            &amp;lt;url&amp;gt;http://repository.jboss.org/maven2&amp;lt;/url&amp;gt;
        &amp;lt;/repository&amp;gt;
    &amp;lt;/repositories&amp;gt;
    &amp;lt;dependencies&amp;gt;
    
        &amp;lt;!-- core library --&amp;gt;
        
        &amp;lt;dependency&amp;gt;
            &amp;lt;groupId&amp;gt;org.jboss.resteasy&amp;lt;/groupId&amp;gt;
            &amp;lt;artifactId&amp;gt;resteasy-jaxrs&amp;lt;/artifactId&amp;gt;
            &amp;lt;version&amp;gt;1.2.1.GA&amp;lt;/version&amp;gt;
            &amp;lt;!-- filter out unwanted jars --&amp;gt;
            &amp;lt;exclusions&amp;gt;
                &amp;lt;exclusion&amp;gt;
                    &amp;lt;groupId&amp;gt;commons-httpclient&amp;lt;/groupId&amp;gt;
                    &amp;lt;artifactId&amp;gt;commons-httpclient&amp;lt;/artifactId&amp;gt;
                &amp;lt;/exclusion&amp;gt;
                &amp;lt;exclusion&amp;gt;
                    &amp;lt;groupId&amp;gt;tjws&amp;lt;/groupId&amp;gt;
                    &amp;lt;artifactId&amp;gt;webserver&amp;lt;/artifactId&amp;gt;
                &amp;lt;/exclusion&amp;gt;
                &amp;lt;exclusion&amp;gt;
                    &amp;lt;groupId&amp;gt;javax.servlet&amp;lt;/groupId&amp;gt;
                    &amp;lt;artifactId&amp;gt;servlet-api&amp;lt;/artifactId&amp;gt;
                &amp;lt;/exclusion&amp;gt;
            &amp;lt;/exclusions&amp;gt;
        &amp;lt;/dependency&amp;gt;
        
        &amp;lt;!-- optional modules --&amp;gt;
        
      &amp;lt;dependency&amp;gt;
            &amp;lt;groupId&amp;gt;org.jboss.resteasy&amp;lt;/groupId&amp;gt;
            &amp;lt;artifactId&amp;gt;resteasy-jettison-provider&amp;lt;/artifactId&amp;gt;
            &amp;lt;version&amp;gt;1.2.1.GA&amp;lt;/version&amp;gt;
        &amp;lt;/dependency&amp;gt;
        
        &amp;lt;!-- modules already provided by Java 6.0 --&amp;gt;
         
   &amp;lt;dependency&amp;gt;
       &amp;lt;groupId&amp;gt;javax.xml.bind&amp;lt;/groupId&amp;gt;  
       &amp;lt;artifactId&amp;gt;jaxb-api&amp;lt;/artifactId&amp;gt;
       &amp;lt;version&amp;gt;2.1&amp;lt;/version&amp;gt;
       &amp;lt;scope&amp;gt;provided&amp;lt;/scope&amp;gt;
   &amp;lt;/dependency&amp;gt;
   
    &amp;lt;dependency&amp;gt;
         &amp;lt;groupId&amp;gt;junit&amp;lt;/groupId&amp;gt;
          &amp;lt;artifactId&amp;gt;junit&amp;lt;/artifactId&amp;gt;
          &amp;lt;version&amp;gt;4.1&amp;lt;/version&amp;gt;
                 &amp;lt;scope&amp;gt;test&amp;lt;/scope&amp;gt;
             &amp;lt;/dependency&amp;gt;
     
    &amp;lt;/dependencies&amp;gt;

    &amp;lt;build&amp;gt;
        &amp;lt;finalName&amp;gt;jaxb-json&amp;lt;/finalName&amp;gt;
        &amp;lt;plugins&amp;gt;
            &amp;lt;plugin&amp;gt;
                &amp;lt;groupId&amp;gt;org.codehaus.mojo&amp;lt;/groupId&amp;gt;
                &amp;lt;artifactId&amp;gt;jboss-maven-plugin&amp;lt;/artifactId&amp;gt;
                &amp;lt;version&amp;gt;1.4&amp;lt;/version&amp;gt;
                &amp;lt;configuration&amp;gt;
                    &amp;lt;jbossHome&amp;gt;C:\JBoss\EnterprisePlatform-5.0.0.GA\jboss-as&amp;lt;/jbossHome&amp;gt;
             &amp;lt;contextPath&amp;gt;/&amp;lt;/contextPath&amp;gt;
             &amp;lt;serverName&amp;gt;default&amp;lt;/serverName&amp;gt;
             &amp;lt;fileName&amp;gt;target/jaxb-json.war&amp;lt;/fileName&amp;gt;
          &amp;lt;/configuration&amp;gt;
            &amp;lt;/plugin&amp;gt;
            &amp;lt;plugin&amp;gt;
                &amp;lt;groupId&amp;gt;org.apache.maven.plugins&amp;lt;/groupId&amp;gt;
                &amp;lt;artifactId&amp;gt;maven-compiler-plugin&amp;lt;/artifactId&amp;gt;
                &amp;lt;configuration&amp;gt;
                    &amp;lt;source&amp;gt;1.5&amp;lt;/source&amp;gt;
                    &amp;lt;target&amp;gt;1.5&amp;lt;/target&amp;gt;
                &amp;lt;/configuration&amp;gt;
            &amp;lt;/plugin&amp;gt;
        &amp;lt;/plugins&amp;gt;
    &amp;lt;/build&amp;gt;
&amp;lt;/project&amp;gt;

&lt;/pre&gt;&lt;br /&gt;
I modified the web.xml for the URL looks more simple by removing the mapping to reasteasy:&lt;br /&gt;
&lt;br /&gt;
&lt;pre style="color: #38761d;"&gt;&amp;lt;?xml version="1.0"?&amp;gt;
&amp;lt;!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
        "http://java.sun.com/dtd/web-app_2_3.dtd"&amp;gt;

&amp;lt;web-app&amp;gt;
   &amp;lt;display-name&amp;gt;Archetype Created Web Application&amp;lt;/display-name&amp;gt;

   &amp;lt;context-param&amp;gt;
      &amp;lt;param-name&amp;gt;javax.ws.rs.Application&amp;lt;/param-name&amp;gt;
      &amp;lt;param-value&amp;gt;org.jboss.resteasy.examples.service.LibraryApplication&amp;lt;/param-value&amp;gt;
   &amp;lt;/context-param&amp;gt;

   &amp;lt;context-param&amp;gt;
      &amp;lt;param-name&amp;gt;resteasy.servlet.mapping.prefix&amp;lt;/param-name&amp;gt;
      &amp;lt;param-value&amp;gt;/&amp;lt;/param-value&amp;gt;
   &amp;lt;/context-param&amp;gt;

   &amp;lt;listener&amp;gt;
      &amp;lt;listener-class&amp;gt;
         org.jboss.resteasy.plugins.server.servlet.ResteasyBootstrap
      &amp;lt;/listener-class&amp;gt;
   &amp;lt;/listener&amp;gt;

   &amp;lt;servlet&amp;gt;
      &amp;lt;servlet-name&amp;gt;Resteasy&amp;lt;/servlet-name&amp;gt;
      &amp;lt;servlet-class&amp;gt;
         org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher
      &amp;lt;/servlet-class&amp;gt;
   &amp;lt;/servlet&amp;gt;

   &amp;lt;servlet-mapping&amp;gt;
      &amp;lt;servlet-name&amp;gt;Resteasy&amp;lt;/servlet-name&amp;gt;
      &amp;lt;url-pattern&amp;gt;/&amp;lt;/url-pattern&amp;gt;
   &amp;lt;/servlet-mapping&amp;gt;

&amp;lt;/web-app&amp;gt;
&lt;/pre&gt;&lt;br /&gt;
&lt;b&gt;The JUnit code looks like this:&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;pre style="color: #38761d;"&gt;package org.jboss.resteasy.examples.test;
 
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.net.HttpURLConnection;
import java.net.URL;

import junit.framework.Assert;
import junit.framework.Test;
import junit.framework.TestCase;
import junit.framework.TestSuite;
  
public class LibraryTest extends TestCase
{
    /**
     * Create the test case
     *
     * @param testName name of the test case
     */
    public LibraryTest( String testName )
    {
        super( testName );
    }

    /**
     * @return the suite of tests being tested
     */
    public static Test suite()
    {
        return new TestSuite( LibraryTest.class );
    }

      
    /**
     * Testing the Library REST API
     */
    
    public void testGetMapped()  
    {
     validateRESTCall("GET", "http://localhost:8080/jaxb-json/library/books/mapped");
     assertTrue( true );
    }
    

    public void testGetBadger()  
    {
     validateRESTCall("GET", "http://localhost:8080/jaxb-json/library/books/badger");
     assertTrue( true );
    }
    
    private void validateRESTCall(String method, String url) {
     
     try {
         System.out.println("*** "+method);
         URL resURL = new URL(url);
         System.out.println("URL: " + url.toString());
         HttpURLConnection connection = (HttpURLConnection) resURL.openConnection(); 
         connection.setRequestMethod(method);
         System.out.println("Content-Type: " + connection.getContentType());
         
         BufferedReader reader = new BufferedReader(new InputStreamReader(connection.getInputStream()));
 
         String line = reader.readLine();
         while (line != null)
         {
            System.out.println(line);
            line = reader.readLine();
         }
         Assert.assertEquals(HttpURLConnection.HTTP_OK, connection.getResponseCode());
         connection.disconnect();
     } catch (Exception err) { 
         System.out.print("Error in VHRResourceTest.validateRESTCall : " + err); 
        };
    }
}
&lt;/pre&gt;&lt;br /&gt;
To build I am using Maven (I recommend to install the &lt;a href="http://m2eclipse-wtp-ext.googlecode.com/svn/trunk/org.maven.ide.eclipse.wtp.ext.update/"&gt;maven eclipse plugin&lt;/a&gt;) with the goals &lt;span style="color: #38761d;"&gt;mvn clean install compile package&lt;/span&gt;. Make sure also that before that you do a &lt;span style="color: #38761d;"&gt;mvn eclipse:eclipse&lt;/span&gt; to update the dependencies in your project.&lt;br /&gt;
&lt;br /&gt;
To deploy jaxb-json.war file from eclipse (so I don't have to manually copy the war file from the target folder), I have installed the &lt;a href="http://www.jboss.org/tools/download.html"&gt;JBoss eclipse plugin&lt;/a&gt;. As a result I can make it deployable (accessible by a right-click) and it appear in the Eclipse &lt;b&gt;JBoss server view&lt;/b&gt;:&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_V_sYr0AnKIc/TAWj4cqwWPI/AAAAAAAACfM/r6A1JKbwZXw/s1600/JBoss-deploy.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="87" src="http://1.bp.blogspot.com/_V_sYr0AnKIc/TAWj4cqwWPI/AAAAAAAACfM/r6A1JKbwZXw/s400/JBoss-deploy.jpg" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
The REST API JSON Library resources are then accessible directly on a browser via &lt;span style="color: #38761d;"&gt;http://localhost:8080/jaxb-json/library/books/mapped&lt;/span&gt; or &lt;span style="color: #38761d;"&gt;http://localhost:8080/jaxb-json/library/books/badger&lt;/span&gt;.&lt;br /&gt;
&lt;br /&gt;
If you want to compress your response, RESTEasy provides &lt;a href="http://www.redhat.com/docs/en-US/JBoss_Enterprise_Application_Platform/5.0.1/html/RESTEasy/gzip.html"&gt;GZIP Compression/Decompression support&lt;/a&gt; using a very simple @GZIP annotation:&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;&lt;span style="color: #38761d;"&gt;   @GET
   @Path("books/mapped")
   @Produces("application/json")
   @GZIP
   public BookListing getBooksMapped()
   {
      return getListing();
   }&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;
Just import the following class:&lt;br /&gt;
&lt;div style="color: #38761d;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;pre&gt;&lt;span style="color: #38761d;"&gt;import org.jboss.resteasy.annotations.GZIP;&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;
Overall the adaptation from Jetty to JBoss was easy and the &lt;a href="http://www.redhat.com/docs/en-US/JBoss_Enterprise_Application_Platform/5.0.1/html/RESTEasy/index.html"&gt;documentation&lt;/a&gt; very clear.&lt;br /&gt;
&lt;br /&gt;
Additional discussions, recommendations and information can be found on the &lt;a href="http://community.jboss.org/wiki/ResteasyWIKI"&gt;JBoss Community&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
For an example of using REST architecture for Mobile Applications (HealthCare) see &lt;a href="http://fandry.blogspot.com/2011/02/rest-style-architecture-and-development.html"&gt;this post&lt;/a&gt;. &lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/743578218566083321-3472093302532316093?l=fandry.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/ITOfg-RhrHHupPGZC4xBzvjv39c/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/ITOfg-RhrHHupPGZC4xBzvjv39c/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/ITOfg-RhrHHupPGZC4xBzvjv39c/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/ITOfg-RhrHHupPGZC4xBzvjv39c/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/TechnologyHighlights/~4/tJxm__dMid0" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://fandry.blogspot.com/feeds/3472093302532316093/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=743578218566083321&amp;postID=3472093302532316093" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/743578218566083321/posts/default/3472093302532316093?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/743578218566083321/posts/default/3472093302532316093?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/TechnologyHighlights/~3/tJxm__dMid0/jaxb-json-rest-api-using-resteasy-on.html" title="JAXB-JSON Rest API using RESTEasy on JBoss EAP" /><author><name>fandry</name><uri>http://www.blogger.com/profile/01990790629557446302</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="24" height="32" src="http://bp3.blogger.com/_V_sYr0AnKIc/SEQpDbMcf7I/AAAAAAAABMs/qBizDBN3sXs/S220/fandry.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://1.bp.blogspot.com/_V_sYr0AnKIc/TAWRiQmkV6I/AAAAAAAACfE/zUxp4sCcmVs/s72-c/JAXB-JSON-eclipse.jpg" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://fandry.blogspot.com/2010/06/jaxb-json-rest-api-using-resteasy-on.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CU4MSH8_fyp7ImA9WxFWFEQ.&quot;"><id>tag:blogger.com,1999:blog-743578218566083321.post-7388405503719620086</id><published>2010-05-18T11:10:00.000-07:00</published><updated>2010-06-02T08:53:09.147-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-06-02T08:53:09.147-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="resteasy-jaxb-provider" /><category scheme="http://www.blogger.com/atom/ns#" term="POM" /><category scheme="http://www.blogger.com/atom/ns#" term="JBOSS" /><category scheme="http://www.blogger.com/atom/ns#" term="RESTEasy" /><category scheme="http://www.blogger.com/atom/ns#" term="REST" /><category scheme="http://www.blogger.com/atom/ns#" term="Maven 2" /><category scheme="http://www.blogger.com/atom/ns#" term="Twitter" /><category scheme="http://www.blogger.com/atom/ns#" term="resteasy-jaxrs" /><title>Enhanced POM for JBoss RESTEasy Twitter API Client Sample</title><content type="html">I recently looked at &lt;a href="http://jboss.org/resteasy"&gt;JBOSS RESTEasy&lt;/a&gt; as a way to create and &lt;a href="http://fandry.blogspot.com/2010/06/jaxb-json-rest-api-using-resteasy-on.html"&gt;test RESTful APIs&lt;/a&gt;. The platform looks very promising with a lot of praise from developers. Also the documentation seems very extensive and precise.&lt;br /&gt;
&lt;br /&gt;
I started by downloading &lt;a href="http://sourceforge.net/projects/resteasy/files/Resteasy%20JAX-RS/1.2.1.GA/resteasy-jaxrs-1.2.1.GA-src.zip/download"&gt;RESTEasy 1.2.1 GA&lt;/a&gt; and tried the sample code. I started with a java client to access existing &lt;a href="http://en.wikipedia.org/wiki/Restful"&gt;RESTful Web Services&lt;/a&gt; and APIs. Among the api-clients, there is a &lt;a href="http://twitter.com/"&gt;Twitter&lt;/a&gt; small client that works out-of-the box (located under &lt;span style="color: #38761d;"&gt;/RESTEASY_1_2_1_GA/examples/api-clients/src/main/java/org/jboss/resteasy/examples/twitter&lt;/span&gt;).&lt;br /&gt;
&lt;br /&gt;
However when I started to extract the code and wanted to create a &lt;a href="http://maven.apache.org/guides/getting-started/maven-in-five-minutes.html"&gt;Maven 2&lt;/a&gt; based stand-alone project, I encountered some issues related to JAR dependency conflicts, including the following error message also described &lt;a href="http://atmosphere-users-mailling-list.2493822.n2.nabble.com/PubSub-example-on-JBoss-td4471090.html"&gt;here&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;pre style="color: #38761d;"&gt;java.lang.NoClassDefFoundError: Could not initialize class com.sun.xml.bind.v2.model.impl.RuntimeBuiltinLeafInfoImpl 
&lt;/pre&gt;&lt;br /&gt;
&lt;b&gt;The project (eclipse) structure looks as below:&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;a href="http://4.bp.blogspot.com/_V_sYr0AnKIc/S_LXDTACOaI/AAAAAAAACe8/YDIr5oEoAIo/s1600/rest-api-client.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://4.bp.blogspot.com/_V_sYr0AnKIc/S_LXDTACOaI/AAAAAAAACe8/YDIr5oEoAIo/s320/rest-api-client.png" /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;I managed to fix these issues by modifying the POM file as follow:&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;pre style="color: #38761d;"&gt;&amp;lt;?xml version="1.0" encoding="UTF-8"?&amp;gt;
    &amp;lt;project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"&amp;gt;
    &amp;lt;modelVersion&amp;gt;4.0.0&amp;lt;/modelVersion&amp;gt;
 
    &amp;lt;groupId&amp;gt;org.jboss.resteasy.examples&amp;lt;/groupId&amp;gt;
 &amp;lt;artifactId&amp;gt;api-clients&amp;lt;/artifactId&amp;gt;
 &amp;lt;version&amp;gt;1.2.1.GA&amp;lt;/version&amp;gt;
  
  &amp;lt;dependencies&amp;gt;
    &amp;lt;!-- Resteasy Core --&amp;gt;
    &amp;lt;dependency&amp;gt;
      &amp;lt;groupId&amp;gt;org.jboss.resteasy&amp;lt;/groupId&amp;gt;
      &amp;lt;artifactId&amp;gt;resteasy-jaxrs&amp;lt;/artifactId&amp;gt;
    &amp;lt;/dependency&amp;gt;
    &amp;lt;!-- JAXB support --&amp;gt;
   &amp;lt;dependency&amp;gt;
      &amp;lt;groupId&amp;gt;org.jboss.resteasy&amp;lt;/groupId&amp;gt;
      &amp;lt;artifactId&amp;gt;resteasy-jaxb-provider&amp;lt;/artifactId&amp;gt;
   &amp;lt;/dependency&amp;gt;
    
  &amp;lt;/dependencies&amp;gt;
  &amp;lt;dependencyManagement&amp;gt;
        &amp;lt;dependencies&amp;gt;
            &amp;lt;dependency&amp;gt;
                &amp;lt;groupId&amp;gt;org.jboss.resteasy&amp;lt;/groupId&amp;gt;
                &amp;lt;artifactId&amp;gt;resteasy-bom&amp;lt;/artifactId&amp;gt;
                &amp;lt;version&amp;gt;1.2.1.GA&amp;lt;/version&amp;gt;
                &amp;lt;type&amp;gt;pom&amp;lt;/type&amp;gt;
                &amp;lt;scope&amp;gt;import&amp;lt;/scope&amp;gt;
            &amp;lt;/dependency&amp;gt;
        &amp;lt;/dependencies&amp;gt;
   &amp;lt;/dependencyManagement&amp;gt;
   
   &amp;lt;!-- Build Settings --&amp;gt; 
   &amp;lt;build&amp;gt;
    &amp;lt;plugins&amp;gt;  
      &amp;lt;plugin&amp;gt;
        &amp;lt;artifactId&amp;gt;maven-compiler-plugin&amp;lt;/artifactId&amp;gt;
        &amp;lt;configuration&amp;gt;
          &amp;lt;source&amp;gt;1.6&amp;lt;/source&amp;gt;
          &amp;lt;target&amp;gt;1.6&amp;lt;/target&amp;gt;
        &amp;lt;/configuration&amp;gt;
      &amp;lt;/plugin&amp;gt;
    &amp;lt;/plugins&amp;gt;
   &amp;lt;/build&amp;gt;
  
  &amp;lt;!-- Environment Settings --&amp;gt;
  &amp;lt;repositories&amp;gt;
    &amp;lt;repository&amp;gt;
      &amp;lt;id&amp;gt;jboss&amp;lt;/id&amp;gt;
      &amp;lt;name&amp;gt;jboss repo&amp;lt;/name&amp;gt;
      &amp;lt;url&amp;gt;http://repository.jboss.org/maven2&amp;lt;/url&amp;gt;
     &amp;lt;/repository&amp;gt;
   &amp;lt;/repositories&amp;gt;
  
&amp;lt;/project&amp;gt;
&lt;/pre&gt;&lt;br /&gt;
The most important piece, beside the cleaning of the POM file, was to include a pom that can be imported so the versions of the individual modules do not have to be specified (see &lt;a href="http://docs.jboss.org/resteasy/docs/1.2.GA/userguide/html/index.html"&gt;RESTEasy documentation&lt;/a&gt; - &lt;a href="http://docs.jboss.org/resteasy/docs/1.2.GA/userguide/html/Maven_and_RESTEasy.html"&gt;Chapter 43. Maven and RESTEasy&lt;/a&gt;).&lt;br /&gt;
&lt;br /&gt;
I also made sure to have correct dependencies for &lt;a href="http://repository.jboss.org/maven2/org/jboss/resteasy/resteasy-jaxrs/"&gt;resteasy-jaxrs&lt;/a&gt; and &lt;a href="http://repository.jboss.org/maven2/org/jboss/resteasy/resteasy-jaxb-provider/"&gt;resteasy-jaxb-provider&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;As a result, I was able to compile the whole project without any errors (&lt;span style="color: #38761d;"&gt;mvn clean compile&lt;/span&gt;) and run it to access the &lt;a href="http://dev.twitter.com/"&gt;Twitter REST API&lt;/a&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;pre style="color: #38761d;"&gt;mvn exec:java -Dexec.mainClass="org.jboss.resteasy.examples.twitter.TwitterClient" -Dexec.args="&amp;lt;userid&amp;gt; &amp;lt;password&amp;gt;"&lt;/pre&gt;(Replace last parameters by your twitter user and password).&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;The small client in question leverages JAX-RS annotations to read and write the &lt;a href="http://dev.twitter.com/"&gt;Twitter API&lt;/a&gt; resources:&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;pre style="color: #38761d;"&gt;package org.jboss.resteasy.examples.twitter;

import java.util.Date;
import java.util.List;

import javax.ws.rs.FormParam;
import javax.ws.rs.GET;
import javax.ws.rs.POST;
import javax.ws.rs.Path;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;

import org.apache.commons.httpclient.Credentials;
import org.apache.commons.httpclient.HttpClient;
import org.apache.commons.httpclient.UsernamePasswordCredentials;
import org.apache.commons.httpclient.auth.AuthScope;
import org.jboss.resteasy.client.ProxyFactory;
import org.jboss.resteasy.client.ClientExecutor;
import org.jboss.resteasy.client.core.executors.ApacheHttpClientExecutor;
import org.jboss.resteasy.plugins.providers.RegisterBuiltin;
import org.jboss.resteasy.spi.ResteasyProviderFactory;

public class TwitterClient
{
   static final String friendTimeline = "http://twitter.com/statuses/friends_timeline.xml";

   public static void main(String[] args) throws Exception
   {
      RegisterBuiltin.register(ResteasyProviderFactory.getInstance());
      final ClientExecutor clientExecutor = new ApacheHttpClientExecutor(createClient(args[0], args[1]));
      TwitterResource twitter = ProxyFactory.create(TwitterResource.class,
            "http://twitter.com", clientExecutor);
      System.out.println("===&amp;gt; first run");
      printStatuses(twitter.getFriendsTimelines());
      
      twitter
      .updateStatus("I programmatically tweeted with the RESTEasy Client at "
            + new Date());
      
      System.out.println("===&amp;gt; second run");
      printStatuses(twitter.getFriendsTimelines());
   }

   public static interface TwitterResource
   {
      @Path("/statuses/friends_timeline.xml")
      @GET
      Statuses getFriendsTimelines();

      @Path("/statuses/update.xml")
      @POST
      Status updateStatus(@FormParam("status") String status);
   }

   private static void printStatuses(Statuses statuses)
   {
      for (Status status : statuses.status)
         System.out.println(status);
   }

   private static HttpClient createClient(String userId, String password)
   {
      Credentials credentials = new UsernamePasswordCredentials(userId,
            password);
      HttpClient httpClient = new HttpClient();
      httpClient.getState().setCredentials(AuthScope.ANY, credentials);
      httpClient.getParams().setAuthenticationPreemptive(true);
      return httpClient;
   }

   @XmlRootElement
   public static class Statuses
   {
      public List&amp;lt;Status&amp;gt; status;
   }

   @XmlRootElement
   public static class Status
   {
      public String text;
      public User user;

      @XmlElement(name = "created_at")
      @XmlJavaTypeAdapter(value = DateAdapter.class)
      public Date created;

      public String toString()
      {
         return String.format("== %s: %s (%s)", user.name, text, created);
      }
   }

   public static class User
   {
      public String name;
   }

}

&lt;/pre&gt;&lt;br /&gt;
&lt;b&gt;The small DateAdapter class is a utility class for date formatting:&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;pre style="color: #38761d;"&gt;package org.jboss.resteasy.examples.twitter;

import java.util.Date;
import java.util.List;
package org.jboss.resteasy.examples.twitter;
 
import java.util.Date;
import javax.xml.bind.annotation.adapters.XmlAdapter;
import org.jboss.resteasy.util.DateUtil;

public class DateAdapter extends XmlAdapter&amp;lt;String, Date&amp;gt; {

   @Override
   public String marshal(Date date) throws Exception {
       return DateUtil.formatDate(date, "EEE MMM dd HH:mm:ss Z yyyy");
   }

   @Override
   public Date unmarshal(String string) throws Exception {
       try {
           return DateUtil.parseDate(string);
       } catch (IllegalArgumentException e) {
           System.err.println(String.format(
                   "Could not parse date string '%s'", string));
           return null;
       }
   }
}
&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/743578218566083321-7388405503719620086?l=fandry.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/_0sXXV7v39gcQlMjC0cugbh25L8/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/_0sXXV7v39gcQlMjC0cugbh25L8/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/_0sXXV7v39gcQlMjC0cugbh25L8/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/_0sXXV7v39gcQlMjC0cugbh25L8/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/TechnologyHighlights/~4/c2qi3hxrvLk" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://fandry.blogspot.com/feeds/7388405503719620086/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=743578218566083321&amp;postID=7388405503719620086" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/743578218566083321/posts/default/7388405503719620086?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/743578218566083321/posts/default/7388405503719620086?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/TechnologyHighlights/~3/c2qi3hxrvLk/enhanced-pom-for-jboss-resteasy-twitter.html" title="Enhanced POM for JBoss RESTEasy Twitter API Client Sample" /><author><name>fandry</name><uri>http://www.blogger.com/profile/01990790629557446302</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="24" height="32" src="http://bp3.blogger.com/_V_sYr0AnKIc/SEQpDbMcf7I/AAAAAAAABMs/qBizDBN3sXs/S220/fandry.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://4.bp.blogspot.com/_V_sYr0AnKIc/S_LXDTACOaI/AAAAAAAACe8/YDIr5oEoAIo/s72-c/rest-api-client.png" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://fandry.blogspot.com/2010/05/enhanced-pom-for-jboss-resteasy-twitter.html</feedburner:origLink></entry><entry gd:etag="W/&quot;AkIFR3g4fSp7ImA9WxFXFEg.&quot;"><id>tag:blogger.com,1999:blog-743578218566083321.post-7923761454713316996</id><published>2010-04-16T16:36:00.000-07:00</published><updated>2010-05-21T09:15:16.635-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-05-21T09:15:16.635-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="HITECH" /><category scheme="http://www.blogger.com/atom/ns#" term="Cloud" /><category scheme="http://www.blogger.com/atom/ns#" term="Web Service" /><category scheme="http://www.blogger.com/atom/ns#" term="SOA" /><category scheme="http://www.blogger.com/atom/ns#" term="Meaningful Use" /><category scheme="http://www.blogger.com/atom/ns#" term="REST" /><category scheme="http://www.blogger.com/atom/ns#" term="PaaS" /><category scheme="http://www.blogger.com/atom/ns#" term="EHR" /><category scheme="http://www.blogger.com/atom/ns#" term="ARRA" /><category scheme="http://www.blogger.com/atom/ns#" term="Software as a Service" /><category scheme="http://www.blogger.com/atom/ns#" term="IaaS" /><category scheme="http://www.blogger.com/atom/ns#" term="SOAP" /><category scheme="http://www.blogger.com/atom/ns#" term="ASP" /><category scheme="http://www.blogger.com/atom/ns#" term="SaaS" /><title>SOA and Health Care Meaningful Use requirements of the Recovery Act</title><content type="html">&lt;span style="font-family: Georgia,&amp;quot;Times New Roman&amp;quot;,serif; font-size: small;"&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style="font-family: Georgia,&amp;quot;Times New Roman&amp;quot;,serif;"&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_V_sYr0AnKIc/S8jz5VAxovI/AAAAAAAACe0/IRilgaLgHSQ/s1600/stethoscope.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;br /&gt;
&lt;/a&gt;&lt;/div&gt;&lt;span style="font-size: small;"&gt;The &lt;a href="http://edocket.access.gpo.gov/2010/pdf/E9-31216.pdf"&gt;Interim Final Rule&lt;/a&gt; of the &lt;span style="color: #38761d;"&gt;Health Information Technology for Economic and Clinical Health (HITECH) Act&lt;/span&gt; was passed by &lt;a href="http://www.hipaa.com/2009/02/president-obama-to-sign-arras-hitech-provisions-tuesday-february-17-2009-in-denver-co/"&gt;Congress in February of 2009&lt;/a&gt;.&amp;nbsp; Under this act, eligible providers will be given financial rewards if they demonstrate "&lt;a href="http://healthit.hhs.gov/portal/server.pt?open=512&amp;amp;objID=1325&amp;amp;parentname=CommunityPage&amp;amp;parentid=1&amp;amp;mode=2"&gt;meaningful use&lt;/a&gt;" of "certified" &lt;a href="http://en.wikipedia.org/wiki/Electronic_health_record"&gt;Electronic Health Record (EHR)&lt;/a&gt; technologies. &lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: Georgia,&amp;quot;Times New Roman&amp;quot;,serif;"&gt;&lt;span style="font-size: small;"&gt;&lt;br /&gt;
Therefore there is a big incentive for health care vendors to offer solutions that meet the criteria described in the law.&amp;nbsp; More precisely, the associated regulation provided by the Department of Health and Human Services describes the set of standards,&amp;nbsp; implementation, specifications and certification for Electronic Health Record (EHR) technology.&lt;br /&gt;
&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_V_sYr0AnKIc/S8jz5VAxovI/AAAAAAAACe0/IRilgaLgHSQ/s1600/stethoscope.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://1.bp.blogspot.com/_V_sYr0AnKIc/S8jz5VAxovI/AAAAAAAACe0/IRilgaLgHSQ/s320/stethoscope.jpg" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;span style="font-size: small;"&gt;As a Software Architect, I was curious to see whether &lt;a href="http://en.wikipedia.org/wiki/Service-oriented_architecture"&gt;Service Oriented Architecture&lt;/a&gt; (SOA) or Web Services in general were mentioned in these documents.&lt;br /&gt;
&lt;br /&gt;
The definition of an EHR Module includes an open list of services such as electronic health information exchange, clinical decision support, public health and health authorities information queries, quality measure reporting etc.&lt;br /&gt;
&lt;br /&gt;
In the transport standards section, both &lt;a href="http://www.w3.org/TR/soap/"&gt;SOAP&lt;/a&gt; and &lt;a href="http://en.wikipedia.org/wiki/REST"&gt;RESTful&lt;/a&gt; Web services protocols are described. However Service Oriented Architecture (SOA) is never explicitly described or cited. No reference how these services might be discovered and orchestrated in a "meaningful way". I would assume that the reason is that the law makers and regulators wanted to be as vague as possible on the underlying technologies for an EHR and its components. &lt;br /&gt;
&lt;br /&gt;
The technical aspect of "&lt;a href="http://healthit.hhs.gov/portal/server.pt?open=512&amp;amp;objID=1325&amp;amp;parentname=CommunityPage&amp;amp;parentid=1&amp;amp;mode=2"&gt;meaningful use&lt;/a&gt;" is specified more precisely when associated with interoperability, functionality, utility, data confidentiality and integrity of the data, security of the health information system in general. &lt;br /&gt;
&lt;br /&gt;
These characteristics are not necessarily specific to SOA, but to any good health care software and solution design.&lt;br /&gt;
&lt;br /&gt;
Still, the following paragraph seems to describe a solution that could be best implemented using a Service Oriented Architecture: "&lt;span style="color: #38761d;"&gt;As another example, a subscription to an application service provider (ASP) for electronic prescribing could be an EHR Module&lt;/span&gt;"&amp;nbsp; where &lt;a href="http://en.wikipedia.org/wiki/Software_as_a_service"&gt;software is offered as a service&lt;/a&gt; (SaaS).&amp;nbsp; This looks more like the description of an emerging SOA rather than a full grid enabled SOA.&lt;br /&gt;
&lt;br /&gt;
It will be up to the solutions providers to come up with relevant products and tools to maximize the return on investment (ROI) of the tax payer's money and the professionals and organizations eligible for &lt;a href="http://www.hipaa.com/2009/02/president-obama-to-sign-arras-hitech-provisions-tuesday-february-17-2009-in-denver-co/"&gt;ARRA/HITECH&lt;/a&gt;.&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: Georgia,&amp;quot;Times New Roman&amp;quot;,serif;"&gt;&lt;span style="font-size: small;"&gt;&lt;br /&gt;
SOA will definitively be part of the mix since it gives the ability create, offer and maintain large numbers of complex &lt;a href="http://en.wikipedia.org/wiki/Electronic_health_record"&gt;EHR&lt;/a&gt; Software solutions (&lt;a href="http://en.wikipedia.org/wiki/Software_as_a_service"&gt;SaaS&lt;/a&gt;) that have a high level of modularization and interoperability.&lt;br /&gt;
&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: Georgia,&amp;quot;Times New Roman&amp;quot;,serif;"&gt;&lt;span style="font-size: small;"&gt;Further developments toward a complete SOA stack such as offering a &lt;a href="http://en.wikipedia.org/wiki/Platform_as_a_service"&gt;Platform as a Service (PaaS)&lt;/a&gt; and even the underlying &lt;a href="http://fandry.blogspot.com/2010/03/cloud-computing-and-health-care.html"&gt;Infrastructure as a Service (IaaS) in the cloud&lt;/a&gt; will face more resistance in a domain known for a lot of legacy systems and concerns about privacy and security.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style="font-size: small;"&gt;The &lt;a href="http://www.omg.org/"&gt;Object Management Group (OMG)&lt;/a&gt; is organizing a &lt;a href="http://www.omg.org/news/meetings/HC-WS/index.htm"&gt;conference this summer&lt;/a&gt; on the topic of&amp;nbsp; &lt;/span&gt;&lt;span style="color: #38761d;"&gt;"SOA in                                                     Healthcare:  Improving Health                                                     through Technology:  The role                                                     of SOA on the path  to                                                     meaningful use"&lt;/span&gt;. It will be interesting to see what                                                    healthcare  providers,                                                     payers, public  health                                                     organizations and solution providers                                                     from both the public  and                                                     private sector will have to say on this topic. &lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/743578218566083321-7923761454713316996?l=fandry.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/F2HibrTCY_4MhzImHLqVxi_tWS0/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/F2HibrTCY_4MhzImHLqVxi_tWS0/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/F2HibrTCY_4MhzImHLqVxi_tWS0/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/F2HibrTCY_4MhzImHLqVxi_tWS0/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/TechnologyHighlights/~4/Eagpy_RxnUU" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://fandry.blogspot.com/feeds/7923761454713316996/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=743578218566083321&amp;postID=7923761454713316996" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/743578218566083321/posts/default/7923761454713316996?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/743578218566083321/posts/default/7923761454713316996?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/TechnologyHighlights/~3/Eagpy_RxnUU/soa-and-health-care-meaningful-use.html" title="SOA and Health Care Meaningful Use requirements of the Recovery Act" /><author><name>fandry</name><uri>http://www.blogger.com/profile/01990790629557446302</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="24" height="32" src="http://bp3.blogger.com/_V_sYr0AnKIc/SEQpDbMcf7I/AAAAAAAABMs/qBizDBN3sXs/S220/fandry.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://1.bp.blogspot.com/_V_sYr0AnKIc/S8jz5VAxovI/AAAAAAAACe0/IRilgaLgHSQ/s72-c/stethoscope.jpg" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://fandry.blogspot.com/2010/04/soa-and-health-care-meaningful-use.html</feedburner:origLink></entry><entry gd:etag="W/&quot;Dk8NSHgyfyp7ImA9WxFTEEo.&quot;"><id>tag:blogger.com,1999:blog-743578218566083321.post-8459494311338405489</id><published>2010-03-31T12:25:00.000-07:00</published><updated>2010-03-31T15:34:59.697-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-03-31T15:34:59.697-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="S3" /><category scheme="http://www.blogger.com/atom/ns#" term="CCR" /><category scheme="http://www.blogger.com/atom/ns#" term="DICOM" /><category scheme="http://www.blogger.com/atom/ns#" term="EHR" /><category scheme="http://www.blogger.com/atom/ns#" term="PHR" /><category scheme="http://www.blogger.com/atom/ns#" term="PHI" /><category scheme="http://www.blogger.com/atom/ns#" term="EC2" /><category scheme="http://www.blogger.com/atom/ns#" term="Healthcare" /><category scheme="http://www.blogger.com/atom/ns#" term="MedCommons" /><category scheme="http://www.blogger.com/atom/ns#" term="SSL" /><category scheme="http://www.blogger.com/atom/ns#" term="TC3" /><category scheme="http://www.blogger.com/atom/ns#" term="HIPAA" /><category scheme="http://www.blogger.com/atom/ns#" term="AWS" /><category scheme="http://www.blogger.com/atom/ns#" term="Cloud Computing" /><title>Cloud Computing and Health Care Applications: a change in opinions?</title><content type="html">&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/_V_sYr0AnKIc/S7Og8miqOzI/AAAAAAAACes/vgkSQDmNuQI/s1600/cloud.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://2.bp.blogspot.com/_V_sYr0AnKIc/S7Og8miqOzI/AAAAAAAACes/vgkSQDmNuQI/s320/cloud.jpg" /&gt;&lt;/a&gt;&lt;/div&gt;I have designed and implemented Health Care Applications for more than 3 years and I have experienced a dramatic change of opinions toward the &lt;a href="http://www.thehealthcareblog.com/the_health_care_blog/2009/08/is-cloud-computing-right-for-health-it.html"&gt;use of Cloud Computing for Health IT&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
Several years ago, the idea of having on demand resources offered as a service, used to process or store Health Care related data, was out of the question.&amp;nbsp; The main concerns were the security, privacy and confidentiality of the data; the reliability and ease of use of the underlying systems and platforms.&lt;br /&gt;
&lt;br /&gt;
Health Care solution providers did not hesitate to require a minimum of tens of thousands of dollars of hardware to deploy a minimum configuration for a multi-tier &lt;a href="http://en.wikipedia.org/wiki/Electronic_health_record"&gt;EHR&lt;/a&gt; or &lt;a href="http://en.wikipedia.org/wiki/Personal_health_record"&gt;PHR&lt;/a&gt; web based application. In fact, some players were even barely starting to virtualize their platforms.&lt;br /&gt;
&lt;br /&gt;
One of the requirement to comply with the &lt;a href="http://www.hipaa.org/"&gt;Health Insurance Portability and Accountability Act of 1996 (HIPAA)&lt;/a&gt; regulation is that the transmission of patients protected health information (PHI) over open networks must be encrypted.&lt;br /&gt;
&lt;br /&gt;
These issues have been recently addressed and companies offering virtual infrastructure as a service such as &lt;a href="http://awsmedia.s3.amazonaws.com/AWS_HIPAA_Whitepaper_Final.pdf"&gt;Amazon EC2&lt;/a&gt; offer 256 bit AES encryption algorithms for files containing PHI, as well as token or key-based authentication and sophisticated firewall configurations for their virtual servers. Encryption is also available when storing the data on Amazon S3. The access from the internet or EC2 to Amazon S3 is done via encrypted &lt;a href="http://en.wikipedia.org/wiki/Transport_Layer_Security"&gt;SSL endpoints&lt;/a&gt; which ensures that PHI information stays protected. AWS indeed describes several Cloud based Healthcare related applications in their case study, including &lt;a href="http://aws.amazon.com/solutions/case-studies/medcommons/"&gt;MedCommons&lt;/a&gt; (a health records services provider that give the ability to the end users to store among other medical information &lt;span class="caps"&gt;&lt;a href="http://en.wikipedia.org/wiki/Continuity_of_Care_Record"&gt;CCR&lt;/a&gt; and &lt;a href="http://en.wikipedia.org/wiki/DICOM"&gt;DICOM&lt;/a&gt;&lt;/span&gt; documents).&lt;br /&gt;
&lt;br /&gt;
Cloud infrastructure providers such as &lt;a href="http://aws.amazon.com/"&gt;Amazon Web Services (AWS)&lt;/a&gt; ensure that their administrators or third-party partners cannot have access to the underlying PHI data. Strong security policies, access consent processes, as well as monitoring and audit capabilities are available to reduce dramatically the risks of&amp;nbsp; unauthorized access. In addition to this, these providers offer highly available solutions for automated back-ups and disaster recovery which make them more attractive that traditional solutions. Some providers also ensure that the data in question stay within the borders of specific regions, states or countries to comply with regulations in place.&lt;br /&gt;
&lt;br /&gt;
In fact it is very interesting to see these days Health Care becoming a show case of the benefits of Cloud computing. Last month, at the &lt;a href="http://www.sfbayacm.org/?p=1394"&gt;San Francisco Bay Area ACM chapter presentation on cloud computing&lt;/a&gt;, I was surprised to see that the first Cloud Application example mentioned was &lt;a href="http://aws.amazon.com/solutions/case-studies/tc3-health/"&gt;TC3&lt;/a&gt;. The numbers were indeed very convincing: When facing with&amp;nbsp; sudden increase of insurance claims processing (from 1 to 100 millions per day in a very short time), TC3 had the option of a traditional solution consisting of $750K of new hardware and $30K of maintenance and hosting per month, or use an Amazon Web Service Cloud solution for $600 per month. The decision was easy I suppose!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/743578218566083321-8459494311338405489?l=fandry.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/r04V_OgzlIz5O9SEFdndkMzqpq4/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/r04V_OgzlIz5O9SEFdndkMzqpq4/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/r04V_OgzlIz5O9SEFdndkMzqpq4/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/r04V_OgzlIz5O9SEFdndkMzqpq4/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/TechnologyHighlights/~4/dm2bmBVTDbY" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://fandry.blogspot.com/feeds/8459494311338405489/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=743578218566083321&amp;postID=8459494311338405489" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/743578218566083321/posts/default/8459494311338405489?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/743578218566083321/posts/default/8459494311338405489?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/TechnologyHighlights/~3/dm2bmBVTDbY/cloud-computing-and-health-care.html" title="Cloud Computing and Health Care Applications: a change in opinions?" /><author><name>fandry</name><uri>http://www.blogger.com/profile/01990790629557446302</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="24" height="32" src="http://bp3.blogger.com/_V_sYr0AnKIc/SEQpDbMcf7I/AAAAAAAABMs/qBizDBN3sXs/S220/fandry.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://2.bp.blogspot.com/_V_sYr0AnKIc/S7Og8miqOzI/AAAAAAAACes/vgkSQDmNuQI/s72-c/cloud.jpg" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://fandry.blogspot.com/2010/03/cloud-computing-and-health-care.html</feedburner:origLink></entry><entry gd:etag="W/&quot;C0MERnYyeSp7ImA9WxBUGEw.&quot;"><id>tag:blogger.com,1999:blog-743578218566083321.post-5933042403195083809</id><published>2010-02-26T08:49:00.000-08:00</published><updated>2010-03-05T09:50:07.891-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-03-05T09:50:07.891-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Biosciences" /><category scheme="http://www.blogger.com/atom/ns#" term="MapReduce" /><category scheme="http://www.blogger.com/atom/ns#" term="healthcare portal benefits services components" /><category scheme="http://www.blogger.com/atom/ns#" term="DBMS" /><category scheme="http://www.blogger.com/atom/ns#" term="Hadoop" /><title>MapReduce an opportunity for Health and BioSciences Applications?</title><content type="html">&lt;div style="text-align: justify;"&gt;&lt;span style="font-weight: bold;"&gt;HealthCare&lt;/span&gt; and &lt;span style="font-weight: bold;"&gt;BioScience&lt;/span&gt; software products and solutions have embraced Database Management System (DBMS) for their back-end storage and processing for years like most other domains where performance, scalability, security, extensibility, auditing capabilities and maintenance are critical.&lt;br /&gt;
&lt;br /&gt;
In the past few years with alternative or complement technologies such as &lt;a href="http://labs.google.com/papers/mapreduce.html"&gt;MapReduce&lt;/a&gt; and &lt;a href="http://hadoop.apache.org/hive/"&gt;Hive&lt;/a&gt; originally created from the need of extremely high volume web applications such as Google, Facebook or LinkedIn. A lot of people, especially engineers are now wondering if these technologies could be used in HealthCare and BioSciences.&lt;br /&gt;
&lt;br /&gt;
More and more job openings outside the Social Networks or &lt;a href="http://en.wikipedia.org/wiki/Search_engine_optimization"&gt;SEO&lt;/a&gt; sphere now mention MapReduce and &lt;a href="http://hadoop.apache.org/"&gt;Hadoop&lt;/a&gt; in their required or "nice to have" skills, including HealthCare  and BioScience companies.  In fact, recently at a talk from &lt;a href="http://fandry.blogspot.com/2010/01/cloudera-facebook-on-hadoop-and-hive.html"&gt;Bay Area Chapter of the ACM on Hadoop and Hive&lt;/a&gt;, even though the talk was quite technical, there were few venture capitalists in the crowd who were checking if this the topic was only hype or would potentially bring big ROI. Healthcare and biotechnologies were definitively in their mind.&lt;br /&gt;
&lt;br /&gt;
Why then would the &lt;span style="font-weight: bold;"&gt;MapReduce&lt;/span&gt; paradigm be a good candidate to provide the "n&lt;span style="font-style: italic;"&gt;ext quantum leap&lt;/span&gt;" for &lt;span style="font-weight: bold;"&gt;HealthCare&lt;/span&gt; and &lt;span style="font-weight: bold;"&gt;BioSciences&lt;/span&gt;?&lt;br /&gt;
&lt;br /&gt;
&lt;a href="http://2.bp.blogspot.com/_V_sYr0AnKIc/S4gS8aaihfI/AAAAAAAACcQ/mYHI2hLaK0U/s1600-h/dna2.jpg" onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}"&gt;&lt;img alt="" border="0" id="BLOGGER_PHOTO_ID_5442620978769331698" src="http://2.bp.blogspot.com/_V_sYr0AnKIc/S4gS8aaihfI/AAAAAAAACcQ/mYHI2hLaK0U/s320/dna2.jpg" style="cursor: pointer; float: left; height: 240px; margin: 0pt 10px 10px 0pt; width: 320px;" /&gt;&lt;/a&gt;In &lt;span style="font-weight: bold;"&gt;HealthCare&lt;/span&gt;, as more and more users, patients and professionals upload data to applications such as &lt;a href="http://en.wikipedia.org/wiki/Personal_health_record"&gt;PHRs&lt;/a&gt; and &lt;a href="http://en.wikipedia.org/wiki/Electronic_medical_record"&gt;EMRs&lt;/a&gt;, there is a need to parse, clean and reconcile extremely large amount of data that might be initially stored in log files. Medical observations from patients with chronic diseases such as blood pressure or blood glucose might be good candidates for this, especially when they are uploaded automatically from medical devices. Also the aggregation of data coming from potentially large numbers of  sources makes it more suitable to a Map and Reduce processing paradigm than DBMS based data mining tasks.&lt;br /&gt;
&lt;br /&gt;
HealthCare decision makers might be hesitant to use these new technologies as long as they  have some concerns related to security, confidentiality and certification to standards such as &lt;a href="http://www.hl7.org/"&gt;HL7&lt;/a&gt; (see &lt;a href="http://www.cchit.org/"&gt;CCIT&lt;/a&gt; and &lt;a href="http://www.hitsp.org/"&gt;HITSP&lt;/a&gt;). However with the overall reforms in progress in HealthCare it will be interesting to see if MapReduce will be part of the technical package for the benefits of not only the patient and care givers, but all healthcare actors including payers and various service providers.&lt;br /&gt;
&lt;br /&gt;
&lt;span style="font-weight: bold;"&gt;BioSciences&lt;/span&gt; (&lt;a href="http://en.wikipedia.org/wiki/Drug_discovery"&gt;drug discovery&lt;/a&gt;, &lt;a href="http://en.wikipedia.org/wiki/Metagenomics"&gt;meta-genomics&lt;/a&gt;, &lt;a href="http://en.wikipedia.org/wiki/Bioassay"&gt;bioassay activities&lt;/a&gt; ...) is also a good candidate for MapReduce. In addition to the fact that BioScience applications deal also with large amount of data (e.g. biological sequences such as &lt;a href="http://en.wikipedia.org/wiki/DNA"&gt;DNA&lt;/a&gt;, &lt;a href="http://en.wikipedia.org/wiki/RNA"&gt;RNA&lt;/a&gt;, proteins) a lot of the data is &lt;span style="font-weight: bold;"&gt;semi-structured data&lt;/span&gt; that is semantically rich and most likely best represented as a &lt;a href="http://en.wikipedia.org/wiki/Resource_Description_Framework"&gt;RDF&lt;/a&gt; data model than a Database set of tables (e.g. see "&lt;a href="http://www.springerlink.com/content/l805560670136163/"&gt;Storage and Retrieval of Large RDF Graph Using Hadoop and MapReduce&lt;/a&gt;") . Even though database has made progress to store and process XML, MapReduce is more suitable to very fast processing and aggregation of large amount of key-value elements.&lt;br /&gt;
&lt;br /&gt;
Another element is &lt;span style="font-weight: bold;"&gt;price and return on investment&lt;/span&gt; (ROI), especially for startups is the fact that the implementation of MapReduce over a cloud based infrastructure using an open source framework such as &lt;a href="http://hadoop.apache.org/"&gt;Hadoop&lt;/a&gt; and &lt;a href="http://hadoop.apache.org/hive/"&gt;Hive&lt;/a&gt; can be an attractive economic proposition for a CTO.&lt;br /&gt;
&lt;br /&gt;
Also both fields can also take advantage of other applications of MapReduce in areas other than hard-core technology but related to &lt;a href="http://en.wikipedia.org/wiki/Brand_management"&gt;brand management&lt;/a&gt;, &lt;a href="http://en.wikipedia.org/wiki/Supply_chain_optimization"&gt;sales and supply chain optimizations&lt;/a&gt; used with success in other domains.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/743578218566083321-5933042403195083809?l=fandry.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/c1nkyoJh4aCNX8SrY82W0lJxcPw/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/c1nkyoJh4aCNX8SrY82W0lJxcPw/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/c1nkyoJh4aCNX8SrY82W0lJxcPw/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/c1nkyoJh4aCNX8SrY82W0lJxcPw/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/TechnologyHighlights/~4/4KpFTccUpY4" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://fandry.blogspot.com/feeds/5933042403195083809/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=743578218566083321&amp;postID=5933042403195083809" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/743578218566083321/posts/default/5933042403195083809?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/743578218566083321/posts/default/5933042403195083809?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/TechnologyHighlights/~3/4KpFTccUpY4/mapreduce-opportunity-for-health-and.html" title="MapReduce an opportunity for Health and BioSciences Applications?" /><author><name>fandry</name><uri>http://www.blogger.com/profile/01990790629557446302</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="24" height="32" src="http://bp3.blogger.com/_V_sYr0AnKIc/SEQpDbMcf7I/AAAAAAAABMs/qBizDBN3sXs/S220/fandry.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://2.bp.blogspot.com/_V_sYr0AnKIc/S4gS8aaihfI/AAAAAAAACcQ/mYHI2hLaK0U/s72-c/dna2.jpg" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://fandry.blogspot.com/2010/02/mapreduce-opportunity-for-health-and.html</feedburner:origLink></entry></feed>

