Willem thank you for your advice!
Now I to go so call, but will make an exception, don't know is written
routing problem, or bean processing
this is my route:
<camel:route id="cxf-example">
<camel:from uri="jms:queue:cxf-example?jmsMessageType=Text" />
<camel:to uri ="bean:serviceCXFInvokerBean?method=process" />
<camel:to
uri="cxf://http://127.0.0.1:8080/YGFMISWeb/services/BlfThirdIntegrate?serviceClass=com.ygsoft.cxfExample.ws.BlfThirdIntegrate"
/>
<log loggingLevel="INFO" message=">>>${body}" />
</camel:route>
and the serviceCXFInvokerBean:
public class ServiceCXFInvokerBean {
private static final Log log =
LogFactory.getLog(ServiceCXFInvokerBean.class);
private String grisWebServiceURL =
"http://127.0.0.1:8080/YGFMISWeb/services/BlfThirdIntegrate";
public void process(Exchange exchange) {
final List<String> params = new ArrayList<String>();
log.info("Enter ServiceCXFInvokerBean ");
params.add("===123456===");
// Set the request context to the inMessage
Map<String, Object> requestContext = new HashMap<String,
Object>();
requestContext.put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY,grisWebServiceURL);
exchange.getIn().setBody(params);
exchange.getIn().setHeader(Client.REQUEST_CONTEXT,
requestContext);
exchange.getIn().setHeader(CxfConstants.OPERATION_NAME,
"getZWItemsYW");
exchange.getOut();
}
}
I have some doubts, I hope you can help me
1.When I perform procedures, backstage displays RuntimeCamelException:
org.apache.camel.RuntimeCamelException:
org.apache.cxf.binding.soap.SoapFault: Fault occurred while processing.
at
org.apache.camel.util.ObjectHelper.wrapRuntimeCamelException(ObjectHelper.java:1039)
at
org.apache.camel.component.jms.EndpointMessageListener.onMessage(EndpointMessageListener.java:103)
....
....
Caused by: org.apache.cxf.binding.soap.SoapFault: Fault occurred while
processing.
at
org.apache.cxf.binding.soap.interceptor.Soap11FaultInInterceptor.unmarshalFault(Soap11FaultInInterceptor.java:75)
...
...
2.It is my intention to call the service, but I saw the background that
shows the create serviceļ¼
2011-12-30 17:16:29
org.apache.cxf.service.factory.ReflectionServiceFactoryBean
buildServiceFromClass
info: Creating Service
{http://ws.cxfExample.ygsoft.com/}BlfThirdIntegrateService from class
com.ygsoft.cxfExample.ws.BlfThirdIntegrate
Thanks in advance,
Fan Jiang
--
View this message in context:
http://camel.465427.n5.nabble.com/CXF-problem-how-to-use-Camel-Cxf-to-invoke-a-webservice-tp5107111p5109719.html
Sent from the Camel - Users mailing list archive at Nabble.com.