title: How do i use multiple CXF endpoints to call a webservice in Camel?
body: <p>I have two endpoints:</p>
  
  <pre><code>CXF_FIRST_ENDPOINT="cxf:bean:cxfEndpoint?{address=first_address}&amp;serviceClass=com.service.class.first"
  CXF_SECOND_ENDPOINT="cxf:bean:cxfEndpoint?{address=second_address}&amp;serviceClass=com.service.class.second"
  </code></pre>
  
  <p>How do I implement two separate web service call after defining the endpoints. If I use both, and consume the endpoints using the routes, one of the endpoints will override the other and I am able to use only one. If I comment the other endpoint, Its running successfully. However I need to use both. I am using messageContentList for both the web service response:</p>
  
  <pre><code>MessageContentsList result = (MessageContentsList) exchange.getIn().getBody();
  </code></pre>
  
  <p>Thanks, please let me know if you need more information</p>
  
  <hr>
  
  <p>Here is the route-definition:</p>
  
  <pre><code>from("direct:paymentInfo").routeId("PaymentInfo") 
      .bean(billingServiceProcessor, "processBillingPaymentRequest") 
      .to(CXF_BILLINGSERVICE_ENDPOINT)
      .bean(billingServiceProcessor, "processBillingPaymentResponse")
      .end();
  
  from("direct:Holidays").routeId("HolidayRetrieval") 
      .bean(entityProcessor, "processHolidaysRequest") 
      .to(CXF_ENTITYSERVICE_ENDPOINT)
      .bean(entityProcessor, "processHolidaysResponse")
      .end();
  </code></pre>