<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
    <channel>
        <title type="text" xml:lang="en">Charles Moulliard's blog</title>
        <atom:link type="application/atom+xml" href="https://cmoulliard.github.io/feed.xml" rel="self"/>
        <generator>Jekyll v3.9.3</generator>
        <link rel="self" type="application/atom+xml" href="https://cmoulliard.github.io/feed.xml"/>
        <link rel="alternate" type="text/html" href="https://cmoulliard.github.io"/>
        <pubDate>Thu, 14 Dec 2023 14:29:01 +0100</pubDate>
        <lastBuildDate>Thu, 14 Dec 2023 14:29:01 +0100</lastBuildDate>
        <language>en-US</language>
        <author>
            <name>Charles Moulliard</name>
            <uri>https://cmoulliard.github.io/</uri>
            <email>ch007m@gmail.com</email>
        </author>
        
          
        <item>
            <title>Security Enforcement of the Microservices</title>
            <description>&lt;h2 id=&quot;introduction&quot;&gt;Introduction&lt;/h2&gt;

&lt;p&gt;Securing an application is a common task that many developers will embrace during the Architecture design and coding phase of a project. Although, the securing of a Web Service, RESTfull endpoint could be achieved easily
when the modules of a project are deployed within the same Java container, when they rely on the same Security Spec (JAAS, WS-Security, WS-Trust, JAX-RS) or Security Framework (Apache Shiro, Spring Security, …) the 
design could become really complex when we have to build a distributed application.&lt;/p&gt;

&lt;p&gt;As the current trend is to split a Monolithic application into a collection of Microservices exposing the service as a RESTfull endpoint, Web Service, interconnected to each offer, our security officer will be very embarrassed
to guide and provide recommendations for the actors of such a project.&lt;/p&gt;

&lt;p&gt;The difficulty is not related to the Microservice Architecture itself but because:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;The number of Services to be managed within such project is multiplied by a factor of 10x, 100x,&lt;/li&gt;
  &lt;li&gt;Each service, which is part of a logical/business domain, could be managed according to different Security Governance Rules (Basic Auth, Digest &amp;amp; Encryption),&lt;/li&gt;
  &lt;li&gt;The information transported between the services belong to a different confidentiality level (public, private, …)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For all these reasons, the security and the governance will become even more critical for the success of a Microservice Architecture. 
From a technical point of view, we will be faced to the following concerns : as the modules will be deployed within different type of Java Container (Apache Tomcat, JBoss WildFly, Apache Karaf, JBoss Swarm, Vert.x, …)
, that each container addresses a specific need (Non Blocking, high throughput of connections, http/2 protocol, …) and that they doesn’t necessarily support/follow the JavaEE spec or JAXRS/JAXWS standards,
different security patterns or frameworks will be required to resolve our security challenge.&lt;/p&gt;

&lt;p&gt;To help the architects and developers to adopt the security approach which best fits the company requirements, practices, Microservices Architecture and their skills, we will investigate within this blog some patterns that you could
easily implement within your project in order to secure your Microservices :&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;Interceptor&lt;/li&gt;
  &lt;li&gt;Web Container&lt;/li&gt;
  &lt;li&gt;Api Gateway&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;We will now present, detail and mitigate the approaches in order to measure the consequences of the adoption of the different patterns.&lt;/p&gt;

&lt;p&gt;The use case that we will discuss is very simple and consists to secure a RESTfull Service which has been created using the Java Integration Framework - Apache Camel.
As we can see within the following picture, the REST Service or Endpoint is exposed by a local HTTP Web container created using Eclipse Jetty.
A client which is our HTTP Agent will issue HTTP requests using a HTTP method (GET, POST, DELETE, …) and a URL to access the Web resources of the service (“/rest/myservice/”).&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://cmoulliard.github.io/images/security/rest-1.png&quot; alt=&quot;interceptor&quot; /&gt;&lt;/p&gt;

&lt;h2 id=&quot;interceptor&quot;&gt;Interceptor&lt;/h2&gt;

&lt;p&gt;The goal of the interceptor is to include within the flow of the code a class responsible to collect/handle the information passed through the HTTP Request like the Authorization Header, the http URI, URL
and the credentials provided by the HTTP agent. The principe is presented within the next picture&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://cmoulliard.github.io/images/security/interceptor.png&quot; alt=&quot;camel-intercept&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Within the flow describing how a request or an exchange is processed, an interceptor is added before or after the call to the processor responsible to handle the logic declared within the application. This 
interceptor wraps your code and will act as a security guardian. This pattern is supported by the Apache Camel Framework using a &lt;a href=&quot;https://camel.apache.org/maven/camel-2.15.0/camel-core/apidocs/org/apache/camel/spi/Policy.html&quot;&gt;Policy&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;The interceptor can use the existing Security Frameworks/Technologies to handle the authentication/authorization process like JAAS, Apache Shiro, Spring Security, Apache WS4J, …) but you can also create your own Interceptor and plug it within the 
flow as we will demonstrate hereafter.&lt;/p&gt;

&lt;p&gt;An Apache Camel interceptor will look the &lt;strong&gt;SimpleAuthenticationPolicy&lt;/strong&gt; class where the wrap method will be called when the framework will consume an Exchange which corresponds to a HTTP Request received by the Jetty Server acting as a consumer.&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-java&quot; data-lang=&quot;java&quot;&gt;&lt;span class=&quot;kd&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;SimpleAuthenticationPolicy&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;implements&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;AuthorizationPolicy&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;

    &lt;span class=&quot;nd&quot;&gt;@Override&lt;/span&gt;
    &lt;span class=&quot;kd&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;Processor&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;wrap&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nc&quot;&gt;RouteContext&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;routeContext&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;Processor&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;processor&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
        &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;SimpleAuthenticationProcessor&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;processor&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;
    &lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;The &lt;strong&gt;SimpleAuthenticationProcessor&lt;/strong&gt; class contains the logic needed to access the content of the Exchange when the processor will be called and of course, it will call the class/method responsible 
to authenticate ot authorize the incoming request &lt;strong&gt;applySecurityPolicy&lt;/strong&gt;&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-java&quot; data-lang=&quot;java&quot;&gt;&lt;span class=&quot;nd&quot;&gt;@Override&lt;/span&gt;
&lt;span class=&quot;kd&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;boolean&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;process&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nc&quot;&gt;Exchange&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;exchange&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;AsyncCallback&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;callback&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;try&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;applySecurityPolicy&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;exchange&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;
    &lt;span class=&quot;o&quot;&gt;}&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;catch&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nc&quot;&gt;Exception&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;e&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
        &lt;span class=&quot;c1&quot;&gt;// exception occurred so break out&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;exchange&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;setException&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;e&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;callback&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;done&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kc&quot;&gt;true&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;
        &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;kc&quot;&gt;true&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;super&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;process&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;exchange&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;callback&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;
&lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;The last thing to be done is to register the interceptor within the Apache Camel Route definition in order to secure your Microservice.&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-java&quot; data-lang=&quot;java&quot;&gt;  &lt;span class=&quot;nc&quot;&gt;SimpleAuthenticationPolicy&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;auth&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;SimpleAuthenticationPolicy&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;();&lt;/span&gt;
  
  &lt;span class=&quot;c1&quot;&gt;// Definition of the RESTFull Endpoint using the REST DSL syntax&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;restConfiguration&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;()&lt;/span&gt;
      &lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;component&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;jetty&quot;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;).&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;scheme&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;http&quot;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;).&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;host&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;0.0.0.0&quot;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;).&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;port&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;9090&quot;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;
      &lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;bindingMode&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nc&quot;&gt;RestBindingMode&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;json&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;

      &lt;span class=&quot;c1&quot;&gt;// Service exposed at the path &quot;/customerservice/customer/{id}&lt;/span&gt;
      &lt;span class=&quot;n&quot;&gt;rest&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;/customerservice&quot;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;).&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;produces&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;json&quot;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;
         &lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;get&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;/customer/{id}&quot;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;
         &lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;to&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;direct:hello&quot;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;

      &lt;span class=&quot;n&quot;&gt;from&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;direct:hello&quot;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;
         &lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;policy&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;auth&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;c1&quot;&gt;// Policy registered to authenticate the HTTP Request&lt;/span&gt;
         &lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;beanRef&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;customerService&quot;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;getCustomerDetail&quot;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;As you can see this approach is very flexible as you can plug whatever technology you prefer to use to secure the access to the REST service exposed as Endpoint by the Jetty Server.&lt;/p&gt;

&lt;h2 id=&quot;web-container&quot;&gt;Web Container&lt;/h2&gt;

&lt;p&gt;We can also enrich the architecture and use the features offered by the Jetty/Netty HTTP Server in order to&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;Enable the SSL/TLS Security layer to encrypt the data exchanged between the HTTP Agent and the Server,&lt;/li&gt;
  &lt;li&gt;Setup mutual TLS,&lt;/li&gt;
  &lt;li&gt;Restrict the access to the Web Resources using a &lt;strong&gt;SecurityConstraint&lt;/strong&gt; associated with a user’s role.&lt;/li&gt;
&lt;/ul&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-java&quot; data-lang=&quot;java&quot;&gt;&lt;span class=&quot;c1&quot;&gt;// Describe the Authentication Constraint to be applied (BASIC, DIGEST, NEGOTIATE, ...)&lt;/span&gt;
&lt;span class=&quot;nc&quot;&gt;Constraint&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;constraint&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;Constraint&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nc&quot;&gt;Constraint&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;__BASIC_AUTH&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&quot;user&quot;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;constraint&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;setAuthenticate&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kc&quot;&gt;true&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;

&lt;span class=&quot;c1&quot;&gt;// Map the Auth Constraint with a Path&lt;/span&gt;
&lt;span class=&quot;nc&quot;&gt;ConstraintMapping&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;cm&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;ConstraintMapping&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;();&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;cm&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;setPathSpec&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;/*&quot;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;cm&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;setConstraint&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;constraint&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;

&lt;span class=&quot;nc&quot;&gt;HashLoginService&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;loginService&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;HashLoginService&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;MyRealm&quot;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt;
        &lt;span class=&quot;s&quot;&gt;&quot;myrealm.props&quot;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;

&lt;span class=&quot;nc&quot;&gt;ConstraintSecurityHandler&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;sh&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;ConstraintSecurityHandler&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;();&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;sh&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;setAuthenticator&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;BasicAuthenticator&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;());&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;sh&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;setConstraintMappings&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;cm&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;sh&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;setLoginService&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;loginService&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;ul&gt;
  &lt;li&gt;Authenticate the user using some JAAS Plugin (HashLogin with Property file, LDAP, JDBC)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;As you can see within the next diagram, the security architecture proposed is more robust as managed by two distinct levels if you combine the Interceptor pattern with the HTTP Security model :&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;The Web HTTP Container will be responsible to Authenticate the user and restrict the access to the Web Resources,&lt;/li&gt;
  &lt;li&gt;The Connection between the HTTP agent and the Server is more secured as the data will be encrypted and the confidentiality of the data exchanged will be guarantee&lt;/li&gt;
  &lt;li&gt;The interceptor will become responsible to authorize the access to the Service&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;img src=&quot;https://cmoulliard.github.io/images/security/rest-2.png&quot; alt=&quot;interceptor-jetty&quot; /&gt;&lt;/p&gt;

&lt;h2 id=&quot;time-to-mitigate-the-approach&quot;&gt;Time to mitigate the approach&lt;/h2&gt;

&lt;p&gt;It is time now to review the approach from a Security Officer point of view and to mitigate the approach. He/She will be very please about the solution
as :&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;It offers a great level of flexibility to support the Java Standards (JAAS, WS-Security, …) or enacted by the company,&lt;/li&gt;
  &lt;li&gt;The applications developed will be independent of any third party tool or vendor to support the security,&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;But it will certainly complain that the approach is really intrusive, will require to develop some home security code to support the interceptor pattern.
The management of the collection of the Microservices will be very difficult as we will suffer from a lack of governance &amp;amp; centralized capability as proposed
by an Api Management platform to define in one place the security rules applied to the different services, the services secured, …&lt;/p&gt;

&lt;table class=&quot;pure-table pure-table-bordered&quot;&gt;
    &lt;thead&gt;
        &lt;tr&gt;
            &lt;th&gt;Pros&lt;/th&gt;
            &lt;th&gt;Cons&lt;/th&gt;
        &lt;/tr&gt;
    &lt;/thead&gt;
    &lt;tbody&gt;
        &lt;tr&gt;
            &lt;td&gt;No product lock&lt;/td&gt;
            &lt;td&gt;Intrusive&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
            &lt;td&gt;Great Flexibility &lt;/td&gt;
            &lt;td&gt;Low Management Capability &lt;/td&gt;
       &lt;/tr&gt;
        &lt;tr&gt;
            &lt;td&gt;Spec Managed&lt;/td&gt;
            &lt;td&gt;Lack of Governance &lt;/td&gt;
        &lt;/tr&gt;
    &lt;/tbody&gt;
&lt;/table&gt;

&lt;h2 id=&quot;gateway&quot;&gt;Gateway&lt;/h2&gt;

&lt;p&gt;The gateway pattern as depicted within the next diagram delegates the responsibility to manage the security aspect to an external player
which is an interceptor acting as a proxy. This actor which is an Api Management Actor can be part of the same network segment where the Microservices 
are deployed or can be deployed behind a firewall to reenforce the security of the Services hosted by the Java containers.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://cmoulliard.github.io/images/security/rest-3.png&quot; alt=&quot;interceptor-jetty&quot; /&gt;&lt;/p&gt;

&lt;p&gt;The &lt;a href=&quot;http://apiman.io&quot;&gt;Apiman&lt;/a&gt; project has been developed to support this pattern and has the advantage that it can be deployed on premises. The role of the Api Management
platform will be to :&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;Define centrally the different services/endpoints to be secured (REST, Web Service),&lt;/li&gt;
  &lt;li&gt;Select using the available plugins the Policies to be applied (Basic Auth, OAuth2, …),&lt;/li&gt;
  &lt;li&gt;Map the Web Resources, the Web Actions (GET, POST, PUT, DELETE) with the Services&lt;/li&gt;
  &lt;li&gt;Deploy within one to many Gateways (HTTP Web Server, Vert.x) the policies that the Server will use to intercept the HTTP requests&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The management of the services and the governance is simplified for the Security officer using the Apiman Server.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://cmoulliard.github.io/images/security/apiman-1.png&quot; alt=&quot;apiman-1&quot; /&gt;&lt;/p&gt;

&lt;p&gt;This Web Console will allow to :&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;Manage the services according to an organization which abstract the related services,&lt;/li&gt;
  &lt;li&gt;Select the services to be secured and assign to an Api,&lt;/li&gt;
  &lt;li&gt;To group using a plan the policies to be applied to the different services,&lt;/li&gt;
  &lt;li&gt;To select the plugins to be used; Basic Authentication, Authorization, Black listed IP, White IP list, Throttle, Keycloak - OAuth2&lt;/li&gt;
  &lt;li&gt;To manage the different versions of the Apis published,&lt;/li&gt;
  &lt;li&gt;To integrate the gateway where the policies are applied top of the requests received,&lt;/li&gt;
  &lt;li&gt;To collect the metrics/statistics of the usage done&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;img src=&quot;https://cmoulliard.github.io/images/security/apiman-2.png&quot; alt=&quot;apiman-2&quot; /&gt;&lt;/p&gt;

&lt;h2 id=&quot;conclusions&quot;&gt;Conclusions&lt;/h2&gt;

&lt;p&gt;The adoption of an Api Management Platform will certainly offer more possibilities to govern the Microservices deployed in different Java containers
and potentially non Java containers as offered by the Node.js technology.&lt;/p&gt;

&lt;p&gt;Some additional benefits about this technology concern also :&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;The disappearance of the coopling between the Services and the frameworks required to authenticate/authorize the access to the Microservices,&lt;/li&gt;
  &lt;li&gt;The centralization in one place of the Apis, consumers of the services,&lt;/li&gt;
  &lt;li&gt;The collection/aggregation of the metrics/statistics about the usage of the services which is required within some institutions where Security Audit are performed regularly&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;There are nevertheless some drawbacks as summarized within the next table as a new technology must be investigated and adopted within the company, the performance could be impacted as a Proxy HTTP Server will interrupt the normal flow between
the HTTP Agent and the Service, the project will become dependent of the Api Product used and new processes will be defined within the company to support the Api platform like also the actors in charge to maintain the 
security governance and the infrastructure.&lt;/p&gt;

&lt;table class=&quot;pure-table pure-table-bordered&quot;&gt;
    &lt;thead&gt;
        &lt;tr&gt;
            &lt;th&gt;Pros&lt;/th&gt;
            &lt;th&gt;Cons&lt;/th&gt;
        &lt;/tr&gt;
    &lt;/thead&gt;
    &lt;tbody&gt;
        &lt;tr&gt;
            &lt;td&gt;Centralized governance policy configuration&lt;/td&gt;
            &lt;td&gt;Performance&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
            &lt;td&gt;Loose coupling&lt;/td&gt;
            &lt;td&gt;New Architecture Brick&lt;/td&gt;
       &lt;/tr&gt;
        &lt;tr&gt;
            &lt;td&gt;Tracking of APIs and consumers of those APIs&lt;/td&gt;
            &lt;td&gt;Plugins available&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
            &lt;td&gt;Gathering statistics/metrics&lt;/td&gt;
            &lt;td&gt;Product locked&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
            &lt;td&gt;Simplify security audit&lt;/td&gt;
            &lt;td&gt;&lt;/td&gt;
        &lt;/tr&gt;
    &lt;/tbody&gt;
&lt;/table&gt;

&lt;p&gt;While the usage of the Interceptor completed with the Web Container Security Model will be adopted by many companies when the number of the Microservices to secure is not important
or when few security standards should be supported, it is evident that the Gateway Pattern will become the defacto standard within large institutions where the security audit and the governance
aspects are non negotiable.&lt;/p&gt;

&lt;p&gt;Another benefit of the Api Management Platform when it is used top of a Virtualized environment as proposed by the OpenShift/Kubernetes Cloud platform is the fact that the MicroServices deployed
and running as Pod will be automatically discovered !&lt;/p&gt;
</description>
            
            <category>fuse</category>
            
            <category>camel</category>
            
            <category>cxf</category>
            
            <category>integration</category>
            
            <category>apiman</category>
            
            <category>security</category>
            
            <category>keycloak</category>
            
            <category>microservices</category>
            
            <pubDate>Wed, 22 Jun 2016 00:00:00 +0200</pubDate>
            <link>https://cmoulliard.github.io//microservices-security</link>
            <guid isPermaLink="true">https://cmoulliard.github.io//microservices-security</guid>
        </item>
        
          
        <item>
            <title>Camel &amp; Rest DSL in Action !</title>
            <description>&lt;p&gt;Since the release 2.15 of Apache Camel, a new &lt;strong&gt;Domain Specific Language or DSL&lt;/strong&gt; has been developed to simplify the definition/creation of the REST endpoints and their syntax. 
This DSL syntax contains 2 words that we will use to :&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;Configure the component and endpoint (&lt;strong&gt;restConfiguration()&lt;/strong&gt;)&lt;/li&gt;
  &lt;li&gt;Define the action to be performed (GET, PUT, POST or DELETE) and path to access the service (&lt;strong&gt;rest().verb()&lt;/strong&gt;)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The syntax exists in Java or in XML format. Here is a an example where the path of the application is defined to access this URL resource “/blog” and where the HTTP verb “put” is defined for the 
the subpath “/article”. A parameter has been added using as convention the syntax “{id}”. The format to be used when the HTTP endpoint produce an HTTP Response or process a HTTP request
can be specified as you can see using “produces(“”)” or “consumes(“”).&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-java&quot; data-lang=&quot;java&quot;&gt;&lt;span class=&quot;n&quot;&gt;rest&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;/blog/&quot;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;).&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;id&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;rest-blog-service&quot;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;
       &lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;produces&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;application/json&quot;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;
       &lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;consumes&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;application/json&quot;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;

       &lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;put&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;/article/{id}&quot;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;).&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;id&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;rest-put-article&quot;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;
       &lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;type&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nc&quot;&gt;Blog&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;class&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;
       &lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;to&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;direct:add&quot;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;The formal descritpion of the REST DSL language is designed &lt;a href=&quot;http://camel.apache.org/rest-dsl.html&quot;&gt;here&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;One of the benefit of the DSL is that it does not rely on any Java Specification (jax-rs 1.0, …) and annotations but allows to design in one place the services to be mapped/exposed behind the REST endpoints.
The second benefit is that the syntax is supported by many Apache Camel components and by consequence, you have the possibility to design your project using one for them or to combine them.&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;camel-netty-http&lt;/li&gt;
  &lt;li&gt;camel-netty4-http&lt;/li&gt;
  &lt;li&gt;camel-jetty&lt;/li&gt;
  &lt;li&gt;camel-restlet&lt;/li&gt;
  &lt;li&gt;camel-servlet&lt;/li&gt;
  &lt;li&gt;camel-spark-rest&lt;/li&gt;
  &lt;li&gt;camel-undertow&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;To configure the component/endpoint and their corresponding properties (enable CORS, port, hostname, contextPath, bindingMode, …), you will use the &lt;strong&gt;restConfigure() DSL word&lt;/strong&gt; as showed hereafter&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-java&quot; data-lang=&quot;java&quot;&gt;&lt;span class=&quot;n&quot;&gt;restConfiguration&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;().&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;component&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;servlet&quot;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;
   &lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;enableCORS&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kc&quot;&gt;true&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;
   &lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;bindingMode&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nc&quot;&gt;RestBindingMode&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;json&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;
   &lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;dataFormatProperty&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;prettyPrint&quot;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&quot;true&quot;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;So, when Apache Camel will read the Java REST DSL or XML DSL syntax, it will instantiate using the factory class of the component selected an endpoint, set the fields of the component or endpoint object
and next a HTTP handler responsible to process for a specific URL path the processing of the HTTP Request and HTTP response will be created and registered within the corresponding HTTP Web container.&lt;/p&gt;

&lt;p&gt;Remark : As the implementation of the HTTP handler like also the verbs used (OPTION, CORS) is component dependent, I recommend that you evaluate them to verify/validate the one which is able to best process your HTTP requests.&lt;/p&gt;

&lt;p&gt;To help you to work with this new REST DSL syntax, this project hosted on &lt;a href=&quot;https://github.com/FuseByExample/rest-dsl-in-action/&quot;&gt;FuseByExample github repository&lt;/a&gt; has been created.&lt;/p&gt;

&lt;p&gt;It provides a real application designed to manage Blog Articles (Create, Search, Delete). It will allow you to post Blog Article that we save into an &lt;a href=&quot;https://github.com/FuseByExample/rest-dsl-in-action/#setup-elasticsearch-data-mapping&quot;&gt;ElasticSearch&lt;/a&gt; backend. The result posted within the NoSQL JSon Databae can be consulted using a &lt;a href=&quot;https://github.com/FuseByExample/rest-dsl-in-action/#kibana-dashboard-and-services&quot;&gt;Kibana Dashboard&lt;/a&gt; created for the purpose of this project.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://cmoulliard.github.io/images/camel-rest-dsl.png&quot; alt=&quot;REST DSL Blog&quot; /&gt;&lt;/p&gt;

&lt;p&gt;To &lt;a href=&quot;https://github.com/FuseByExample/rest-dsl-in-action/#swagger-documentation&quot;&gt;document the REST DSL Api&lt;/a&gt; of the REST endpoints managed by Apache Camel, we have used the Camel &lt;strong&gt;Swagger&lt;/strong&gt; Servlet has been configured in order to allow the Swagger UI to get the json stream generated by Camel from the REST DSL syntax parsed within
the project. The Servlet can be registered using a web.xml file or when you deploy the project on JBoss Fuse which is an OSGI container by using the Blueprint IoC container and a OSGI HTTP Service&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-java&quot; data-lang=&quot;java&quot;&gt;&lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;service&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;interface&lt;/span&gt;&lt;span class=&quot;err&quot;&gt;=&quot;&lt;/span&gt;&lt;span class=&quot;nc&quot;&gt;javax&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;servlet&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;http&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;HttpServlet&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;&amp;gt;
        &amp;lt;service-properties&amp;gt;
            &amp;lt;entry key=&quot;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;alias&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot; value=&quot;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;rest&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;api&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;docs&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;/*&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;/&amp;gt;
            &amp;lt;entry key=&quot;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;init&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;prefix&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot; value=&quot;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;init&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;/&amp;gt;
            &amp;lt;entry key=&quot;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;init&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;cors&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot; value=&quot;&lt;/span&gt;&lt;span class=&quot;kc&quot;&gt;true&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;/&amp;gt;
            &amp;lt;entry key=&quot;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;init&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;base&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;path&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot; value=&quot;&lt;/span&gt;&lt;span class=&quot;err&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;swaggerBasePath&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;/&amp;gt;
        &amp;lt;/service-properties&amp;gt;
        &amp;lt;bean class=&quot;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;org&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;apache&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;camel&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;component&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;swagger&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;DefaultCamelSwaggerServlet&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;/&amp;gt;
    &amp;lt;/service&amp;gt;

    &amp;lt;!-- to setup camel servlet with OSGi HttpService --&amp;gt;
    &amp;lt;reference id=&quot;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;httpService&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot; interface=&quot;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;org&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;osgi&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;service&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;http&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;HttpService&lt;/span&gt;&lt;span class=&quot;err&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;/&amp;gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;The Service properties fields define the fields to be configured for the Swagger Servlet that Swagger will use to setup the path to access the JSON doc generated and path also to access the endpoint deployed on the server.&lt;/p&gt;

&lt;p&gt;You can find the required info about how to configure and use the Camel-Swagger component &lt;a href=&quot;http://camel.apache.org/swagger.html&quot;&gt;here&lt;/a&gt;. A new component has been created recently within the &lt;a href=&quot;http://camel.apache.org/swagger-java.html&quot;&gt;Apache Camel project&lt;/a&gt; as Swagger has refactored its API to use Java as language instead of Scala.&lt;/p&gt;

</description>
            
            <category>camel</category>
            
            <category>integration</category>
            
            <category>rest</category>
            
            <category>dsl</category>
            
            <category>fuse</category>
            
            <category>elasticsearch</category>
            
            <category>kibana</category>
            
            <pubDate>Wed, 23 Mar 2016 00:00:00 +0100</pubDate>
            <link>https://cmoulliard.github.io//camel-rest-dsl-in-action</link>
            <guid isPermaLink="true">https://cmoulliard.github.io//camel-rest-dsl-in-action</guid>
        </item>
        
          
        <item>
            <title>Drools &amp; jBPM run on OSGi container JBoss Fuse !</title>
            <description>&lt;p&gt;We have worked hard this year to improve the &lt;strong&gt;&lt;a href=&quot;http://www.kiegroup.org/&quot;&gt;Drools - Business Logic integration Platform&lt;/a&gt;&lt;/strong&gt; to make it &lt;strong&gt;OSGI compliant&lt;/strong&gt;. The modules
of the project have been reviewed to :&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;Export/import correctly the packages required by the bundles when deployed into an OSGI container like &lt;a href=&quot;http://felix.apache.org&quot;&gt;Apache Felix&lt;/a&gt;,&lt;/li&gt;
  &lt;li&gt;Register some OSGI services,&lt;/li&gt;
  &lt;li&gt;Design a new OSGI classloader to load the Drools resources (drl, bpmn, bpmn2) packaged into the bundles&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Moreover, the project provides now a &lt;a href=&quot;http://karaf.apache.org/manual/latest-2.3.x/users-guide/provisioning.html&quot;&gt;features XML file&lt;/a&gt; to provision the different modules (drools, drools-decision-table,bpm, …)
into &lt;strong&gt;JBoss, fuse]&lt;/strong&gt; or Apache Karaf&lt;/p&gt;

&lt;p&gt;Since the release &lt;a href=&quot;https://github.com/droolsjbpm/drools&quot;&gt;6.1.0&lt;/a&gt; of &lt;strong&gt;Drools/jBPM&lt;/strong&gt;, you can capitalize the efforts done and deploys &lt;strong&gt;BRMS&lt;/strong&gt; onto the [JBoss, fuse]](https://www.jboss.org/products/fuse/overview/) Java Container
which is a &lt;strong&gt;Multi-Technology OSGI Platform&lt;/strong&gt; running your &lt;strong&gt;Integration projects&lt;/strong&gt; with these technologies :&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;a href=&quot;http://camel.apache.org&quot;&gt;Apache Camel / Java Integration Framework&lt;/a&gt;,&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;http://activemq.apache.org&quot;&gt;Apache ActiveMQ / Messaging broker&lt;/a&gt;,&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;http://cxf.apache.org&quot;&gt;Apache CXF / REST &amp;amp; WebService Framework&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Typically a BRMS project can be designed as a bundle containing the knowledge repository, session, resources and rules to be fired. Using the &lt;a href=&quot;https://github.com/cmoulliard/droolsjbpm-osgi-examples/tree/RH.6.0.3.ER4#simple-rule-example&quot;&gt;BundleActivator&lt;/a&gt; class,
the project can be started directly by the OSGI container when the event “start” will be called.
This is not the only thing that you can do as you can also use a &lt;em&gt;Dependency Injection framework&lt;/em&gt; supported by JBoss, fuse] product :&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;a href=&quot;http://docs.spring.io/spring-osgi/docs/current/reference/html/&quot;&gt;Spring DM&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;http://aries.apache.org/modules/blueprint.html&quot;&gt;Apache Aries Blueprint&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;http://felix.apache.org/documentation/subprojects/apache-felix-maven-scr-plugin/scr-annotations.html&quot;&gt;Apache Felix Service Component Runtime&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://ops4j1.jira.com/wiki/display/PAXCDI/Pax+CDI&quot;&gt;CDI&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;to design your architecture. No matter which injection mechanism you prefer to use, JBoss, fuse] will scan the bundles deployed and will create with the classloader of the bundle
create the corresponding Application Context (Spring, Blueprint, Weld, …) to register the beans discovered as singletons objects.&lt;/p&gt;

&lt;p&gt;To help you to start your project, a &lt;strong&gt;quickstart&lt;/strong&gt; github repository has been created covering different scenario presented &lt;a href=&quot;https://github.com/cmoulliard/droolsjbpm-osgi-examples/blob/RH.6.0.3.ER4/README.adoc&quot;&gt;here&lt;/a&gt;
They cover the different strategies described below but also how to externalize the rules, use rules defined in an Microsoft Excell spreadsheet and run some business processes (using or not a persistent layer).&lt;/p&gt;

&lt;p&gt;One of the key benefit to use &lt;strong&gt;BRMS&lt;/strong&gt; on the &lt;strong&gt;JBoss, fuse]&lt;/strong&gt; platform is that you can integrate it easily with the &lt;em&gt;Camel Integration framework&lt;/em&gt; to collect data from different sources, validate or enrich them and next
inject such info into the Ksession before to fire the rules. Such a scenario is described &lt;a href=&quot;https://github.com/cmoulliard/droolsjbpm-osgi-examples/blob/RH.6.0.3.ER4/README.adoc#integration-with-camel-example&quot;&gt;here&lt;/a&gt; and a quick demo is attached to this post
too to show you &lt;strong&gt;BRMS&lt;/strong&gt; and &lt;strong&gt;Apache Camel&lt;/strong&gt; in action.&lt;/p&gt;

&lt;p&gt;BRMS &amp;amp; Camel Live !&lt;/p&gt;

&lt;script type=&quot;text/javascript&quot; src=&quot;https://asciinema.org/a/11644.js&quot; id=&quot;asciicast-11644&quot; async=&quot;&quot;&gt;&lt;/script&gt;

</description>
            
            <category>camel</category>
            
            <category>drools</category>
            
            <category>bpm</category>
            
            <category>rules</category>
            
            <category>integration</category>
            
            <category>fuse</category>
            
            <pubDate>Fri, 22 Aug 2014 00:00:00 +0200</pubDate>
            <link>https://cmoulliard.github.io//brms-jboss-fuse</link>
            <guid isPermaLink="true">https://cmoulliard.github.io//brms-jboss-fuse</guid>
        </item>
        
          
        <item>
            <title>Publication about Introduction to Apache Camel (Part I)</title>
            <description>&lt;p&gt;In June of this year 2013, I have published a first article about &lt;strong&gt;&lt;a href=&quot;http://jaxenter.com/tutorial-integrating-with-apache-camel-48211.html&quot;&gt;Apache Camel&lt;/a&gt;&lt;/strong&gt; in the
Java Review &lt;strong&gt;&lt;a href=&quot;http://jaxenter.com&quot;&gt;jaxenter&lt;/a&gt;&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;This article which is part of a series will introduce you core and more advanced features :&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;How routing take place,&lt;/li&gt;
  &lt;li&gt;Why Camel is called DSL/Fluent API,&lt;/li&gt;
  &lt;li&gt;How type conversion is done between the objects,&lt;/li&gt;
  &lt;li&gt;Data Formatting&lt;/li&gt;
  &lt;li&gt;…&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;about this Java Integration Framework.&lt;/p&gt;

&lt;p&gt;The second part will cover data formatting between objects and formats currently supported by &lt;strong&gt;&lt;a href=&quot;http://camel.apache.org/data-format.html&quot;&gt;Apache Camel&lt;/a&gt;&lt;/strong&gt; but also mapping tools !&lt;/p&gt;
</description>
            
            <category>fuse</category>
            
            <category>publication</category>
            
            <category>jaxenter</category>
            
            <category>camel</category>
            
            <category>integration</category>
            
            <pubDate>Tue, 01 Oct 2013 00:00:00 +0200</pubDate>
            <link>https://cmoulliard.github.io//camel-introduction-publication-jaxenter</link>
            <guid isPermaLink="true">https://cmoulliard.github.io//camel-introduction-publication-jaxenter</guid>
        </item>
        
          
        <item>
            <title>Cloud Integration with Fabric Camel (Part I)</title>
            <description>&lt;p&gt;Since the launch of &lt;a href=&quot;http://fusesource.com/products/fuse-esb-enterprise/&quot; target=&quot;_blank&quot;&gt;fuse ESB 7&lt;/a&gt;, &lt;a href=&quot;http://fusesource.com/products/fuse-mq-enterprise/&quot; target=&quot;_blank&quot;&gt;fuse MB 7&lt;/a&gt;
and in fact the official release of &lt;a href=&quot;http://fuse.fusesource.org/fabric/download.html&quot; target=&quot;_blank&quot;&gt;fuse Fabric&lt;/a&gt;, Camel has moved in a new era called “Cloud Integration where machines,
services are distributed everywhere.&lt;br /&gt;&lt;a href=&quot;http://www.fusesource.com/&quot; target=&quot;_blank&quot;&gt;fuseSource&lt;/a&gt; (which is now part of &lt;a href=&quot;http://www.redhat.com/&quot; target=&quot;_blank&quot;&gt;RedHat&lt;/a&gt; company)
is the leader of “Integration Everywhere” has supported the development of the Fabric project to facilitate the creation of such integration project in the “cloud”.&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;

&lt;p&gt;With Fabric, the information of the Camel endpoints are registered in a global registry which can be accessed by the different machines part of the cloud.&lt;/p&gt;

&lt;p&gt;This mechanism which is presented here :&lt;/p&gt;
&lt;figure&gt;
&lt;object width=&quot;320&quot; height=&quot;266&quot; class=&quot;BLOG_video_class&quot; id=&quot;BLOG_video-17c3ad9608687d75&quot; classid=&quot;clsid:D27CDB6E-AE6D-11cf-96B8-444553540000&quot; codebase=&quot;http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0&quot;&gt;
&lt;param name=&quot;movie&quot; value=&quot;//www.youtube.com/get_player&quot; /&gt;
&lt;param name=&quot;bgcolor&quot; value=&quot;#FFFFFF&quot; /&gt;
&lt;param name=&quot;allowfullscreen&quot; value=&quot;true&quot; /&gt;
&lt;param name=&quot;flashvars&quot; value=&quot;flvurl=http://redirector.googlevideo.com/videoplayback?id%3D17c3ad9608687d75%26itag%3D5%26source%3Dblogger%26app%3Dblogger%26cmo%3Dsensitive_content%253Dyes%26ip%3D0.0.0.0%26ipbits%3D0%26expire%3D1380471702%26sparams%3Did,itag,source,ip,ipbits,expire%26signature%3D8BDF83DA94DB5455AAC0B0431AEFD7FA00C619CF.A8D8C878CA6078820AFCEA3967C7598C307DEA42%26key%3Dck2&amp;amp;iurl=http://video.google.com/ThumbnailServer2?app%3Dblogger%26contentid%3D17c3ad9608687d75%26offsetms%3D5000%26itag%3Dw160%26sigh%3DsPqzA4NdAE8ESIBjpYmAnZwqLbM&amp;amp;autoplay=0&amp;amp;ps=blogger&quot; /&gt;&lt;embed src=&quot;//www.youtube.com/get_player&quot; type=&quot;application/x-shockwave-flash&quot; width=&quot;320&quot; height=&quot;266&quot; bgcolor=&quot;#FFFFFF&quot; flashvars=&quot;flvurl=http://redirector.googlevideo.com/videoplayback?id%3D17c3ad9608687d75%26itag%3D5%26source%3Dblogger%26app%3Dblogger%26cmo%3Dsensitive_content%253Dyes%26ip%3D0.0.0.0%26ipbits%3D0%26expire%3D1380471702%26sparams%3Did,itag,source,ip,ipbits,expire%26signature%3D8BDF83DA94DB5455AAC0B0431AEFD7FA00C619CF.A8D8C878CA6078820AFCEA3967C7598C307DEA42%26key%3Dck2&amp;amp;iurl=http://video.google.com/ThumbnailServer2?app%3Dblogger%26contentid%3D17c3ad9608687d75%26offsetms%3D5000%26itag%3Dw160%26sigh%3DsPqzA4NdAE8ESIBjpYmAnZwqLbM&amp;amp;autoplay=0&amp;amp;ps=blogger&quot; allowfullscreen=&quot;true&quot; /&gt;
&lt;/object&gt;
&lt;figcaption&gt;You Tube link of the video : &lt;a href=&quot;http://www.youtube.com/watch?v=CO1WcTFivT0&quot;&gt;http://www.youtube.com/watch?v=CO1WcTFivT0&lt;/a&gt;&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;p&gt;requires some Fabric agents which are used to communicate with the registry (= Fabric ensemble).
This ensemble is in fact a Zookeeper server which will contain configurations, profiles and of course services registered. When a Camel producer wants to
publish a camel exchange, it will perform a lookup in the registry to find endpoints using as a key the name associated to a fabric group.
The endpoints available are returned as a list :&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-text&quot; data-lang=&quot;text&quot;&gt;zk:list -r -d fabric/registry/camel
endpoints/local/00000000000 = jetty:http://0.0.0.0:9090/fabric
endpoints/local/00000000001 = jetty:http://0.0.0.0:9191/fabric&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;As &lt;a href=&quot;http://fuse.fusesource.org/fabric/docs/fabric-agent.html&quot;&gt;Fabric agents&lt;/a&gt; which are deployed in &lt;a href=&quot;http://fuse.fusesource.org/fabric/docs/fabric-cloud-containers.html&quot;&gt;Fabric containers&lt;/a&gt;
can be added or removed dynamically according to the needs, this list is continuously refreshed. The endpoint registered could be of type Jetty, CXF, Mina, Netty, JMS as they are able to transport information
from a machine to another using HTTP, JMS, TCP/IP … protocols.&lt;/p&gt;

&lt;p&gt;The other advantage of this mechanism is that the Camel producer when communicating with Fabric will use a internal loabalancer if more than one Camel route exposing the service has been deployed in several Fabric containers.&lt;/p&gt;

&lt;p&gt;To deploy a Fabric Camel project, you just need to use some of the &lt;a href=&quot;http://fuse.fusesource.org/fabric/docs/commands/commands.html&quot;&gt;Fabric commands&lt;/a&gt; to create the profiles of the camel routes exposed as service and also used to consume the services.&lt;/p&gt;

&lt;p&gt;With such profiles, we can create Fabric containers and deploy the camel routes as the following video will show you&lt;/p&gt;
&lt;figure&gt;
&lt;object width=&quot;320&quot; height=&quot;266&quot; class=&quot;BLOG_video_class&quot; id=&quot;BLOG_video-ec547792c86cc7ac&quot; classid=&quot;clsid:D27CDB6E-AE6D-11cf-96B8-444553540000&quot; codebase=&quot;http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0&quot;&gt;
&lt;param name=&quot;movie&quot; value=&quot;//www.youtube.com/get_player&quot; /&gt;&lt;param name=&quot;bgcolor&quot; value=&quot;#FFFFFF&quot; /&gt;
&lt;param name=&quot;allowfullscreen&quot; value=&quot;true&quot; /&gt;
&lt;param name=&quot;flashvars&quot; value=&quot;flvurl=http://redirector.googlevideo.com/videoplayback?id%3Dec547792c86cc7ac%26itag%3D5%26source%3Dblogger%26app%3Dblogger%26cmo%3Dsensitive_content%253Dyes%26ip%3D0.0.0.0%26ipbits%3D0%26expire%3D1380471702%26sparams%3Did,itag,source,ip,ipbits,expire%26signature%3D753800916D774327F39DDA0FAF0E75137CB3E85F.A923FB83EFFA80F15A72B5728FDDE26E19241F%26key%3Dck2&amp;amp;iurl=http://video.google.com/ThumbnailServer2?app%3Dblogger%26contentid%3Dec547792c86cc7ac%26offsetms%3D5000%26itag%3Dw160%26sigh%3DKWQXCRxEjnKMKDumBUkF39xprmE&amp;amp;autoplay=0&amp;amp;ps=blogger&quot; /&gt;&lt;embed src=&quot;//www.youtube.com/get_player&quot; type=&quot;application/x-shockwave-flash&quot; width=&quot;320&quot; height=&quot;266&quot; bgcolor=&quot;#FFFFFF&quot; flashvars=&quot;flvurl=http://redirector.googlevideo.com/videoplayback?id%3Dec547792c86cc7ac%26itag%3D5%26source%3Dblogger%26app%3Dblogger%26cmo%3Dsensitive_content%253Dyes%26ip%3D0.0.0.0%26ipbits%3D0%26expire%3D1380471702%26sparams%3Did,itag,source,ip,ipbits,expire%26signature%3D753800916D774327F39DDA0FAF0E75137CB3E85F.A923FB83EFFA80F15A72B5728FDDE26E19241F%26key%3Dck2&amp;amp;iurl=http://video.google.com/ThumbnailServer2?app%3Dblogger%26contentid%3Dec547792c86cc7ac%26offsetms%3D5000%26itag%3Dw160%26sigh%3DKWQXCRxEjnKMKDumBUkF39xprmE&amp;amp;autoplay=0&amp;amp;ps=blogger&quot; allowfullscreen=&quot;true&quot; /&gt;
&lt;/object&gt;
&lt;figcaption&gt;Youtube Link of the video : &lt;a href=&quot;http://www.youtube.com/watch?v=RUg2rgY4BME&quot;&gt;http://www.youtube.com/watch?v=RUg2rgY4BME&lt;/a&gt;&lt;/figcaption&gt;
&lt;/figure&gt;

&lt;p&gt;Remark : The code of the demo is available here : &lt;a href=&quot;https://github.com/fusesource/fuse/tree/master/fabric/fabric-examples/fabric-camel-cluster-loadbalancing&quot;&gt;https://github.com/fusesource/fuse/tree/master/fabric/fabric-examples/fabric-camel-cluster-loadbalancing&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Enjoy Cloud Integration Camel Rider !&lt;/p&gt;

</description>
            
            <category>cloud</category>
            
            <category>fabric8</category>
            
            <category>integration</category>
            
            <category>middleware</category>
            
            <category>fuse</category>
            
            <pubDate>Thu, 28 Jun 2012 00:00:00 +0200</pubDate>
            <link>https://cmoulliard.github.io//-,/fuse%5D/fabric/-/cloud/apache/camel/cloud-integration-with-fabric-camel</link>
            <guid isPermaLink="true">https://cmoulliard.github.io//-,/fuse%5D/fabric/-/cloud/apache/camel/cloud-integration-with-fabric-camel</guid>
        </item>
        
          
        <item>
            <title>Real Time HTML5 application with Websocket and ActiveMQ/camel</title>
            <description>&lt;p&gt;As part of my &lt;a href=&quot;http://fusesource.com/apache-camel-conference-2012/&amp;quot;CamelOne&quot;&gt;presentation&lt;/a&gt;, I have prepared some examples to dig into what Apache
&lt;a href=&quot;http://activemq.apache.org/&quot;&gt;ActiveMQ&lt;/a&gt; and &lt;a href=&quot;http://camel.apache.org/&quot;&gt;Camel&lt;/a&gt; propose to work with
&lt;a href=&quot;http://www.html5rocks.com/en/&quot;&gt;HTML5&lt;/a&gt; and &lt;a href=&quot;http://www.websocket.org/&quot;&gt;WebSocket&lt;/a&gt; technology.&lt;/p&gt;

&lt;p&gt;Developing “Real Time Web Applications” has always been painful not matter if the technology used was based on Java Applet,
Adobe Flash, Adobe ShockWave, Microsoft Silverlight and the protocol (HTTP, RMI, …).&lt;/p&gt;

&lt;p&gt;Since HTML5 publication (2009) and the work done by W3C and IETF organisations, we now have a standard
&lt;a href=&quot;http://datatracker.ietf.org/doc/rfc6455/&quot;&gt;rfc-6455&lt;/a&gt; that we can use to exchange in a bi-directional way “messages” between the browser and the Web Server.
Only one HTTP(s) request is required to initiate the WebSocket communication and later on the exchange of data frames (text or bytes).&lt;/p&gt;

&lt;p&gt;ActiveMQ (release 5.6) like Camel (release 2.10) proposes a WebSocket Transport Connector or Endpoint using Jetty WebServer WebSocket implementation (v7.5).
This allow not only to retrieve data from topics but when combining the EIP patterns of Camel and some components like : sql, jpa, file, rss, atom, twitter, …
we can “aggregate”, “enrich” or “filter” content receive from feed providers before to publish them for feed consumers.&lt;/p&gt;

&lt;p&gt;ActiveMQ uses Stomp as a wired format to send WebSockets messages between the WebSocket server running within the ActiveMQ broker and the Web browser.
In this context, we must use one of the two javascript libraries available &lt;a href=&quot;http://www.jmesnil.net/stomp-websocket/doc/&quot;&gt;stomp.js&lt;/a&gt;,
&lt;a href=&quot;https://github.com/krukow/stomple&quot;&gt;stomple&lt;/a&gt; to develop the project&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-javascript&quot; data-lang=&quot;javascript&quot;&gt;&lt;span class=&quot;nx&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;document&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;).&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;ready&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kd&quot;&gt;function&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
&lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;client&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;destinationQuotes&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;nx&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;'&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;#connect_form&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;).&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;submit&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kd&quot;&gt;function&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
&lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;url&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;#connect_url&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;).&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;val&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;();&lt;/span&gt;
&lt;span class=&quot;nx&quot;&gt;client&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;Stomp&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;client&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;url&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;

&lt;span class=&quot;c1&quot;&gt;// the client is notified when it is connected to the server.&lt;/span&gt;
&lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;onconnect&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;function&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;frame&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;

&lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;stockTable&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;document&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;getElementById&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;stockTable&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
&lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;stockRowIndexes&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{};&lt;/span&gt;

&lt;span class=&quot;nx&quot;&gt;client&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;subscribe&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;destinationQuotes&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;function&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;message&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
&lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;quote&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;JSON&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;parse&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;message&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;body&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
&lt;span class=&quot;nx&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;'&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;'&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;stock-&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;quote&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;symbol&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;).&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;replaceWith&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&quot;&quot;&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt;
&lt;span class=&quot;dl&quot;&gt;&quot;&quot;&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;quote&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;symbol&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;dl&quot;&gt;&quot;&quot;&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt;
&lt;span class=&quot;dl&quot;&gt;&quot;&quot;&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;quote&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;open&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;toFixed&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;dl&quot;&gt;&quot;&quot;&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt;
&lt;span class=&quot;dl&quot;&gt;&quot;&quot;&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;quote&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;last&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;toFixed&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;dl&quot;&gt;&quot;&quot;&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt;
&lt;span class=&quot;dl&quot;&gt;&quot;&quot;&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;quote&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;change&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;toFixed&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;dl&quot;&gt;&quot;&quot;&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt;
&lt;span class=&quot;dl&quot;&gt;&quot;&quot;&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;quote&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;high&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;toFixed&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;dl&quot;&gt;&quot;&quot;&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt;
&lt;span class=&quot;dl&quot;&gt;&quot;&quot;&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;quote&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;low&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;toFixed&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;dl&quot;&gt;&quot;&quot;&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt;
&lt;span class=&quot;dl&quot;&gt;&quot;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;...&lt;/span&gt;

&lt;span class=&quot;nx&quot;&gt;client&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;connect&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;login&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;passcode&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;onconnect&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;and of course the WebSocket protocol must be enable.&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-xml&quot; data-lang=&quot;xml&quot;&gt;&lt;span class=&quot;nt&quot;&gt;&amp;lt;transportconnectors&amp;gt;&amp;lt;br/&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;nt&quot;&gt;&amp;lt;transportconnector&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;name=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;websocket&quot;&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;uri=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;ws://0.0.0.0:61614&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&amp;lt;/transportconnector&amp;gt;&lt;/span&gt;
&lt;span class=&quot;nt&quot;&gt;&amp;lt;/transportconnectors&amp;gt;&amp;lt;br/&amp;gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;Camel does not need a special format to exchange the data between its WebSocket endpoint and the browser as JSon text will be send through the WebSocket Data Frames to the browser. We must just expose a Camel Route as a WebSocket Server.&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-java&quot; data-lang=&quot;java&quot;&gt;&lt;table class=&quot;rouge-table&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td class=&quot;gutter gl&quot;&gt;&lt;pre class=&quot;lineno&quot;&gt;1
2
3
4
5
6
7
8
&lt;/pre&gt;&lt;/td&gt;&lt;td class=&quot;code&quot;&gt;&lt;pre&gt;&lt;span class=&quot;kd&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;WebSocketStockPricesRoute&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;extends&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;RouteBuilder&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;nd&quot;&gt;@Override&lt;/span&gt;
    &lt;span class=&quot;kd&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;configure&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;throws&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;Exception&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
       &lt;span class=&quot;n&quot;&gt;from&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;activemq:topic:stockQuoteTopic&quot;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;
       &lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;log&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nc&quot;&gt;LoggingLevel&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;DEBUG&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;&amp;amp;gt;&amp;amp;gt; Stock price received : ${body}&quot;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;
       &lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;to&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;websocket:stockQuoteTopic?sendToAll=true&quot;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;
     &lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;
&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;and use in the browser the WebSocket HTML5 js script.&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-javascript&quot; data-lang=&quot;javascript&quot;&gt;&lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;socket&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;nx&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;'&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;#connect_form&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;).&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;submit&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kd&quot;&gt;function&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;

&lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;stockTable&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;document&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;getElementById&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;stockTable&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
&lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;stockRowIndexes&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{};&lt;/span&gt;
&lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;host&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;#connect_url&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;).&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;val&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;();&lt;/span&gt;
&lt;span class=&quot;nx&quot;&gt;socket&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;WebSocket&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;host&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;

&lt;span class=&quot;c1&quot;&gt;// Add a connect listener&lt;/span&gt;
&lt;span class=&quot;nx&quot;&gt;socket&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;onopen&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;function&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
&lt;span class=&quot;nx&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;'&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;#msg&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;).&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;append&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;'&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&amp;lt;div class=&quot;event&quot;&amp;gt;
Socket Status: &lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;'&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;socket&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;readyState&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;dl&quot;&gt;'&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt; (open)&amp;lt;/div&amp;gt;
&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;

&lt;span class=&quot;nx&quot;&gt;socket&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;onmessage&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;function&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;msg&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
&lt;span class=&quot;c1&quot;&gt;// $('#msg').append('&amp;lt;div class=&quot;message&quot;&amp;gt;&lt;/span&gt;
&lt;span class=&quot;nl&quot;&gt;Received&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;dl&quot;&gt;'&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt; + msg.data + &quot;&amp;lt;/div&amp;gt;
&quot;);

var quote = JSON.parse(msg.data);

....&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;In both cases, you can combine other javascript librairies (jquery, jquery-ui) to improve the design of the JSon objects to be displayed in the browser.
Here are some screenshots about the demos&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://cmoulliard.github.io/assets/images//activemq-stocks.png&quot; imageanchor=&quot;1&quot;&gt;
  &lt;img border=&quot;0&quot; height=&quot;200&quot; src=&quot;https://cmoulliard.github.io/assets/images//activemq-stocks.png&quot; width=&quot;146&quot; /&gt;
&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Stock Trader&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://cmoulliard.github.io/assets/images/chat-camel.png&quot; imageanchor=&quot;1&quot;&gt;
   &lt;img border=&quot;0&quot; height=&quot;118&quot; src=&quot;https://cmoulliard.github.io/assets/images/chat-camel.png&quot; width=&quot;200&quot; /&gt;
&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Chat Room&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://cmoulliard.github.io/assets/images//news-camel.png&quot; imageanchor=&quot;1&quot;&gt;
   &lt;img border=&quot;0&quot; height=&quot;163&quot; src=&quot;https://cmoulliard.github.io/assets/images/news-camel.png&quot; width=&quot;200&quot; /&gt;
&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Twitter and News Feed Code can be retrieved from &lt;a href=&quot;https://github.com/fuseByExample/&quot;&gt;fuseByExample&lt;/a&gt; web site.&lt;/p&gt;

&lt;p&gt;Look to “&lt;a href=&quot;https://github.com/fuseByExample/websocket-activemq-camel&quot;&gt;websocket-activemq-camel&lt;/a&gt;” git hub project.&lt;/p&gt;

&lt;p&gt;Enjoy WebSocket with Apache Camel and ActiveMQ !&lt;/p&gt;
</description>
            
            <category>html5</category>
            
            <category>websocket</category>
            
            <category>real-time</category>
            
            <category>camel</category>
            
            <category>activemq</category>
            
            <pubDate>Thu, 26 Apr 2012 00:00:00 +0200</pubDate>
            <link>https://cmoulliard.github.io//websocket/integration/real-time-html5-application-with</link>
            <guid isPermaLink="true">https://cmoulliard.github.io//websocket/integration/real-time-html5-application-with</guid>
        </item>
        
          
        <item>
            <title>Apache Camel at CamelOne</title>
            <description>&lt;p&gt;fuseSource organises for the second time an event dedicated to the famous Apache Camel EIP Framework - &lt;a href=&quot;http://camelone2012.eventbrite.com/&quot;&gt;CamelOne&lt;/a&gt;,
the 15th  and 16nd of May. This conference is not only a vitrine dedicated to Apache Camel Integration framework or, fuse]Source products but related technologies
like ESB, SOA, BPM, Cloud, MOM, HTML5, Big Data and &lt;a href=&quot;http://fusesource.com/apache-camel-conference-2012/camelone_speakers_2012/#cmouillard&quot;&gt;Real Time applications&lt;/a&gt;
will be presented through a panel of different &lt;a href=&quot;http://fusesource.com/apache-camel-conference-2012/camelone_agenda_2012/&quot;&gt;CamelOne talks&lt;/a&gt;
and &lt;a href=&quot;http://fusesource.com/apache-camel-conference-2012/camelone_speakers_2012/&quot;&gt;speakers&lt;/a&gt; (Rob Davies, James Strachan, Claus Ibsen,
Hiram Chirino, Tony Shan, Robin Howlett, Dan Kulp, Jon Anstey, Kai Wahner, Charles Moulliard, Jazon Van Zyl, …).&lt;/p&gt;

&lt;p&gt;A special attention was also given this year to present projects deployed and running in Enterprise :&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;Christian Mueller - Atos,&lt;/li&gt;
  &lt;li&gt;Rob Terpilowski - Lynden,&lt;/li&gt;
  &lt;li&gt;Matt Pavlovich - Media Driver&lt;/li&gt;
  &lt;li&gt;David Reiser, Ram Raju and Shane Kent – Department of Transportation,&lt;/li&gt;
  &lt;li&gt;Robin Howlett - Silver Chalice&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;proving that Apache Camel is not only used by early adopters but is now part of the Enterprise Software Architecture like RDBMS and Web Technologies&lt;/p&gt;

&lt;p&gt;If your are not yet registered, I recommend to do it to have the chance to meet some Apache Committers and people working every day with SOA and Integration projects.
 This is incredible opportunity which is only offered one time a year. Do not forget that the CamelOne conference include also a program to &lt;a href=&quot;http://fusesource.com/apache-camel-conference-2012/camelone_training_2012/&quot;&gt;train people&lt;/a&gt;
 on Apache Camel, ActiveMQ and Apache ServiceMix.&lt;/p&gt;

&lt;figure&gt;
  &lt;img src=&quot;https://cmoulliard.github.io/assets/images/camelone_sig_v1.jpg&quot; /&gt;
  &lt;figcaption&gt;CamelOne 2012 Logo&lt;/figcaption&gt;
&lt;/figure&gt;

</description>
            
            <category>conference</category>
            
            <category>camelone</category>
            
            <category>fuse</category>
            
            <pubDate>Fri, 13 Apr 2012 00:00:00 +0200</pubDate>
            <link>https://cmoulliard.github.io//fusesource/apache%20camel/camelone/conference/apache-camel-at-camelone</link>
            <guid isPermaLink="true">https://cmoulliard.github.io//fusesource/apache%20camel/camelone/conference/apache-camel-at-camelone</guid>
        </item>
        
          
        <item>
            <title>3 reasons to use, fuse]Source Documentation</title>
            <description>&lt;p&gt;As an Apache Committer but also, fuse]Source Consultant and Solution Architect, the documentation and its quality is a critical factor in my day by day work.
Until now, even using google search engine, that was difficult to find in one place all the information required and a wasting time.
This situation has changed and I will give you three reasons to use/adopt &lt;a href=&quot;http://fusesource.com/documentation/&quot;&gt;fuseSource documentation&lt;/a&gt; for your Apache Camel,
Apache ServiceMix and Apache Karaf projects.&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;
    &lt;p&gt;Reason 1 :, fuse] maintains history of Apache releases&lt;/p&gt;

    &lt;p&gt;Apache websites use Atlassian Confluence to maintain content publishes for each Apache project. This tool does not allow to create a history of the different releases
of Camel by example (2.6, 2.7, 2.8). This is not the case with, fuse]Source documentation which allow you to browse a &lt;a href=&quot;http://fusesource.com/documentation/&quot;&gt;specific version&lt;/a&gt; like the current.
And with the help of google, you can make specific search like that&lt;/p&gt;
  &lt;/li&gt;
&lt;/ul&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-text&quot; data-lang=&quot;text&quot;&gt;    site:fusesource.com/docs/router/2.8/ &quot;followed by the keywords&quot;
    site:fusesource.com/docs/router &quot;followed by the keywords&quot;
    &lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;ul&gt;
  &lt;li&gt;
    &lt;p&gt;Reason 2 : Javadoc and Schema are well documented&lt;/p&gt;

    &lt;p&gt;&lt;a href=&quot;http://fusesource.com/docs/router/2.8/apidoc/index.html&quot;&gt;Javadoc&lt;/a&gt; &amp;amp; &lt;a href=&quot;http://fusesource.com/docs/router/2.8/xmlref/index.html&quot;&gt;XML Schema&lt;/a&gt; are also 2 interesting examples as there is no XML Schema javadoc
on Apache websites for by example Spring DSL language. This is completely different on, fuse]Source web site as you can read the documentation and discover what are the tags or attributes
to be used for specific Apache Camel DSL words. Here is an example containing the options proposed for &lt;a href=&quot;http://fusesource.com/docs/router/2.8/xmlref/http.camel.apache.org.2033734988/element/dataformats.html&quot;&gt;Apache Camel Dataformat&lt;/a&gt;.&lt;/p&gt;

    &lt;p&gt;&lt;a href=&quot;https://cmoulliard.github.io/assets/images/xsd_schema_doc.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;200&quot; src=&quot;https://cmoulliard.github.io/assets/images/xsd_schema_doc.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;Reason 3 : New chapters have been added&lt;/p&gt;
  &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;, fuse]Source documentation contains missing pieces of information or cover in depth points which are described poorly on Apache websites or in an disparate way.
    So take the time to read the following chapters when you need more info about Transactions, Security, …&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;- [Camel and Transactions](http://fusesource.com/docs/router/2.8/transactions/front.html)
- [Camel and WebServices](http://fusesource.com/docs/router/2.8/camel_cxf/front.html)
- [fuse ESB - Security guide](http://fusesource.com/docs/esb/4.4.1/esb_security/front.html)
- [Transactions with, fuse] ESB](http://fusesource.com/docs/esb/4.4.1/camel_tx/front.html)
- [ActiveMQ - Security](http://fusesource.com/docs/esb/4.4.1/amq_security/front.html)
- [ActiveMQ - Tuning Guide](http://fusesource.com/docs/esb/4.4.1/amq_tuning/front.html)
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
</description>
            
            <category>documentation</category>
            
            <category>fuse</category>
            
            <pubDate>Fri, 13 Apr 2012 00:00:00 +0200</pubDate>
            <link>https://cmoulliard.github.io//fuse/camel/activemq/apache/servicemix/documentation/3-reasons-to-use-fusesource</link>
            <guid isPermaLink="true">https://cmoulliard.github.io//fuse/camel/activemq/apache/servicemix/documentation/3-reasons-to-use-fusesource</guid>
        </item>
        
          
        <item>
            <title>Run a Google Web Toolkit 2 project on Apache Karaf/ServiceMix</title>
            <description>&lt;p&gt;To simplify the development of Web projects on Apache Karaf/Apache ServiceMix, we have created &lt;a href=&quot;https://github.com/ops4j/org.ops4j.pax.web/tree/master/pax-web-archetypes&quot;&gt;archetypes&lt;/a&gt; to setup WAR or WAB projects. They are very basic but they can be enriched with framework like Struts 2, Wicket, plain JSP or MyFaces JSF as they are currently supported on Apache Karaf - ServiceMix.&lt;/p&gt;

&lt;p&gt;For the &lt;a href=&quot;http://code.google.com/webtoolkit/&quot;&gt;GWT users&lt;/a&gt;, it exists now an archetype which will create a GWT 2.4 project. To create such a project, you must generate a project from the archetype&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-text&quot; data-lang=&quot;text&quot;&gt;mvn archetype:generate \
   -DarchetypeGroupId=org.ops4j.pax.web.archetypes\
   -DarchetypeArtifactId=wab-gwt-archetype \
   -DarchetypeVersion=2.1.2 \
   -DgroupId=com.mycompany \
   -DartifactId=hello \
   -Dversion=1.0&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-text&quot; data-lang=&quot;text&quot;&gt;    &amp;lt;a href=&quot;https://cmoulliard.github.io/assets/images//archetype-creation.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&amp;gt;&amp;lt;img border=&quot;0&quot; height=&quot;279&quot; src=&quot;https://cmoulliard.github.io/assets/images//archetype-creation.png&quot; width=&quot;320&quot;/&amp;gt;&amp;lt;/a&amp;gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;build next the WAB using hello/mvn clean install
and deploy it on Apache Karaf&lt;/p&gt;

&lt;figure&gt;
  &lt;img src=&quot;https://cmoulliard.github.io/assets/images//karaf-gwt2.png&quot; /&gt;
  &lt;figcaption&gt;Fig. 1 : GWT deployed on Apache Karaf&lt;/figcaption&gt;
&lt;/figure&gt;

&lt;p&gt;Verify that the web site is well registered :&lt;/p&gt;

&lt;figure&gt;
  &lt;img src=&quot;https://cmoulliard.github.io/assets/images//web-list.png&quot; /&gt;
  &lt;figcaption&gt;Fig. 2 : Web site deployed on Apache Karaf&lt;/figcaption&gt;
&lt;/figure&gt;

&lt;p&gt;Next, you can navigate to your application in your browser and click on the button to say Hello.&lt;/p&gt;

&lt;figure&gt;
  &lt;img border=&quot;0&quot; height=&quot;225&quot; src=&quot;https://cmoulliard.github.io/assets/images//browser-gwt2.png&quot; width=&quot;320&quot; /&gt;
  &lt;figcaption&gt;Fig. 3 : Hello Message of GWT in the browser&lt;/figcaption&gt;
&lt;/figure&gt;

&lt;p&gt;Remark : A WAB project is nothing more than a WAR excepted it is packaged as a bundle file, that we have removed the WEB-INF/lib dependencies and create a MANIFEST file containing the OSGI metadata of the packages to be imported.&lt;/p&gt;
</description>
            
            <category>google-gwt</category>
            
            <category>pax-web</category>
            
            <category>osgi</category>
            
            <category>servicemix</category>
            
            <category>fuse</category>
            
            <pubDate>Fri, 16 Dec 2011 00:00:00 +0100</pubDate>
            <link>https://cmoulliard.github.io//wab/karaf/gwt/pax-web/war/apache/servicemix/run-google-web-toolkit-2-project-on</link>
            <guid isPermaLink="true">https://cmoulliard.github.io//wab/karaf/gwt/pax-web/war/apache/servicemix/run-google-web-toolkit-2-project-on</guid>
        </item>
        
          
        <item>
            <title>Apache Camel, Cxf, ActiveMQ &amp; ServiceMix at Devoxx</title>
            <description>&lt;p&gt;This year, I get the chance to present 2 talks at the
&lt;a href=&quot;http://www.devoxx.com/display/DV11/Home&quot;&gt;Devoxx&lt;/a&gt; event,&lt;/p&gt;

&lt;figure&gt;
  &lt;img src=&quot;https://cmoulliard.github.io/assets/images/LogoDevoxx150dpi.jpg&quot; /&gt;
&lt;/figure&gt;

&lt;p&gt;one for University Talk and the other for Hands on Lab. With the help of Gert Vanthienen, we took the time to present in more detail what finally we can design as solution, architecture with Apache projects like Camel, CXF, ActiveMQ and ServiceMix and move it into a scalable, high-available platform.&lt;/p&gt;

&lt;p&gt;That was a great challenge as this is not really easy to introduce “integration” which is not so sexy comparing to a Web Development framework, an iPhone or Android application.&lt;/p&gt;

&lt;p&gt;But times are changing and a lot of developers / architects are interested by agile approaches that we develop at Apache foundation.&lt;/p&gt;

&lt;p&gt;With &lt;a href=&quot;http://fusesource.com/products/fuse-ide/&quot;&gt;fuse IDE&lt;/a&gt; tool,&lt;/p&gt;

&lt;figure&gt;
    &lt;img src=&quot;https://cmoulliard.github.io/assets/images/fuse_ide.png&quot; /&gt;
&lt;/figure&gt;

&lt;p&gt;we can now accelerate the creation of a project using Apache Camel. The wysiwig editor and EIPs patterns allow you to quickly create new routes while the runtime editor enable to review existing project. IDE is more than a tool as it allows to run and deploy the routes in, fuse] ESB, Tomcat application servers or locally. The tool is not yet finalized (release 2.1 should be available soon) but it offers a lot of possibilities to facilitate integration projects, tracing of messages (= exchanges) and investigation about time passing through the different processors.&lt;/p&gt;

&lt;p&gt;Integration projects are moving into cloud space and this is what we have presented next with, fuse]Source &lt;a href=&quot;http://fabric.fusesource.org/&quot;&gt;Fabric&lt;/a&gt;. Fabric is not a new hype but a strategy to reduce impact of OSGI dependencies calculation, provisioning of Apache Camel routes on local, remote or cloud instances using Apache Zookeeper as registry of artefacts to be deployed (features, jars, configurations). It offers also elastic services when deploying services into the cloud.&lt;/p&gt;

&lt;figure&gt;
  &lt;img src=&quot;https://cmoulliard.github.io/assets/images/fabric-cloud.png&quot; width=&quot;320&quot; /&gt;&amp;lt;/a&amp;gt;
&lt;/figure&gt;

&lt;p&gt;For those who were not there, here are the links of the presentation like also the hands on lab material that we have used in the afternoon to develop a real Japa Application Project (Spring, JPA, Web) on, fuse] ESB.&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;
    &lt;p&gt;&lt;a href=&quot;http://www.slideshare.net/cmoulliard/devoxx-2011-integrationcamelcxfservicemixactivemq&quot; target=&quot;_blank&quot;&gt;Presentation&lt;/a&gt; : http://www.slideshare.net/cmoulliard/devoxx-2011-integrationcamelcxfservicemixactivemq&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;&lt;a href=&quot;https://github.com/cmoulliard/Devoxx-2011-HandsOnLab&quot; target=&quot;_blank&quot;&gt;Hands on Lab&lt;/a&gt; : https://github.com/cmoulliard/Devoxx-2011-HandsOnLab&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;&lt;a href=&quot;http://fabric.fusesource.org/&quot; target=&quot;_blank&quot;&gt;fusesource Fabric&lt;/a&gt; : http://fabric.fusesource.org/&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;&lt;a href=&quot;http://fusesource.com/&quot; target=&quot;_blank&quot;&gt;fusesource : Leader in Integration OpenSource&lt;/a&gt;&lt;/p&gt;
  &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Remark : The step by guide is available on the github repo like also the skeleton (zip file)&lt;/p&gt;
</description>
            
            <category>camel</category>
            
            <category>cxf</category>
            
            <category>servicemix</category>
            
            <category>devoxx</category>
            
            <category>fuse</category>
            
            <pubDate>Mon, 21 Nov 2011 00:00:00 +0100</pubDate>
            <link>https://cmoulliard.github.io//apache-camel-cxf-activemq-servicemix-at</link>
            <guid isPermaLink="true">https://cmoulliard.github.io//apache-camel-cxf-activemq-servicemix-at</guid>
        </item>
        
          
        <item>
            <title>Talks about Integration with Camel &amp; ESB</title>
            <description>&lt;p&gt;This year, I plan to make some talks about Apache ServiceMix, Apache Camel, apache ActiveMQ and show
how easy it is to build integration solutions with Apache technologies.&lt;/p&gt;

&lt;p&gt;Take free time, a two break hours and joint me during one of the following events :&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;a href=&quot;http://www.parisjug.org/xwiki/bin/view/Meeting/20110510&quot;&gt;ParisJug - 10 May 2011&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;http://www.bejug.org/confluenceBeJUG/display/BeJUG/Integration+with+Apache+Camel+and+ESB&quot;&gt;BeJug - 9 June 2011&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;b&gt;Agenda&lt;/b&gt;&lt;/p&gt;

&lt;p&gt;The purpose of this presentation/demo is to show you how easy it is to design integration between systems (web services, file systems, database, queue engine)
using the projects Camel, ServiceMix and ActiveMQ of the foundation Apache.&lt;/p&gt;

&lt;p&gt;&lt;b&gt;First part :&lt;/b&gt;&lt;/p&gt;

&lt;p&gt;Presentation of the projects Camel, ServiceMix and ActiveMq&lt;br /&gt;Description of the topologies proposed : messaging, osgi, web, …
High-availability and scalability (ServiceMix and/or ActiveMQ)&lt;/p&gt;

&lt;p&gt;&lt;b&gt;Second part :&lt;/b&gt;&lt;/p&gt;

&lt;p&gt;Making of of the demo solution&lt;br /&gt;Transpose it into camel DSL language
Coding of WebService (using Apache CXF), DAO and Persistence layer (Spring + Hibernate JPA) and Web layer (Apache Wicket),
Development of Camel routes, Packaging and Deployment. Demo&lt;/p&gt;
</description>
            
            <category>integration</category>
            
            <category>camel</category>
            
            <category>fuse</category>
            
            <pubDate>Thu, 24 Feb 2011 00:00:00 +0100</pubDate>
            <link>https://cmoulliard.github.io//talks-about-integration-with-camel-and</link>
            <guid isPermaLink="true">https://cmoulliard.github.io//talks-about-integration-with-camel-and</guid>
        </item>
        
          
        <item>
            <title>Measure elapsed time with Camel</title>
            <description>&lt;p&gt;With the last version of Apache Camel, we provide a
&lt;a href=&quot;ttp://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/management/EventNotifierSupport.java?view=markup&quot;&gt;event notifier support class&lt;/a&gt; which allow to keep information about what happen on Exchange, Route and Endpoint. One of the benefit of this class is that you can easily audit messages created in Camel Routes, collect information and report that in log by example.&lt;/p&gt;

&lt;p&gt;When developing an application, it is very important to calculate/measure elapsed time on the platform to find which part of your code, processor or system integrated which is the bad duck and must be improved.&lt;/p&gt;

&lt;p&gt;In three steps, I would show you How to enable this mechanism to report :&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;Time elapsed to call an endpoint (could be another camel route, web service, …)&lt;/li&gt;
  &lt;li&gt;Time elapsed on the route exchange&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;STEP 1 - Create a Class implementing the EventNotifierSupport&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-java&quot; data-lang=&quot;java&quot;&gt;&lt;span class=&quot;kd&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;AuditEventNotifier&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;extends&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;EventNotifierSupport&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;

    &lt;span class=&quot;kd&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;notify&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nc&quot;&gt;EventObject&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;event&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;throws&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;Exception&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
        &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;event&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;instanceof&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;ExchangeSentEvent&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
            &lt;span class=&quot;nc&quot;&gt;ExchangeSentEvent&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;sent&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nc&quot;&gt;ExchangeSentEvent&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;event&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;
            &lt;span class=&quot;n&quot;&gt;log&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;info&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;&amp;gt;&amp;gt;&amp;gt; Took &quot;&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;sent&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;getTimeTaken&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&quot; millis to send to external system : &quot;&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;sent&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;getEndpoint&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;());&lt;/span&gt;
        &lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;

        &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;event&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;instanceof&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;ExchangeCompletedEvent&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
            &lt;span class=&quot;nc&quot;&gt;ExchangeCompletedEvent&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;exchangeCompletedEvent&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nc&quot;&gt;ExchangeCompletedEvent&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;event&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;
            &lt;span class=&quot;nc&quot;&gt;Exchange&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;exchange&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;exchangeCompletedEvent&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;getExchange&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;();&lt;/span&gt;
            &lt;span class=&quot;nc&quot;&gt;String&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;routeId&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;exchange&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;getFromRouteId&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;();&lt;/span&gt;
            &lt;span class=&quot;nc&quot;&gt;Date&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;created&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;((&lt;/span&gt;&lt;span class=&quot;nc&quot;&gt;ExchangeCompletedEvent&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;event&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;).&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;getExchange&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;().&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;getProperty&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nc&quot;&gt;Exchange&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;CREATED_TIMESTAMP&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;Date&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;class&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;
            &lt;span class=&quot;c1&quot;&gt;// calculate elapsed time&lt;/span&gt;
            &lt;span class=&quot;nc&quot;&gt;Date&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;now&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;Date&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;();&lt;/span&gt;
            &lt;span class=&quot;kt&quot;&gt;long&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;elapsed&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;now&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;getTime&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;created&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;getTime&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;();&lt;/span&gt;
            &lt;span class=&quot;n&quot;&gt;log&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;info&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;&amp;gt;&amp;gt;&amp;gt; Took &quot;&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;elapsed&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&quot; millis for the exchange on the route : &quot;&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;routeId&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;
        &lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;
    &lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;

    &lt;span class=&quot;kd&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;boolean&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;isEnabled&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nc&quot;&gt;EventObject&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;event&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
        &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;kc&quot;&gt;true&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;

    &lt;span class=&quot;kd&quot;&gt;protected&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;doStart&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;throws&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;Exception&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;

        &lt;span class=&quot;c1&quot;&gt;// filter out unwanted events&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;setIgnoreCamelContextEvents&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kc&quot;&gt;true&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;setIgnoreServiceEvents&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kc&quot;&gt;true&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;setIgnoreRouteEvents&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kc&quot;&gt;true&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;setIgnoreExchangeCreatedEvent&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kc&quot;&gt;true&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;setIgnoreExchangeCompletedEvent&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kc&quot;&gt;false&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;setIgnoreExchangeFailedEvents&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kc&quot;&gt;true&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;setIgnoreExchangeRedeliveryEvents&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kc&quot;&gt;true&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;setIgnoreExchangeSentEvents&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kc&quot;&gt;false&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;
    &lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;

    &lt;span class=&quot;kd&quot;&gt;protected&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;doStop&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;throws&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;Exception&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
        &lt;span class=&quot;c1&quot;&gt;// noop&lt;/span&gt;
    &lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;Not really complicated and the code is explicit. Check the doStart() method to enable/disable the events for which you would like to gather information.&lt;/p&gt;

&lt;p&gt;This example uses only Exchange.CREATED_TIMESTAMP property but the next version of Camel 2.7.0 will provide you the property exchange.RECEIVED_TIMESTAMP and so you will be able to calculate more easily the time spend by the exchange to call the different processors till it arrives at the end of the route.&lt;br /&gt;&lt;br /&gt;This example collects Date information but you can imagine to use this mechanism to check if your route processes the message according to SLA, ….&lt;/p&gt;

&lt;p&gt;STEP 2 - Instantiate the bean in Camel Spring XML&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-xml&quot; data-lang=&quot;xml&quot;&gt;&lt;span class=&quot;c&quot;&gt;&amp;lt;!-- Event Notifier --&amp;gt;&lt;/span&gt;
&lt;span class=&quot;nt&quot;&gt;&amp;lt;bean&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;id=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;auditEventNotifier&quot;&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;class=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;com.sfr.audit.AuditEventNotifier&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;
&lt;span class=&quot;nt&quot;&gt;&amp;lt;/bean&amp;gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;By adding this bean definition, Camel will automatically register it to the CamelContext created.&lt;/p&gt;

&lt;p&gt;STEP 3 - Collect info from nto the log&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-text&quot; data-lang=&quot;text&quot;&gt;18:10:46,060 | INFO  | tp1238469515-285 | AuditEventNotifier               | ?                                   ? | 68 - org.apache.camel.camel-core - 2.6.0.fuse-00-00 | &amp;gt;&amp;gt;&amp;gt; Took 3 millis for the exchange on the route : mock-HTTP-Server
18:10:46,062 | INFO  | tp2056154542-293 | AuditEventNotifier               | ?                                   ? | 68 - org.apache.camel.camel-core - 2.6.0.fuse-00-00 | &amp;gt;&amp;gt;&amp;gt; Took 25 millis to send to external system : Endpoint[http://localhost:9191/sis]
18:10:46,077 | INFO  | tp2056154542-293 | AuditEventNotifier               | ?                                   ? | 68 - org.apache.camel.camel-core - 2.6.0.fuse-00-00 | &amp;gt;&amp;gt;&amp;gt; Took 103 millis for the exchange on the route : ws-to-sis&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;
</description>
            
            <category>camel</category>
            
            <category>event-notifier</category>
            
            <category>fuse</category>
            
            <pubDate>Wed, 23 Feb 2011 00:00:00 +0100</pubDate>
            <link>https://cmoulliard.github.io//measure-elapsed-time-with-camel</link>
            <guid isPermaLink="true">https://cmoulliard.github.io//measure-elapsed-time-with-camel</guid>
        </item>
        
          
        <item>
            <title>Secure Web Services - WS-Security</title>
            <description>&lt;p&gt;Security is one of the important key in the success of a IT project but most of the time only user authentication or data encryption are taken into account. So security of the application is often not adressed or leave aside due to complexity of the implementation.
One of the reason explaining this situation comes from the fact that solutions or frameworks proposed to secure an application are difficult to configure and maintain. And this remark prevalls over the specification WS-Security.&lt;/p&gt;

&lt;p&gt;In large company having deployed WS-Services to allow intra or inter connection between applications, Web application authentication with HTTPS protocol mechanisms are use to secure platforms. That means that users discovering the credentials used to connect to the web server can potentially have access to the services of the company.&lt;/p&gt;

&lt;p&gt;WS-Security offers a way to authenticate the user connected to a web service or allow also a user to be trusted on the web server it is connected. This mechanism is interesting because it reinforce the security but provides also a way to restrict access to unauthorized users to web services.&lt;/p&gt;

&lt;p&gt;Apache Camel and CXF frameworks offers a simplify way to implement this with only few lines of code and spring beans definition. Let’s see that in action :&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;STEP 1&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;We only need to use JAAS api to authenticate the user using the following java package “javax.security.auth.callback” and the project
&lt;a href=&quot;http://ws.apache.org/wss4j/&quot;&gt;WS4J&lt;/a&gt; of Apache. Here is a simple example authenticate a user using a list and the password provided.&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-java&quot; data-lang=&quot;java&quot;&gt;&lt;span class=&quot;kn&quot;&gt;package&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;org.apache.camel.example.reportincident&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;

&lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;java.io.IOException&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;java.util.HashMap&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;java.util.Map&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;javax.security.auth.callback.Callback&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;javax.security.auth.callback.CallbackHandler&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;javax.security.auth.callback.UnsupportedCallbackException&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;

&lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;org.apache.ws.security.WSPasswordCallback&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;

&lt;span class=&quot;cm&quot;&gt;/**
 * Callback handler to handle passwords
 */&lt;/span&gt;
&lt;span class=&quot;kd&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;UTPasswordCallback&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;implements&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;CallbackHandler&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;

    &lt;span class=&quot;kd&quot;&gt;private&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;Map&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;nc&quot;&gt;String&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;String&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;passwords&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;HashMap&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;nc&quot;&gt;String&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;String&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;gt;();&lt;/span&gt;

    &lt;span class=&quot;kd&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;UTPasswordCallback&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;passwords&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;put&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;claus&quot;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&quot;sualc&quot;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;passwords&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;put&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;charles&quot;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&quot;selrahc&quot;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;passwords&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;put&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;james&quot;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&quot;semaj&quot;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;passwords&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;put&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;abcd&quot;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&quot;dcba&quot;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;
    &lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;

    &lt;span class=&quot;cm&quot;&gt;/**
     * Here, we attempt to get the password from the private alias/passwords map.
     */&lt;/span&gt;
    &lt;span class=&quot;kd&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;handle&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nc&quot;&gt;Callback&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;[]&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;callbacks&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;throws&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;IOException&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;UnsupportedCallbackException&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;

        &lt;span class=&quot;nc&quot;&gt;String&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;user&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&quot;&quot;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;

        &lt;span class=&quot;k&quot;&gt;for&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nc&quot;&gt;Callback&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;callback&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;callbacks&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
            &lt;span class=&quot;nc&quot;&gt;WSPasswordCallback&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;pc&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nc&quot;&gt;WSPasswordCallback&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;callback&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;
            &lt;span class=&quot;n&quot;&gt;user&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;pc&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;getIdentifier&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;();&lt;/span&gt;

            &lt;span class=&quot;nc&quot;&gt;String&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;pass&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;passwords&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;get&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;user&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;
            &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;pass&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;!=&lt;/span&gt; &lt;span class=&quot;kc&quot;&gt;null&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
                &lt;span class=&quot;n&quot;&gt;pc&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;setPassword&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;pass&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;
                &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;
            &lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;
        &lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;

        &lt;span class=&quot;c1&quot;&gt;// Password not found&lt;/span&gt;
        &lt;span class=&quot;k&quot;&gt;throw&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;IOException&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;Password does not exist for the user : &quot;&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;user&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;
    &lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;

    &lt;span class=&quot;cm&quot;&gt;/**
     * Add an alias/password pair to the callback mechanism.
     */&lt;/span&gt;
    &lt;span class=&quot;kd&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;setAliasPassword&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nc&quot;&gt;String&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;alias&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;String&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;password&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;passwords&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;put&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;alias&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;password&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;
    &lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;&lt;strong&gt;STEP 2&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This is here that the magic will operates as we will use Spring beans definition with Apache Web Services Framework - &lt;a href=&quot;&amp;quot;http://cxf.apache.org/&quot;&gt;CXF&lt;/a&gt; and Apache &lt;a href=&quot;http://camel.apache.org/cxf.html&quot;&gt;Camel&lt;/a&gt; to expose the web service&lt;/p&gt;

&lt;p&gt;Instantiate your WS4J bean&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-xml&quot; data-lang=&quot;xml&quot;&gt;    &lt;span class=&quot;nt&quot;&gt;&amp;lt;bean&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;id=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;wss4jInInterceptor&quot;&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;class=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;
        
        &lt;span class=&quot;nt&quot;&gt;&amp;lt;constructor-arg&amp;gt;&amp;lt;/constructor-arg&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;nt&quot;&gt;&amp;lt;/bean&amp;gt;&lt;/span&gt;    &lt;span class=&quot;nt&quot;&gt;&amp;lt;bean&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;id=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;wss4jInInterceptor&quot;&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;class=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;
        &lt;span class=&quot;nt&quot;&gt;&amp;lt;constructor-arg&amp;gt;&lt;/span&gt;
            &lt;span class=&quot;nt&quot;&gt;&amp;lt;map&amp;gt;&lt;/span&gt;
                &lt;span class=&quot;nt&quot;&gt;&amp;lt;entry&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;key=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;action&quot;&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;value=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;UsernameToken Timestamp&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;
                    &lt;span class=&quot;nt&quot;&gt;&amp;lt;entry&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;key=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;passwordType&quot;&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;value=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;PasswordDigest&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;
                        &lt;span class=&quot;nt&quot;&gt;&amp;lt;entry&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;key=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;passwordCallbackClass&quot;&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;value=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;org.apache.camel.example.reportincident.UTPasswordCallback&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;
                            &lt;span class=&quot;nt&quot;&gt;&amp;lt;/entry&amp;gt;&lt;/span&gt;
                    &lt;span class=&quot;nt&quot;&gt;&amp;lt;/entry&amp;gt;&lt;/span&gt;
                &lt;span class=&quot;nt&quot;&gt;&amp;lt;/entry&amp;gt;&lt;/span&gt;
            &lt;span class=&quot;nt&quot;&gt;&amp;lt;/map&amp;gt;&lt;/span&gt;
            &lt;span class=&quot;nt&quot;&gt;&amp;lt;/constructor-arg&amp;gt;&lt;/span&gt;
        &lt;span class=&quot;nt&quot;&gt;&amp;lt;/bean&amp;gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;Add it as an interceptor to CXF to allow CXF to authenticate the user using the credentials provided in the SOAP header definition.&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-xml&quot; data-lang=&quot;xml&quot;&gt;&lt;span class=&quot;nt&quot;&gt;&amp;lt;cxf:cxfendpoint&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;id=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;reportIncident&quot;&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;address=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;http://localhost:9080/camel-example-reportincident/webservices/incident&quot;&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;wsdlurl=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;etc/report_incident.wsdl&quot;&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;serviceclass=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;org.apache.camel.example.reportincident.ReportIncidentEndpoint&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;        
        &lt;span class=&quot;nt&quot;&gt;&amp;lt;cxf:ininterceptors&amp;gt;&lt;/span&gt;
            &lt;span class=&quot;nt&quot;&gt;&amp;lt;ref&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;bean=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;loggingInInterceptor&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;
                &lt;span class=&quot;nt&quot;&gt;&amp;lt;ref&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;bean=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;wss4jInInterceptor&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&amp;lt;/ref&amp;gt;&lt;/span&gt;
                
                &lt;span class=&quot;nt&quot;&gt;&amp;lt;cxf:outinterceptors&amp;gt;&lt;/span&gt;
                    &lt;span class=&quot;nt&quot;&gt;&amp;lt;ref&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;bean=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;loggingOutInterceptor&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;c&quot;&gt;&amp;lt;!--  &amp;lt;ref bean=&quot;wss4jOutInterceptor&quot;&amp;gt; --&amp;gt;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;lt;/ref&amp;gt;&lt;/span&gt;
                    &lt;span class=&quot;nt&quot;&gt;&amp;lt;/cxf:outinterceptors&amp;gt;&lt;/span&gt;
                
                &lt;span class=&quot;nt&quot;&gt;&amp;lt;cxf:cxfendpoint&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;id=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;reportIncident&quot;&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;address=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;http://localhost:9080/camel-example-reportincident/webservices/incident&quot;&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;wsdlurl=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;etc/report_incident.wsdl&quot;&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;serviceclass=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;org.apache.camel.example.reportincident.ReportIncidentEndpoint&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;
                    &lt;span class=&quot;nt&quot;&gt;&amp;lt;cxf:ininterceptors&amp;gt;&amp;lt;/pre&amp;gt;&lt;/span&gt;
    Here is an example of the SOAP header
    &lt;span class=&quot;nt&quot;&gt;&amp;lt;pre&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;name=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;code&quot;&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;class=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;xml&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&amp;lt;soap:envelope&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;soap=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;http://schemas.xmlsoap.org/soap/envelope/&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;
        &lt;span class=&quot;nt&quot;&gt;&amp;lt;soap:header&amp;gt;&lt;/span&gt;
            &lt;span class=&quot;nt&quot;&gt;&amp;lt;wsse:security&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;wsse=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd&quot;&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;mustunderstand=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;1&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;
                
                &lt;span class=&quot;nt&quot;&gt;&amp;lt;wsu:timestamp&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;wsu=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd&quot;&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;id=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;Timestamp-2&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;
                    
                    &lt;span class=&quot;nt&quot;&gt;&amp;lt;wsu:created&amp;gt;&lt;/span&gt;2010-09-24T07:31:06.308Z&lt;span class=&quot;nt&quot;&gt;&amp;lt;/wsu:created&amp;gt;&lt;/span&gt;                    
                    &lt;span class=&quot;nt&quot;&gt;&amp;lt;wsu:expires&amp;gt;&lt;/span&gt;2010-09-24T07:36:06.308Z&lt;span class=&quot;nt&quot;&gt;&amp;lt;/wsu:expires&amp;gt;&lt;/span&gt;
                    &lt;span class=&quot;nt&quot;&gt;&amp;lt;/wsu:timestamp&amp;gt;&lt;/span&gt;
                
                &lt;span class=&quot;nt&quot;&gt;&amp;lt;wsse:usernametoken&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;wsse=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd&quot;&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;wsu=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd&quot;&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;id=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;UsernameToken-1&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;
                    
                    &lt;span class=&quot;nt&quot;&gt;&amp;lt;wsse:username&amp;gt;&lt;/span&gt;charles&lt;span class=&quot;nt&quot;&gt;&amp;lt;/wsse:username&amp;gt;&lt;/span&gt;                    
                    &lt;span class=&quot;nt&quot;&gt;&amp;lt;wsse:password&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;type=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordDigest&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;KoNvkEh9jwgvxTfcTza6+kHkKNI=&lt;span class=&quot;nt&quot;&gt;&amp;lt;/wsse:password&amp;gt;&lt;/span&gt;                    
                    &lt;span class=&quot;nt&quot;&gt;&amp;lt;wsse:nonce&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;encodingtype=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;havIKNKvlRuatlp3CncMKw==&lt;span class=&quot;nt&quot;&gt;&amp;lt;/wsse:nonce&amp;gt;&lt;/span&gt;                    
                    &lt;span class=&quot;nt&quot;&gt;&amp;lt;wsu:created&amp;gt;&lt;/span&gt;2010-09-24T07:31:06.306Z&lt;span class=&quot;nt&quot;&gt;&amp;lt;/wsu:created&amp;gt;&lt;/span&gt;
                    &lt;span class=&quot;nt&quot;&gt;&amp;lt;/wsse:usernametoken&amp;gt;&lt;/span&gt;
                &lt;span class=&quot;nt&quot;&gt;&amp;lt;/wsse:security&amp;gt;&lt;/span&gt;
            &lt;span class=&quot;nt&quot;&gt;&amp;lt;/soap:header&amp;gt;&lt;/span&gt;
        
        &lt;span class=&quot;nt&quot;&gt;&amp;lt;soap:body&amp;gt;&lt;/span&gt;
            &lt;span class=&quot;nt&quot;&gt;&amp;lt;ns2:inputreportincident&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;ns2=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;http://reportincident.example.camel.apache.org&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;
                &lt;span class=&quot;nt&quot;&gt;&amp;lt;incidentid&amp;gt;&lt;/span&gt;222&lt;span class=&quot;nt&quot;&gt;&amp;lt;/incidentid&amp;gt;&lt;/span&gt;
                
                &lt;span class=&quot;nt&quot;&gt;&amp;lt;incidentdate&amp;gt;&lt;/span&gt;2010-07-14&lt;span class=&quot;nt&quot;&gt;&amp;lt;/incidentdate&amp;gt;&lt;/span&gt;
                &lt;span class=&quot;nt&quot;&gt;&amp;lt;givenname&amp;gt;&lt;/span&gt;Charles&lt;span class=&quot;nt&quot;&gt;&amp;lt;/givenname&amp;gt;&lt;/span&gt;
                &lt;span class=&quot;nt&quot;&gt;&amp;lt;familyname&amp;gt;&lt;/span&gt;Moulliard&lt;span class=&quot;nt&quot;&gt;&amp;lt;/familyname&amp;gt;&lt;/span&gt;
                &lt;span class=&quot;nt&quot;&gt;&amp;lt;summary&amp;gt;&lt;/span&gt;Bla&lt;span class=&quot;nt&quot;&gt;&amp;lt;/summary&amp;gt;&lt;/span&gt;
                &lt;span class=&quot;nt&quot;&gt;&amp;lt;details&amp;gt;&lt;/span&gt;Bla bla&lt;span class=&quot;nt&quot;&gt;&amp;lt;/details&amp;gt;&lt;/span&gt;
                &lt;span class=&quot;nt&quot;&gt;&amp;lt;email&amp;gt;&lt;/span&gt;cmoulliard@apache.org&lt;span class=&quot;nt&quot;&gt;&amp;lt;/email&amp;gt;&lt;/span&gt;
                &lt;span class=&quot;nt&quot;&gt;&amp;lt;phone&amp;gt;&lt;/span&gt;0011 22 33 44&lt;span class=&quot;nt&quot;&gt;&amp;lt;/phone&amp;gt;&lt;/span&gt;
                &lt;span class=&quot;nt&quot;&gt;&amp;lt;/ns2:inputreportincident&amp;gt;&lt;/span&gt;
            &lt;span class=&quot;nt&quot;&gt;&amp;lt;/soap:body&amp;gt;&lt;/span&gt;
        &lt;span class=&quot;nt&quot;&gt;&amp;lt;/soap:envelope&amp;gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;And finally, declare your camel route using the web services&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-xml&quot; data-lang=&quot;xml&quot;&gt;&lt;span class=&quot;nt&quot;&gt;&amp;lt;camel:camelcontext&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;id=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;camel&quot;&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;xmlns=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;http://camel.apache.org/schema/spring/camel-spring.xsd&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;
        
&lt;span class=&quot;nt&quot;&gt;&amp;lt;camelcontext&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;id=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;camel&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;
  &lt;span class=&quot;nt&quot;&gt;&amp;lt;route&amp;gt;&lt;/span&gt;
      &lt;span class=&quot;nt&quot;&gt;&amp;lt;from&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;uri=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;cxf:bean:reportIncident&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;
        &lt;span class=&quot;nt&quot;&gt;&amp;lt;convertbodyto&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;type=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;org.apache.camel.example.reportincident.InputReportIncident&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;

        &lt;span class=&quot;nt&quot;&gt;&amp;lt;setheader&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;headername=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;CamelFileName&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;
          &lt;span class=&quot;nt&quot;&gt;&amp;lt;method&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;bean=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;filenameGenerator&quot;&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;method=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;generateFilename&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;
        &lt;span class=&quot;nt&quot;&gt;&amp;lt;/method&amp;gt;&lt;/span&gt;

        &lt;span class=&quot;nt&quot;&gt;&amp;lt;to&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;uri=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;velocity:etc/MailBody.vm&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;
        &lt;span class=&quot;nt&quot;&gt;&amp;lt;to&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;uri=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;file://target/subfolder&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;
          &lt;span class=&quot;nt&quot;&gt;&amp;lt;transform&amp;gt;&lt;/span&gt;
            &lt;span class=&quot;nt&quot;&gt;&amp;lt;method&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;bean=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;myBean&quot;&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;method=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;getOK&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;
            &lt;span class=&quot;nt&quot;&gt;&amp;lt;/method&amp;gt;&lt;/span&gt;
          &lt;span class=&quot;nt&quot;&gt;&amp;lt;/transform&amp;gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;To play with the example, follow this
    &lt;a href=&quot;https://svn.apache.org/repos/asf/camel/trunk/examples/camel-example-reportincident-ws-security-osgi/&quot;&gt;example of Camel CXF&lt;/a&gt; and enjoy it !&lt;/p&gt;
</description>
            
            <category>webservice</category>
            
            <category>ws-security</category>
            
            <category>integration</category>
            
            <category>fuse</category>
            
            <pubDate>Fri, 24 Sep 2010 00:00:00 +0200</pubDate>
            <link>https://cmoulliard.github.io//secure-web-services-ws-security</link>
            <guid isPermaLink="true">https://cmoulliard.github.io//secure-web-services-ws-security</guid>
        </item>
        
          
        <item>
            <title>fuse Community Day - Paris - 14th of October</title>
            <description>&lt;div class=&quot;post&quot;&gt;
    The, fuse] Community Day will take place the 14th of October in Paris. Feel free to sign up
    &lt;a href=&quot;http://form.fusesource.com/forms/registerparis2010&quot;&gt;here&lt;/a&gt; and come to see Claus Ibsen, Guillaume Nodet, Rob Davies and myself presenting news about OSGI, SOA, Camel and ESB and some of our customers showing that in action (Lionel Cons - CERN, Cédric Bourgeois - Atos Worldwide, Jean Folly-Kpodar - Osmocom).
&lt;/div&gt;
</description>
            
            <category>community-day</category>
            
            <category>fuse</category>
            
            <pubDate>Thu, 23 Sep 2010 00:00:00 +0200</pubDate>
            <link>https://cmoulliard.github.io//fuse-community-day-paris-14th-of</link>
            <guid isPermaLink="true">https://cmoulliard.github.io//fuse-community-day-paris-14th-of</guid>
        </item>
        
          
        <item>
            <title>Parse / Format fixed length message with camel-bindy</title>
            <description>&lt;p&gt;Camel-bindy which is a data formatting tool to parse / format non XML message will be enriched in the next camel release 2.4. This new version will allow to work with Fixed Length message.&lt;br /&gt;&lt;br /&gt;A Fixed Length message as its name mention it contains data positioned at a fixed position which is by far different from Comma Separate Value format where we use a separator.&lt;/p&gt;

&lt;p&gt;So, you will be able able to model your message like that :&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-java&quot; data-lang=&quot;java&quot;&gt;&lt;span class=&quot;nd&quot;&gt;@FixedLengthRecord&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;length&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;60&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;paddingChar&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;sc&quot;&gt;' '&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;kd&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;static&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;Order&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;

    &lt;span class=&quot;nd&quot;&gt;@DataField&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;pos&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;length&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;private&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;orderNr&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;nd&quot;&gt;@DataField&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;pos&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;3&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;length&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;private&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;String&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;clientNr&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;nd&quot;&gt;@DataField&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;pos&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;5&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;length&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;9&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;private&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;String&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;firstName&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;nd&quot;&gt;@DataField&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;pos&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;14&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;length&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;5&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;align&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&quot;L&quot;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;private&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;String&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;lastName&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;nd&quot;&gt;@DataField&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;pos&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;19&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;length&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;4&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;private&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;String&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;instrumentCode&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;nd&quot;&gt;@DataField&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;pos&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;23&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;length&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;10&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;private&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;String&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;instrumentNumber&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;nd&quot;&gt;@DataField&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;pos&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;33&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;length&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;3&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;private&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;String&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;orderType&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;nd&quot;&gt;@DataField&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;pos&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;36&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;length&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;5&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;private&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;String&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;instrumentType&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;nd&quot;&gt;@DataField&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;pos&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;41&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;precision&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;length&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;7&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;private&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;BigDecimal&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;amount&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;nd&quot;&gt;@DataField&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;pos&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;48&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;length&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;3&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;private&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;String&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;currency&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;nd&quot;&gt;@DataField&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;pos&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;51&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;length&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;10&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;pattern&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&quot;dd-MM-yyyy&quot;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;private&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;Date&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;orderDate&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;to parse/format the following text :&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-text&quot; data-lang=&quot;text&quot;&gt;&quot;10A9 PaulineM ISINXD12345678BUYShare2500.45USD01-08-2009&quot;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;The tool allows to add ‘padding’ characters and to align “LEFT” or “ RIGHT” the string in the field.&lt;/p&gt;

&lt;p&gt;More info are available on the wiki web page of camel-bindy : http://camel.apache.org/bindy.html&lt;/p&gt;
</description>
            
            <category>camel</category>
            
            <category>bindy</category>
            
            <category>dataformat</category>
            
            <category>fuse</category>
            
            <pubDate>Fri, 18 Jun 2010 00:00:00 +0200</pubDate>
            <link>https://cmoulliard.github.io//fixed%20length/camel/camel-bindy/apache/parse-format-fixed-length-message-with</link>
            <guid isPermaLink="true">https://cmoulliard.github.io//fixed%20length/camel/camel-bindy/apache/parse-format-fixed-length-message-with</guid>
        </item>
        
          
        <item>
            <title>Run Camel route in ServiceMix 3.3.x</title>
            <description>&lt;p&gt;Even if Apache ServiceMix (ESB) was mainly designed as a JBI container, it is perfectly possible to use camel routes and camel components (bindy, file, jms, …) on this platform.
This allows by example to :&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;Combine JBI binding components or Services with Camel routes,&lt;/li&gt;
  &lt;li&gt;Use a camel component when the binding component does not exist,&lt;/li&gt;
  &lt;li&gt;Deploy camel as Service Unit in Service Assembly&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Here is a small example showing that in action. The creation of the project is very simple as you have to create a Service Unit. If you work with maven, you can use the servicemix plugin which will allow to create the maven project. Otherwise, you can create the maven structure manually.To be able to deploy camel next, you must create a Service Assembly (= SA) who will include the Service Unit.
Don’t be afraid and &lt;a href=&quot;http://servicemix.apache.org/2-beginner-using-maven-to-develop-jbi-applications.html&quot;&gt;follow the tutorial described here&lt;/a&gt; for that part of the work.&lt;/p&gt;

&lt;p&gt;When the project is ready, you create a camel-context.xml file in the directory src/main/resources. This file which is a spring xml file will contain the camel routes + beans definitions or will point to your packages if you prefer to code your routes using Camel Java DSL language instead of Spring DSL language.Remark : in my example, I use Spring DSL language.The route is very basic and will create a message containing the text “Hello World from SMX3!” as body value. The message is copied in an activemq queue called “in”. A second route take the messages and send it to the log. The log message is readable from the console where ServiceMix 3.3.x has been started.In the Spring file, you must add the camel bean “org.apache.camel.component.jms.JmsComponent” definition to instantiate a connection factory to the queueing engine. The broker is created and started at the launch of ServiceMix3 so you don’t need to do anything else here !&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-xml&quot; data-lang=&quot;xml&quot;&gt;&lt;span class=&quot;nt&quot;&gt;&amp;lt;beans&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;xmlns=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;http://www.springframework.org/schema/beans&quot;&lt;/span&gt;       &lt;span class=&quot;na&quot;&gt;xmlns:xsi=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;http://www.w3.org/2001/XMLSchema-instance&quot;&lt;/span&gt;       &lt;span class=&quot;na&quot;&gt;xsi:schemaLocation=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;
       http://www.springframework.org/schema/beans
       http://www.springframework.org/schema/beans/spring-beans.xsd       http://camel.apache.org/schema/spring
       http://camel.apache.org/schema/spring/camel-spring.xsd&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;
       
       &lt;span class=&quot;nt&quot;&gt;&amp;lt;bean&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;id=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;activemq&quot;&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;class=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;org.apache.camel.component.jms.JmsComponent&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;        
          &lt;span class=&quot;nt&quot;&gt;&amp;lt;property&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;name=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;connectionFactory&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;
            &lt;span class=&quot;nt&quot;&gt;&amp;lt;bean&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;class=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;org.apache.activemq.ActiveMQConnectionFactory&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;
                &lt;span class=&quot;nt&quot;&gt;&amp;lt;property&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;name=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;brokerURL&quot;&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;value=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;tcp://localhost:61616&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;/&amp;gt;&lt;/span&gt;
            &lt;span class=&quot;nt&quot;&gt;&amp;lt;/bean&amp;gt;&lt;/span&gt;
          &lt;span class=&quot;nt&quot;&gt;&amp;lt;/property&amp;gt;&lt;/span&gt;
        &lt;span class=&quot;nt&quot;&gt;&amp;lt;/bean&amp;gt;&lt;/span&gt;
        
       &lt;span class=&quot;nt&quot;&gt;&amp;lt;camelContext&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;xmlns=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;http://camel.apache.org/schema/spring&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;
        &lt;span class=&quot;nt&quot;&gt;&amp;lt;package&amp;gt;&lt;/span&gt;org.apache.servicemix.samples&lt;span class=&quot;nt&quot;&gt;&amp;lt;/package&amp;gt;&lt;/span&gt;
         
        &lt;span class=&quot;nt&quot;&gt;&amp;lt;route&amp;gt;&lt;/span&gt;
            &lt;span class=&quot;nt&quot;&gt;&amp;lt;from&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;uri=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;timer:myTimerEvent?fixedRate=true&amp;amp;amp;period=15000&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;/&amp;gt;&lt;/span&gt;           
            &lt;span class=&quot;nt&quot;&gt;&amp;lt;setBody&amp;gt;&lt;/span&gt;
                &lt;span class=&quot;nt&quot;&gt;&amp;lt;constant&amp;gt;&lt;/span&gt;Hello World from SMX3 !&lt;span class=&quot;nt&quot;&gt;&amp;lt;/constant&amp;gt;&lt;/span&gt;
            &lt;span class=&quot;nt&quot;&gt;&amp;lt;/setBody&amp;gt;&lt;/span&gt;           
            &lt;span class=&quot;nt&quot;&gt;&amp;lt;to&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;uri=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;activemq:queue:in&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;/&amp;gt;&lt;/span&gt;
            &lt;span class=&quot;nt&quot;&gt;&amp;lt;/route&amp;gt;&lt;/span&gt;
         
        &lt;span class=&quot;nt&quot;&gt;&amp;lt;route&amp;gt;&lt;/span&gt;
            &lt;span class=&quot;nt&quot;&gt;&amp;lt;from&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;uri=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;activemq:queue:in&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;/&amp;gt;&lt;/span&gt;           
            &lt;span class=&quot;nt&quot;&gt;&amp;lt;to&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;uri=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;log:org.apache.servicemix.samples.camel.ExampleCamelRoute&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;/&amp;gt;&lt;/span&gt;
            &lt;span class=&quot;nt&quot;&gt;&amp;lt;/route&amp;gt;&lt;/span&gt;
        &lt;span class=&quot;nt&quot;&gt;&amp;lt;/camelContext&amp;gt;&lt;/span&gt;
     &lt;span class=&quot;nt&quot;&gt;&amp;lt;/beans&amp;gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;To allow Camel to work with its jms component, the following dependency must be added in the pom of the camel-su.&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-xml&quot; data-lang=&quot;xml&quot;&gt;&lt;span class=&quot;nt&quot;&gt;&amp;lt;dependencies&amp;gt;&lt;/span&gt;
  &lt;span class=&quot;nt&quot;&gt;&amp;lt;dependency&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;nt&quot;&gt;&amp;lt;groupId&amp;gt;&lt;/span&gt;org.apache.camel&lt;span class=&quot;nt&quot;&gt;&amp;lt;/groupId&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;nt&quot;&gt;&amp;lt;artifactId&amp;gt;&lt;/span&gt;camel-core&lt;span class=&quot;nt&quot;&gt;&amp;lt;/artifactId&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;nt&quot;&gt;&amp;lt;version&amp;gt;&lt;/span&gt;2.2.0&lt;span class=&quot;nt&quot;&gt;&amp;lt;/version&amp;gt;&lt;/span&gt;
  &lt;span class=&quot;nt&quot;&gt;&amp;lt;/dependency&amp;gt;&lt;/span&gt;
  &lt;span class=&quot;nt&quot;&gt;&amp;lt;dependency&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;nt&quot;&gt;&amp;lt;groupId&amp;gt;&lt;/span&gt;org.apache.camel&lt;span class=&quot;nt&quot;&gt;&amp;lt;/groupId&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;nt&quot;&gt;&amp;lt;artifactId&amp;gt;&lt;/span&gt;camel-spring&lt;span class=&quot;nt&quot;&gt;&amp;lt;/artifactId&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;nt&quot;&gt;&amp;lt;version&amp;gt;&lt;/span&gt;2.2.0&lt;span class=&quot;nt&quot;&gt;&amp;lt;/version&amp;gt;&lt;/span&gt;
  &lt;span class=&quot;nt&quot;&gt;&amp;lt;/dependency&amp;gt;&lt;/span&gt;
  &lt;span class=&quot;nt&quot;&gt;&amp;lt;dependency&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;nt&quot;&gt;&amp;lt;groupId&amp;gt;&lt;/span&gt;org.apache.camel&lt;span class=&quot;nt&quot;&gt;&amp;lt;/groupId&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;nt&quot;&gt;&amp;lt;artifactId&amp;gt;&lt;/span&gt;camel-jms&lt;span class=&quot;nt&quot;&gt;&amp;lt;/artifactId&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;nt&quot;&gt;&amp;lt;version&amp;gt;&lt;/span&gt;2.2.0&lt;span class=&quot;nt&quot;&gt;&amp;lt;/version&amp;gt;&lt;/span&gt;
  &lt;span class=&quot;nt&quot;&gt;&amp;lt;/dependency&amp;gt;&lt;/span&gt;
&lt;span class=&quot;nt&quot;&gt;&amp;lt;/dependencies&amp;gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;To compile the project, simply launch the command “mvn install” to generate the SU and do the same for the SA. When the Service Assembly jar file is available, copy it in the hotdeploy directory of ServiceMix 3 server and check the log.This example which is very basic can be extended with another camel components. In that case, don’t forget to add their dependency in the SU pom as the camel lib must be added in the lib directory of the SU.&lt;/p&gt;

&lt;p&gt;Have fun with that !&lt;/p&gt;
</description>
            
            <category>servicemix</category>
            
            <category>esb</category>
            
            <category>camel</category>
            
            <category>fuse</category>
            
            <pubDate>Tue, 30 Mar 2010 00:00:00 +0200</pubDate>
            <link>https://cmoulliard.github.io//run-camel-route-on-servicemix-33x</link>
            <guid isPermaLink="true">https://cmoulliard.github.io//run-camel-route-on-servicemix-33x</guid>
        </item>
        
          
        <item>
            <title>Is Webservice Reliable Messaging (WS-RM) the ugly duck of the WS-* story ?</title>
            <description>&lt;p&gt;The Webservice Reliable Messaging (WS-RM) specification has been designed a couple of years ago (2005) but few projects used it. Different reasons could explain this situation, the complexity of the specification, the cost to implement it and the lack of use cases. Personally, I think that developers and architects adopt a low profile when designing a solution and spend times developing alternative solutions providing functionality similar to what WS-RM propose.&lt;/p&gt;

&lt;p&gt;WS-RM is not the ugly duck of the story and need more attention from community because it allows you to design solutions where you will be able to&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;Guaranty message (= web services) delivery, which is required by example in financial order processing, alarm monitoring systems, …&lt;/li&gt;
  &lt;li&gt;Control the communication between the client and the server (retransmission, …)&lt;/li&gt;
  &lt;li&gt;Implement asynchronous solution by decoupling the request from the reply&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Well, what I have presented could be assimilated to a style exercise or a faith act and you will adhere or not. To convince you about the interests to use WS-RM, I will show you How easy it is to design such a solution using Apache CXF framework. This process can be achieved in three simple steps&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;STEP 1 : Turn on your WSDL contract into a WS-addressing&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;WS-addressing needs to be used because the communication between the client and server will be governed by the Reliable Message Server which is running on a different port address number. This decoupling is required to allow to retransmit message, acknowledge the messages received and guaranty the delivery&lt;/p&gt;

&lt;p&gt;Here is one way that you can adopt :&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-xml&quot; data-lang=&quot;xml&quot;&gt;&lt;span class=&quot;c&quot;&gt;&amp;lt;!-- Service definition --&amp;gt;&lt;/span&gt;
&lt;span class=&quot;nt&quot;&gt;&amp;lt;wsdl:service&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;name=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;ReportIncidentEndpointService&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;
  &lt;span class=&quot;nt&quot;&gt;&amp;lt;wsdl:port&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;name=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;ReportIncidentPort&quot;&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;binding=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;tns:ReportIncidentBinding&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;nt&quot;&gt;&amp;lt;soap:address&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;location=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;http://localhost:8080/cxf/camel-example/incident&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;
      &lt;span class=&quot;c&quot;&gt;&amp;lt;!-- &amp;lt;wswa:usingaddressing wswa=&quot;http://www.w3.org/2005/02/addressing/wsdl&quot;&amp;gt; --&amp;gt;&lt;/span&gt;
      &lt;span class=&quot;nt&quot;&gt;&amp;lt;wswa:usingaddressing&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;wswa=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;http://www.w3.org/2005/02/addressing/wsdl&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&amp;lt;/wswa:usingaddressing&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;nt&quot;&gt;&amp;lt;/soap:address&amp;gt;&lt;/span&gt;
  &lt;span class=&quot;nt&quot;&gt;&amp;lt;/wsdl:port&amp;gt;&lt;/span&gt;
&lt;span class=&quot;nt&quot;&gt;&amp;lt;/wsdl:service&amp;gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;the other consists in to use a Policy Rule (= WS-Policy)&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-xml&quot; data-lang=&quot;xml&quot;&gt;&lt;span class=&quot;nt&quot;&gt;&amp;lt;wsp:policy&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;wsp=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;http://www.w3.org/2006/07/ws-policy&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;
  &lt;span class=&quot;nt&quot;&gt;&amp;lt;wsam:addressing&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;wsam=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;http://www.w3.org/2007/02/addressing/metadata&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;nt&quot;&gt;&amp;lt;wsp:policy&amp;gt;&amp;lt;/wsp:policy&amp;gt;&lt;/span&gt;
  &lt;span class=&quot;nt&quot;&gt;&amp;lt;/wsam:addressing&amp;gt;&lt;/span&gt;
&lt;span class=&quot;nt&quot;&gt;&amp;lt;/wsp:policy&amp;gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;&lt;strong&gt;STEP 2 : Activate the Reliable Server&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Now that the WSDL contract is modified, we need to add the Reliable Server to the configuration of our platform. I will show you using a spring xml configuration file but you can use the Apache CXF classes in your java code if you want&lt;/p&gt;

&lt;p&gt;To activate the RM server, you simply needs to add the tags wsa:addressing and wsrm-mgr in the bus definition of Apache CXF. Different parameters are available like retransmission interval, acknowledge interval. I will not digg into these ones and if you need information, I invite you to check Apache CXF javadoc and specifications.&lt;/p&gt;

&lt;p&gt;By example&amp;lt; it is possible to activate also the persistence manager of the RM server ;-)&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-xml&quot; data-lang=&quot;xml&quot;&gt;&lt;span class=&quot;nt&quot;&gt;&amp;lt;cxf:bus&amp;gt;&lt;/span&gt;
  &lt;span class=&quot;nt&quot;&gt;&amp;lt;cxf:features&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;nt&quot;&gt;&amp;lt;cxf:logging&amp;gt;&lt;/span&gt;
      &lt;span class=&quot;nt&quot;&gt;&amp;lt;wsa:addressing&amp;gt;&lt;/span&gt;
        &lt;span class=&quot;nt&quot;&gt;&amp;lt;wsrm-mgr:reliablemessaging&amp;gt;&lt;/span&gt;
          &lt;span class=&quot;nt&quot;&gt;&amp;lt;wsrm-policy:rmassertion&amp;gt;&lt;/span&gt;
            &lt;span class=&quot;nt&quot;&gt;&amp;lt;wsrm-policy:baseretransmissioninterval&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;milliseconds=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;4000&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;
              &lt;span class=&quot;nt&quot;&gt;&amp;lt;wsrm-policy:acknowledgementinterval&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;milliseconds=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;2000&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&amp;lt;/wsrm-policy:acknowledgementinterval&amp;gt;&lt;/span&gt;
              &lt;span class=&quot;nt&quot;&gt;&amp;lt;wsrm-mgr:destinationpolicy&amp;gt;&lt;/span&gt;
                &lt;span class=&quot;nt&quot;&gt;&amp;lt;wsrm-mgr:ackspolicy&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;intramessagethreshold=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;0&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&amp;lt;/wsrm-mgr:ackspolicy&amp;gt;&lt;/span&gt;
              &lt;span class=&quot;nt&quot;&gt;&amp;lt;/wsrm-mgr:destinationpolicy&amp;gt;&lt;/span&gt;
            &lt;span class=&quot;nt&quot;&gt;&amp;lt;/wsrm-policy:baseretransmissioninterval&amp;gt;&lt;/span&gt;
          &lt;span class=&quot;nt&quot;&gt;&amp;lt;/wsrm-policy:rmassertion&amp;gt;&lt;/span&gt;
        &lt;span class=&quot;nt&quot;&gt;&amp;lt;/wsrm-mgr:reliablemessaging&amp;gt;&lt;/span&gt;
      &lt;span class=&quot;nt&quot;&gt;&amp;lt;/wsa:addressing&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;nt&quot;&gt;&amp;lt;/cxf:logging&amp;gt;&lt;/span&gt;
  &lt;span class=&quot;nt&quot;&gt;&amp;lt;/cxf:features&amp;gt;&lt;/span&gt;
&lt;span class=&quot;nt&quot;&gt;&amp;lt;/cxf:bus&amp;gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;If you use CXF in combination with the Routing engine Apache Camel, you don’t need to do additional things as the Apache CXF endpoint who will consume the web servicesmessages
will be drived by the RM server of CXF.&lt;/p&gt;

&lt;p&gt;Here is an example of Camel integration with CXF&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-xml&quot; data-lang=&quot;xml&quot;&gt;&lt;span class=&quot;c&quot;&gt;&amp;lt;!-- webservice endpoint --&amp;gt;&lt;/span&gt;
&lt;span class=&quot;nt&quot;&gt;&amp;lt;cxfcamel:cxfendpoint&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;id=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;reportIncident&quot;&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;address=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;http://localhost:8080/cxf/camel-example/incident&quot;&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;serviceclass=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;org.apache.camel.example.reportincident.ReportIncidentEndpoint&quot;&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;s=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;http://reportincident.example.camel.apache.org&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&amp;lt;/cxfcamel:cxfendpoint&amp;gt;&lt;/span&gt;
&lt;span class=&quot;c&quot;&gt;&amp;lt;!-- Camel route --&amp;gt;&lt;/span&gt;
&lt;span class=&quot;nt&quot;&gt;&amp;lt;camel:camelcontext&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;trace=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;true&quot;&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;xmlns=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;http://camel.apache.org/schema/osgi&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;
  &lt;span class=&quot;nt&quot;&gt;&amp;lt;route&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;nt&quot;&gt;&amp;lt;from&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;uri=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;cxf:bean:reportIncident&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;// messages are consumed from CXF endpoint
      &lt;span class=&quot;nt&quot;&gt;&amp;lt;convertbodyto&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;type=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;org.apache.camel.example.reportincident.InputReportIncident&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;// the body of the WS message is converted directly into a POJOI
        &lt;span class=&quot;nt&quot;&gt;&amp;lt;to&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;uri=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;bean:webservice&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;// We call a POJO to save the reportincident in a DB
          &lt;span class=&quot;nt&quot;&gt;&amp;lt;inOnly&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;uri=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;osgiqueuingservice:queue:in&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;
          // We put the object in a queue
          &lt;span class=&quot;nt&quot;&gt;&amp;lt;transform&amp;gt;&lt;/span&gt;
            &lt;span class=&quot;nt&quot;&gt;&amp;lt;method&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;bean=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;feedback&quot;&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;method=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;setOk&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;// We provide a feedback message as the WS is of type request/replyt&lt;span class=&quot;nt&quot;&gt;&amp;lt;/method&amp;gt;&lt;/span&gt;
          &lt;span class=&quot;nt&quot;&gt;&amp;lt;/transform&amp;gt;&lt;/span&gt;
        &lt;span class=&quot;nt&quot;&gt;&amp;lt;/to&amp;gt;&lt;/span&gt;
      &lt;span class=&quot;nt&quot;&gt;&amp;lt;/to&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;nt&quot;&gt;&amp;lt;/convertbodyto&amp;gt;&lt;/span&gt;
  &lt;span class=&quot;nt&quot;&gt;&amp;lt;/from&amp;gt;&lt;/span&gt;
&lt;span class=&quot;nt&quot;&gt;&amp;lt;/route&amp;gt;&lt;/span&gt;
&lt;span class=&quot;nt&quot;&gt;&amp;lt;/camel:camelcontext&amp;gt;&lt;/span&gt; &lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;&lt;strong&gt;STEP : Verify&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;If you use a java client using Apache CXF java classes, you can easily enable the logging of the IN/OUT WS messages exchanged with the RM server and the application.&lt;/p&gt;

&lt;p&gt;The following trace shows that :&lt;/p&gt;
&lt;ul&gt;
  &lt;li&gt;a sequence has been started&lt;/li&gt;
  &lt;li&gt;each message is identified ‘’ with a UID&lt;/li&gt;
  &lt;li&gt;Within a sequence, the messages send receive a messageID&lt;/li&gt;
  &lt;li&gt;The server acknowledge the reception (= processing) of the messages&lt;/li&gt;
&lt;/ul&gt;

&lt;textarea rows=&quot;10&quot; cols=&quot;60&quot;&gt;
&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Invoking reportIncident ... for accident : 024-févr.-2010 9:48:39 org.apache.cxf.transport.http.HTTPConduit setUpDecoupledDestinationINFO: creating decoupled endpoint: http://localhost:9999/camel-example/incident2010-02-24 09:48:39.796::INFO:  Logging to STDERR via org.mortbay.log.StdErrLog2010-02-24 09:48:39.828::INFO:  jetty-6.1.212010-02-24 09:48:39.921::INFO:  Started SelectChannelConnector@localhost:999924-févr.-2010 9:48:40 org.apache.cxf.ws.rm.Proxy invokeINFO: Sending out-of-band RM protocol message {http://schemas.xmlsoap.org/ws/2005/02/rm}CreateSequence.24-févr.-2010 9:48:41 org.apache.cxf.interceptor.LoggingOutInterceptor$LoggingCallback onCloseINFO: Outbound Message
---------------------------ID: 1Address: http://localhost:8080/cxf/camel-example/incidentEncoding: UTF-8Content-Type: text/xmlHeaders: {SOAPAction=[&quot;http://schemas.xmlsoap.org/ws/2005/02/rm/CreateSequence&quot;], Connection=[Keep-Alive], Accept=[*/*]}Payload:&lt;soap:envelope soap=&quot;http://schemas.xmlsoap.org/soap/envelope/&quot;&gt;
&lt;soap:header&gt;
  &lt;action xmlns=&quot;http://schemas.xmlsoap.org/ws/2004/08/addressing&quot;&gt;http://schemas.xmlsoap.org/ws/2005/02/rm/CreateSequence&lt;/action&gt;
  &lt;messageid xmlns=&quot;http://schemas.xmlsoap.org/ws/2004/08/addressing&quot;&gt;urn:uuid:508b8914-1621-4992-ae2d-2249d417069a&lt;/messageid&gt;
  &lt;to xmlns=&quot;http://schemas.xmlsoap.org/ws/2004/08/addressing&quot;&gt;http://localhost:8080/cxf/camel-example/incident&lt;/to&gt;
  &lt;replyto xmlns=&quot;http://schemas.xmlsoap.org/ws/2004/08/addressing&quot;&gt;
    &lt;address&gt;http://localhost:9999/camel-example/incident&lt;/address&gt;
  &lt;/replyto&gt;
&lt;/soap:header&gt;
&lt;soap:body&gt;
  &lt;createsequence xmlns=&quot;http://schemas.xmlsoap.org/ws/2005/02/rm&quot; ns2=&quot;http://schemas.xmlsoap.org/ws/2004/08/addressing&quot;&gt;
    &lt;acksto&gt;
      &lt;ns2:address&gt;http://localhost:9999/camel-example/incident&lt;/ns2:address&gt;
    &lt;/acksto&gt;
    &lt;expires&gt;PT0S&lt;/expires&gt;
    &lt;offer&gt;
      &lt;identifier&gt;urn:uuid:b12e4ccf-3bec-4f76-85f6-2b64f24745b5&lt;/identifier&gt;
      &lt;expires&gt;PT0S&lt;/expires&gt;
    &lt;/offer&gt;
  &lt;/createsequence&gt;
&lt;/soap:body&gt;
&lt;/soap:envelope&gt;
--------------------------------------24-févr.-2010 9:48:41 org.apache.cxf.interceptor.LoggingInInterceptor loggingINFO: Inbound Message
----------------------------ID: 1Response-Code: 202Encoding: UTF-8Content-Type: text/xml; charset=utf-8Headers: {content-type=[text/xml; charset=utf-8], Content-Length=[532], Server=[Jetty(6.1.x)]}Payload:&lt;soap:envelope soap=&quot;http://schemas.xmlsoap.org/soap/envelope/&quot;&gt;
&lt;soap:header&gt;
  &lt;messageid xmlns=&quot;http://schemas.xmlsoap.org/ws/2004/08/addressing&quot;&gt;urn:uuid:73d86df6-7d45-42df-8008-2a4ca48682fd&lt;/messageid&gt;
  &lt;to xmlns=&quot;http://schemas.xmlsoap.org/ws/2004/08/addressing&quot;&gt;http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous&lt;/to&gt;
  &lt;replyto xmlns=&quot;http://schemas.xmlsoap.org/ws/2004/08/addressing&quot;&gt;
    &lt;address&gt;http://schemas.xmlsoap.org/ws/2004/08/addressing/role/none&lt;/address&gt;
  &lt;/replyto&gt;
&lt;/soap:header&gt;
&lt;soap:body&gt;&lt;/soap:body&gt;
--------------------------------------24-févr.-2010 9:48:41 org.apache.cxf.interceptor.LoggingInInterceptor loggingINFO: Inbound Message
----------------------------ID: 2Address: /camel-example/incidentResponse-Code: 200Encoding: UTF-8Content-Type: text/xml; charset=UTF-8Headers: {content-type=[text/xml; charset=UTF-8], connection=[keep-alive], Host=[localhost:9999], Content-Length=[1006], User-Agent=[Progress, fuse] Services Framework 2.2.6-fuse-01-00], Content-Type=[text/xml; charset=UTF-8], Accept=[*/*], Pragma=[no-cache], Cache-Control=[no-cache]}Payload:
&lt;soap:envelope soap=&quot;http://schemas.xmlsoap.org/soap/envelope/&quot;&gt;
  &lt;soap:header&gt;
    &lt;action xmlns=&quot;http://schemas.xmlsoap.org/ws/2004/08/addressing&quot;&gt;http://schemas.xmlsoap.org/ws/2005/02/rm/CreateSequenceResponse&lt;/action&gt;
    &lt;messageid xmlns=&quot;http://schemas.xmlsoap.org/ws/2004/08/addressing&quot;&gt;urn:uuid:c8e59735-7738-40b2-98c1-28be15274b35&lt;/messageid&gt;
    &lt;to xmlns=&quot;http://schemas.xmlsoap.org/ws/2004/08/addressing&quot;&gt;http://localhost:9999/camel-example/incident&lt;/to&gt;
    &lt;relatesto xmlns=&quot;http://schemas.xmlsoap.org/ws/2004/08/addressing&quot;&gt;urn:uuid:508b8914-1621-4992-ae2d-2249d417069a&lt;/relatesto&gt;
  &lt;/soap:header&gt;
  &lt;soap:body&gt;
    &lt;createsequenceresponse xmlns=&quot;http://schemas.xmlsoap.org/ws/2005/02/rm&quot; ns2=&quot;http://schemas.xmlsoap.org/ws/2004/08/addressing&quot;&gt;
      &lt;identifier&gt;urn:uuid:b35dff50-43cb-43ad-9c9e-4b59f7cb55e7&lt;/identifier&gt;
      &lt;expires&gt;P0Y0M0DT0H0M0.0S&lt;/expires&gt;
      &lt;accept&gt;
        &lt;acksto&gt;
          &lt;ns2:address&gt;http://localhost:8080/cxf/camel-example/incident&lt;/ns2:address&gt;
        &lt;/acksto&gt;
      &lt;/accept&gt;
    &lt;/createsequenceresponse&gt;
  &lt;/soap:body&gt;
&lt;/soap:envelope&gt;
--------------------------------------
24-févr.-2010 9:48:41 org.apache.cxf.ws.rm.soap.RMSoapInterceptor updateServiceModelInfoINFO: Updating service model info in exchange24-févr.-2010 9:48:41 org.apache.cxf.interceptor.LoggingOutInterceptor$LoggingCallback onCloseINFO: Outbound Message
---------------------------
ID: 3Address: http://localhost:8080/cxf/camel-example/incidentEncoding: UTF-8Content-Type: text/xmlHeaders: {SOAPAction=[&quot;http://reportincident.example.camel.apache.org/ReportIncident&quot;], Connection=[Keep-Alive], Accept=[*/*]}Payload:
&lt;soap:envelope soap=&quot;http://schemas.xmlsoap.org/soap/envelope/&quot;&gt;
  &lt;soap:header&gt;
    &lt;action xmlns=&quot;http://schemas.xmlsoap.org/ws/2004/08/addressing&quot;&gt;http://reportincident.example.camel.apache.org/ReportIncident&lt;/action&gt;
    &lt;messageid xmlns=&quot;http://schemas.xmlsoap.org/ws/2004/08/addressing&quot;&gt;urn:uuid:85a1ebac-5293-4daa-a656-987967aa2a4d&lt;/messageid&gt;
    &lt;to xmlns=&quot;http://schemas.xmlsoap.org/ws/2004/08/addressing&quot;&gt;http://localhost:8080/cxf/camel-example/incident&lt;/to&gt;
    &lt;replyto xmlns=&quot;http://schemas.xmlsoap.org/ws/2004/08/addressing&quot;&gt;
      &lt;address&gt;http://localhost:9999/camel-example/incident&lt;/address&gt;
    &lt;/replyto&gt;
    &lt;wsrm:sequence ns2=&quot;http://schemas.xmlsoap.org/ws/2004/08/addressing&quot; wsrm=&quot;http://schemas.xmlsoap.org/ws/2005/02/rm&quot;&gt;
      &lt;wsrm:identifier&gt;urn:uuid:b35dff50-43cb-43ad-9c9e-4b59f7cb55e7&lt;/wsrm:identifier&gt;
      &lt;wsrm:messagenumber&gt;1&lt;/wsrm:messagenumber&gt;
    &lt;/wsrm:sequence&gt;
  &lt;/soap:header&gt;
  &lt;soap:body&gt;
    &lt;ns2:inputreportincident ns2=&quot;http://reportincident.example.camel.apache.org&quot;&gt;
      &lt;incidentid&gt;0&lt;/incidentid&gt;
      &lt;incidentdate&gt;29-04-2009&lt;/incidentdate&gt;
      &lt;givenname&gt;moulliard&lt;/givenname&gt;
      &lt;familyname&gt;charles&lt;/familyname&gt;
      &lt;summary&gt;This is a web service incident&lt;/summary&gt;
      &lt;details&gt;This is a web service incident - details&lt;/details&gt;
      &lt;email&gt;cmoulliard@gmail.com&lt;/email&gt;
      &lt;phone&gt;+222 10 50 22&lt;/phone&gt;
    &lt;/ns2:inputreportincident&gt;
  &lt;/soap:body&gt;
&lt;/soap:envelope&gt;
--------------------------------------
24-févr.-2010 9:48:41 org.apache.cxf.interceptor.LoggingInInterceptor loggingINFO: Inbound Message
----------------------------
ID: 3Response-Code: 202Encoding: UTF-8Content-Type: text/xml; charset=utf-8Headers: {content-type=[text/xml; charset=utf-8], Content-Length=[532], Server=[Jetty(6.1.x)]}Payload:
&lt;soap:envelope soap=&quot;http://schemas.xmlsoap.org/soap/envelope/&quot;&gt;
  &lt;soap:header&gt;
    &lt;messageid xmlns=&quot;http://schemas.xmlsoap.org/ws/2004/08/addressing&quot;&gt;urn:uuid:37dceb90-e1f5-4014-9749-8d4ae7eebb13&lt;/messageid&gt;
    &lt;to xmlns=&quot;http://schemas.xmlsoap.org/ws/2004/08/addressing&quot;&gt;http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous&lt;/to&gt;
    &lt;replyto xmlns=&quot;http://schemas.xmlsoap.org/ws/2004/08/addressing&quot;&gt;
      &lt;address&gt;http://schemas.xmlsoap.org/ws/2004/08/addressing/role/none&lt;/address&gt;
    &lt;/replyto&gt;
  &lt;/soap:header&gt;
  &lt;soap:body&gt;&lt;/soap:body&gt;
--------------------------------------
2010-02-24 09:48:41.937::INFO: seeing JVM BUG(s) - cancelling interestOps==024-févr.-2010 9:48:42 org.apache.cxf.interceptor.LoggingInInterceptor loggingINFO: Inbound Message
----------------------------
ID: 4Address: /camel-example/incidentResponse-Code: 200Encoding: UTF-8Content-Type: text/xml; charset=UTF-8Headers: {content-type=[text/xml; charset=UTF-8], connection=[keep-alive], Host=[localhost:9999], Content-Length=[1057], User-Agent=[Progress, fuse] Services Framework 2.2.6-fuse-01-00], Content-Type=[text/xml; charset=UTF-8], Accept=[*/*], Pragma=[no-cache], Cache-Control=[no-cache]}Payload:
  &lt;soap:envelope soap=&quot;http://schemas.xmlsoap.org/soap/envelope/&quot;&gt;
    &lt;soap:header&gt;
      &lt;action xmlns=&quot;http://schemas.xmlsoap.org/ws/2004/08/addressing&quot;&gt;http://reportincident.example.camel.apache.org/ReportIncidentEndpoint/ReportIncidentResponse&lt;/action&gt;
      &lt;messageid xmlns=&quot;http://schemas.xmlsoap.org/ws/2004/08/addressing&quot;&gt;urn:uuid:6163b07e-c983-47f7-8699-c4670b61a213&lt;/messageid&gt;
      &lt;to xmlns=&quot;http://schemas.xmlsoap.org/ws/2004/08/addressing&quot;&gt;http://localhost:9999/camel-example/incident&lt;/to&gt;
      &lt;relatesto xmlns=&quot;http://schemas.xmlsoap.org/ws/2004/08/addressing&quot;&gt;urn:uuid:85a1ebac-5293-4daa-a656-987967aa2a4d&lt;/relatesto&gt;
      &lt;wsrm:sequence ns2=&quot;http://schemas.xmlsoap.org/ws/2004/08/addressing&quot; wsrm=&quot;http://schemas.xmlsoap.org/ws/2005/02/rm&quot;&gt;
        &lt;wsrm:identifier&gt;urn:uuid:b12e4ccf-3bec-4f76-85f6-2b64f24745b5&lt;/wsrm:identifier&gt;
        &lt;wsrm:messagenumber&gt;1&lt;/wsrm:messagenumber&gt;
      &lt;/wsrm:sequence&gt;
    &lt;/soap:header&gt;
    &lt;soap:body&gt;
      &lt;ns2:outputreportincident ns2=&quot;http://reportincident.example.camel.apache.org&quot;&gt;
        &lt;code&gt;OK&lt;/code&gt;
      &lt;/ns2:outputreportincident&gt;
    &lt;/soap:body&gt;
  &lt;/soap:envelope&gt;
--------------------------------------
&amp;gt;&amp;gt;&amp;gt;&amp;gt; Result - code : OK
24-févr.-2010 9:48:43 org.apache.cxf.interceptor.LoggingInInterceptor loggingINFO: Inbound Message
----------------------------
ID: 5Address: /camel-example/incidentResponse-Code: 200Encoding: UTF-8Content-Type: text/xml; charset=UTF-8Headers: {content-type=[text/xml; charset=UTF-8], connection=[keep-alive], Host=[localhost:9999], Content-Length=[955], SOAPAction=[&quot;http://schemas.xmlsoap.org/ws/2005/02/rm/SequenceAcknowledgement&quot;], User-Agent=[Progress, fuse] Services Framework 2.2.6-fuse-01-00], Content-Type=[text/xml; charset=UTF-8], Accept=[*/*], Pragma=[no-cache], Cache-Control=[no-cache]}Payload:
  &lt;soap:envelope soap=&quot;http://schemas.xmlsoap.org/soap/envelope/&quot;&gt;
    &lt;soap:header&gt;
      &lt;action xmlns=&quot;http://schemas.xmlsoap.org/ws/2004/08/addressing&quot;&gt;http://schemas.xmlsoap.org/ws/2005/02/rm/SequenceAcknowledgement&lt;/action&gt;
      &lt;messageid xmlns=&quot;http://schemas.xmlsoap.org/ws/2004/08/addressing&quot;&gt;urn:uuid:f57c0b96-fcc3-4543-bbc3-fd15a54622e7&lt;/messageid&gt;
      &lt;to xmlns=&quot;http://schemas.xmlsoap.org/ws/2004/08/addressing&quot;&gt;http://localhost:9999/camel-example/incident&lt;/to&gt;
      &lt;replyto xmlns=&quot;http://schemas.xmlsoap.org/ws/2004/08/addressing&quot;&gt;
        &lt;address&gt;http://schemas.xmlsoap.org/ws/2004/08/addressing/role/none&lt;/address&gt;
      &lt;/replyto&gt;
      &lt;wsrm:sequenceacknowledgement ns2=&quot;http://schemas.xmlsoap.org/ws/2004/08/addressing&quot; wsrm=&quot;http://schemas.xmlsoap.org/ws/2005/02/rm&quot;&gt;
        &lt;wsrm:identifier&gt;urn:uuid:b35dff50-43cb-43ad-9c9e-4b59f7cb55e7&lt;/wsrm:identifier&gt;
        &lt;wsrm:acknowledgementrange lower=&quot;1&quot; upper=&quot;1&quot;&gt;&lt;/wsrm:acknowledgementrange&gt;
      &lt;/wsrm:sequenceacknowledgement&gt;
      &lt;soap:body&gt;&lt;/soap:body&gt;
--------------------------------------
24-févr.-2010 9:48:43 org.apache.cxf.ws.rm.soap.RMSoapInterceptor updateServiceModelInfoINFO: Updating service model info in exchange24-févr.-2010 9:48:44 org.apache.cxf.ws.rm.Proxy invokeINFO: Sending out-of-band RM protocol message {http://schemas.xmlsoap.org/ws/2005/02/rm}SequenceAcknowledgement.24-févr.-2010 9:48:44 org.apache.cxf.interceptor.LoggingOutInterceptor$LoggingCallback onCloseINFO: Outbound Message
---------------------------
ID: 6Address: http://localhost:8080/cxf/camel-example/incidentEncoding: UTF-8Content-Type: text/xmlHeaders: {SOAPAction=[&quot;http://schemas.xmlsoap.org/ws/2005/02/rm/SequenceAcknowledgement&quot;], Connection=[Keep-Alive], Accept=[*/*]}Payload:
      &lt;soap:envelope soap=&quot;http://schemas.xmlsoap.org/soap/envelope/&quot;&gt;
        &lt;soap:header&gt;
          &lt;action xmlns=&quot;http://schemas.xmlsoap.org/ws/2004/08/addressing&quot;&gt;http://schemas.xmlsoap.org/ws/2005/02/rm/SequenceAcknowledgement&lt;/action&gt;
          &lt;messageid xmlns=&quot;http://schemas.xmlsoap.org/ws/2004/08/addressing&quot;&gt;urn:uuid:c5584570-c10f-49cc-a3ef-c2c53363ec66&lt;/messageid&gt;
          &lt;to xmlns=&quot;http://schemas.xmlsoap.org/ws/2004/08/addressing&quot;&gt;http://localhost:8080/cxf/camel-example/incident&lt;/to&gt;
          &lt;replyto lns=&quot;http://schemas.xmlsoap.org/ws/2004/08/addressing&quot;&gt;
            &lt;address&gt;http://schemas.xmlsoap.org/ws/2004/08/addressing/role/none&lt;/address&gt;
          &lt;/replyto&gt;
          &lt;wsrm:sequenceacknowledgement ns2=&quot;http://schemas.xmlsoap.org/ws/2004/08/addressing&quot; wsrm=&quot;http://schemas.xmlsoap.org/ws/2005/02/rm&quot;&gt;
            &lt;wsrm:identifier&gt;urn:uuid:b12e4ccf-3bec-4f76-85f6-2b64f24745b5&lt;/wsrm:identifier&gt;
            &lt;wsrm:acknowledgementrange lower=&quot;1&quot; upper=&quot;1&quot;&gt;&lt;/wsrm:acknowledgementrange&gt;
          &lt;/wsrm:sequenceacknowledgement&gt;
          &lt;soap:body&gt;&lt;/soap:body&gt;
--------------------------------------
24-févr.-2010 9:48:44 org.apache.cxf.interceptor.LoggingInInterceptor loggingINFO: Inbound Message
----------------------------
ID: 6Response-Code: 202Encoding: UTF-8Content-Type: text/xml; charset=utf-8Headers: {content-type=[text/xml; charset=utf-8], Content-Length=[532], Server=[Jetty(6.1.x)]}Payload:
          &lt;soap:envelope soap=&quot;http://schemas.xmlsoap.org/soap/envelope/&quot;&gt;
            &lt;soap:header&gt;
              &lt;messageid xmlns=&quot;http://schemas.xmlsoap.org/ws/2004/08/addressing&quot;&gt;urn:uuid:786ad464-fb01-452a-9036-63c383955133&lt;/messageid&gt;
              &lt;to xmlns=&quot;http://schemas.xmlsoap.org/ws/2004/08/addressing&quot;&gt;http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous&lt;/to&gt;
              &lt;replyto xmlns=&quot;http://schemas.xmlsoap.org/ws/2004/08/addressing&quot;&gt;
                &lt;address&gt;http://schemas.xmlsoap.org/ws/2004/08/addressing/role/none&lt;/address&gt;
              &lt;/replyto&gt;
            &lt;/soap:header&gt;
            &lt;soap:body&gt;&lt;/soap:body&gt;
--------------------------------------
24-févr.-2010 9:49:12 org.apache.cxf.transport.http_jetty.JettyHTTPServerEngine shutdown
          &lt;/soap:envelope&gt;
        &lt;/soap:header&gt;
      &lt;/soap:envelope&gt;
    &lt;/soap:header&gt;
  &lt;/soap:envelope&gt;
&lt;/soap:envelope&gt;
&lt;/soap:envelope&gt;
&lt;/textarea&gt;

&lt;p&gt;&lt;strong&gt;Conclusion&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Awesome, isn’it. Even, if you continue to doubt about this specification, I’m pretty sure that in the future you will take it into account into your decision process regarding to what has been developed here.&lt;/p&gt;
</description>
            
            <category>cxf</category>
            
            <category>webservice</category>
            
            <category>ws-rm</category>
            
            <category>fuse</category>
            
            <pubDate>Fri, 26 Feb 2010 00:00:00 +0100</pubDate>
            <link>https://cmoulliard.github.io//is-webservice-reliable-messaging-ws-rm</link>
            <guid isPermaLink="true">https://cmoulliard.github.io//is-webservice-reliable-messaging-ws-rm</guid>
        </item>
        
          
        <item>
            <title>New features for Apache Camel Bindy (non XML binding framework)</title>
            <description>&lt;p&gt;Today has been a very productive day. I have found the time to update the documentation about the Apache Camel Tutorial on
&lt;a href=&quot;http://camel.apache.org/tutorial-osgi-camel-part2.html&quot;&gt;OSGI&lt;/a&gt; and commit the last new features added to camel-bindy : the non XML binding framework
used to parse or generate CSV, FIX, … messages&lt;/p&gt;

&lt;p&gt;This new version of bindy includes important new features like :&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;Required (@DataField) to check mandatory field&lt;/li&gt;
  &lt;li&gt;Position (@DataField and @KeyValuePairField) when the CSV/FIX message to be generate contain fields which are placed at a different position then those used to parse it&lt;/li&gt;
  &lt;li&gt;Section which allow to define the class containing by example the header, body or footer section&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;and&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;
    &lt;p&gt;OneToMany which allow to :&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;Read a FIX message containing repetitive groups (= group of tags/keys)&lt;/li&gt;
  &lt;li&gt;Generate a CSV with repetitive data&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;More info can be find &lt;a href=&quot;http://camel.apache.org/bindy.html&quot;&gt;here&lt;/a&gt;.&lt;/p&gt;
</description>
            
            <category>camel</category>
            
            <category>bindy</category>
            
            <category>dataformat</category>
            
            <category>fuse</category>
            
            <pubDate>Fri, 20 Nov 2009 00:00:00 +0100</pubDate>
            <link>https://cmoulliard.github.io//new-features-for-apache-camel-bindy-non</link>
            <guid isPermaLink="true">https://cmoulliard.github.io//new-features-for-apache-camel-bindy-non</guid>
        </item>
        
          
        <item>
            <title>Tutorial part 1 about Apache Camel and OSGI (reviewed)</title>
            <description>&lt;p&gt;Last friday, I have spend some times to update the part 1 of the Apache Camel tutotrial. This tutorial shows how you can easily and quickly build and deploy a small SOA project using Camel 2.0 top of Apache Felix Karaf 1.0.0&lt;/p&gt;

&lt;p&gt;The second part of this tutorial will be upgraded soon and will include a new section about integration tests with Pax Exam.&lt;/p&gt;
</description>
            
            <category>tutorial</category>
            
            <category>karaf</category>
            
            <category>camel</category>
            
            <category>fuse</category>
            
            <pubDate>Mon, 02 Nov 2009 00:00:00 +0100</pubDate>
            <link>https://cmoulliard.github.io//camel%20osgi%20tutorial/tutorial-part-1-about-apache-camel-and</link>
            <guid isPermaLink="true">https://cmoulliard.github.io//camel%20osgi%20tutorial/tutorial-part-1-about-apache-camel-and</guid>
        </item>
        
          
        <item>
            <title>Apache Camel Group on Linkedln</title>
            <description>&lt;p&gt;Apache Camel has now its Group on Linkedin web site : &lt;a href=&quot;http://www.linkedin.com/groups?home=&amp;amp;gid=2447439&amp;amp;trk=anet_ug_hm&quot;&gt;http://www.linkedin.com/groups?home=&amp;amp;gid=2447439&amp;amp;trk=anet_ug_hm&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Feel free to join us to discuss / exchange ideas / news and jobs about your favorite mediation and router framework.&lt;/p&gt;
</description>
            
            <category>camel</category>
            
            <category>social-group</category>
            
            <category>linkedin</category>
            
            <category>fuse</category>
            
            <pubDate>Mon, 02 Nov 2009 00:00:00 +0100</pubDate>
            <link>https://cmoulliard.github.io//apache%20camel%20linkedln/apache-camel-group-on-linkedln</link>
            <guid isPermaLink="true">https://cmoulliard.github.io//apache%20camel%20linkedln/apache-camel-group-on-linkedln</guid>
        </item>
        
    </channel>
</rss>
