I want to invoke web service operation that is being exposed by cxfEndpoint.

          Service end point interface is: 
   
@WebService
public interface Plan {
    public List<XmpFavoriteTypes> getAllFavoriteTypes() ;
    public List<XmpFavorites> getUserFavoritesInfo(int ownerId, int 
activityTypeId);
}

Service end point interface Implementation class is:

@WebService(endpointInterface = "com.connecture.exemplar.plan.service.Plan")
public class PlanImpl implements Plan {
     @Autowired
    PlanDao planDao;

    @Override
    public List<XmpFavoriteTypes> getAllFavoriteTypes() {
        List<XmpFavoriteTypes> xmpFavoriteTypes = planDao.getAllFavoriteTypes();
        return xmpFavoriteTypes;
    }

    @Override
    public List<XmpFavorites> getUserFavoritesInfo(int ownerId,
            int activityTypeId) {
        List<XmpFavorites> xmpFavorites = 
planDao.getUserFavoritesInfo(ownerId,activityTypeId);
        return xmpFavorites;
    }
}

I have exposed the service using cxf end point:

<cxf:cxfEndpoint id="plancxfService"
        address="http://localhost:8181/exemplar/Plan";
        serviceClass="com.connecture.exemplar.plan.service.impl.PlanImpl">
    </cxf:cxfEndpoint>

How to invoke getAllFavoriteTypes operation of the web service in camel route?

<route>
  <from uri="direct:plancxfService" />
<setHeader headerName="operationName">
<constant>getAllFavoriteTypes</constant>
</setHeader>
<to uri="cxf:bean:plancxfService" />
</route>

the above route is giving error.

Any idea?

                                          

Reply via email to