2 Replies Latest reply on Mar 15, 2011 4:24 PM by tjain2011

    BindingoperationInfo error while routing from one webservice to another

    tjain2011

      Hi All

      I am trying to routte from one webservice to another. Both are cxfendpoints and i am using pojo data format. It thows a exception of BindingOperationInfo must be specified. THis happens when it is routes to the second webservice..can anybody help me how to set this.

        • 1. Re: BindingoperationInfo error while routing from one webservice to another
          mlabrot

          You may need to set CxfConstants.OPERATION_NAMESPACE and CxfConstants.OPERATION_NAME thusly:

           

          from("somewhere")

          .setHeader(CxfConstants.OPERATION_NAMESPACE).constant(myNamespace)

          .setHeader(CxfConstants.OPERATION_NAME).constant(myOperation)

          .to("cxf://http://myremoteserver...")

          • 2. Re: BindingoperationInfo error while routing from one webservice to another
            tjain2011

            That did not work.

             

            still the same exception

             

            java.lang.IllegalArgumentException: BindingOperationInfo must be specified

             

            here it is what i am doing... take a look

             

            from("cxf:bean:releasePOEndpoint").handleFault()

                      .to("log:incoming?showAll=true")

                      .process(new Processor() {

                           public void process(Exchange exchange) throws Exception {

                                logger.info(" cxf:bean:releasePOEndpoint processing exchange in camel");

             

                                BindingOperationInfo boi = (BindingOperationInfo) exchange.getProperty(BindingOperationInfo.class.toString());

                                if (boi != null) {

                                     logger.info("boi.isUnwrapped" + boi.isUnwrapped());

                                }

                                if (exchange != null){

                                      

                                     Message in = exchange.getIn();

                                     logger.info("#####Exchange headers"+in.getHeaders().toString());

                                     logger.info("#####Exchange body"+in.getBody().toString());

                                     Object[] msgList = exchange.getIn().getBody(Object[].class);

                                     ReleasePurchaseOrderRequestType poRequest = (ReleasePurchaseOrderRequestType)msgList[0];

                                     logger.info("#####purchase OrderID"+ poRequest.getPurchaseOrderId());

                                      

                                     exchange.getOut().setBody(in.getBody());

                                }

                           }

                      })

                      .setHeader(CxfConstants.OPERATION_NAMESPACE).constant("http://company.com/pehz/wsdl/purchase_order_service.v1_0")

                      .setHeader(CxfConstants.OPERATION_NAME).constant("releasePurchaseOrder")

                       

                       

                      .to("cxf:bean:PurchaseOrderLifeEndpoint?defaultOperationName=releasePurchaseOrder&dataFormat=POJO")