camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Reji Mathews <contactr...@gmail.com>
Subject Re: how to execute separate route if external webservice sends success response
Date Fri, 10 Apr 2015 16:37:38 GMT
Check out camel producer templates.

Cheers
Reji
On 10 Apr 2015 06:38, "chaituu" <yarlagadda54@gmail.com> wrote:

> <jaxws:endpoint id="employeeServicews"
>         implementor="#employeeImpl"
>         address="/services/employee">
>      </jaxws:endpoint>
>
>     <jaxws:client id="externalwebserviceEndpoint"
>                 address="http://xxxx/xx/xx.asmx"
>                 serviceClass="com.xx.xxx.xx.xx.xx.xx.xx" >
>                 </jaxws:client>
>
>
>
>
>         <camelContext xmlns="http://camel.apache.org/schema/spring"
> trace="false">
>
>     <dataFormats>
>         <bindy type="Csv" packages="xxx.xx" id="csvReport"/>
>     </dataFormats>
>
>
>      <route>
>      <from uri="seda:generateCSV"/>
>          <bean ref="generateCSV" method="generateCSV"/>
>          //pass the list of map objects to csv bindy.
>          <marshal ref="csvReport" />
>          <to uri="file:main/data/?fileName=test.csv"/>
>    </route>
>
>
>   </camelContext>
>
>
>   @Override
>         public String  getEmployee(final String employee)
>
>                         //hitting external web service endpoint
>                         response =
> externalwebserviceEndpoint.getEmployee(employee);
>
>                         //immediately send the response back to the client
> saying success if
> response != null then in the separate thread in asynchronous mode to
> generate csv.
>
>                         if(response != null)
>                         {
>                           //how  to send the response in a separate thread
> in asynchronous mode.
>                           template.asycBody("seda:generateCSV",response);
>                           return "success";
>                         }
>
>                         }
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/how-to-execute-separate-route-if-external-webservice-sends-success-response-tp5765550.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message