You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by nareshkpotti <po...@gmail.com> on 2012/07/31 03:58:03 UTC
CXF WS proxy using camel
Hi,
I am trying to implement web service proxy. For this I am using
servicemix 4.4.2, cxf 2.5.1 and camel 2.9.0. I am able successfully
implement example provided by camel(Report incident example) and made
changes to use Processor and make real web service call.
<bean id="proxyInProcessor"
class="org.apache.camel.example.cxf.proxy.ProxyInProcessor"/>
<bean id="proxyOutProcessor"
class="org.apache.camel.example.cxf.proxy.ProxyOutProcessor"/>
<cxf:cxfEndpoint id="reportIncident"
address="http://localhost:8185/camel-example-cxf-proxy/webservices/CustomerWSV1Port"
endpointName="s:CustomerWSV1Port"
serviceName="s:CustomerWSV1Service"
wsdlURL="etc/customerwsV1.wsdl"
xmlns:s="http://www.xyz.com/CustomerWS"/>
<camelContext xmlns="http://camel.apache.org/schema/spring" >
<route>
<from uri="cxf:bean:reportIncident?dataFormat=MESSAGE" />
<setExchangePattern pattern="InOut"/>
<process ref="proxyInProcessor" />
Real WebSerivce *is failing with following error.
<soap:Fault>
<faultcode>soap:Server</faultcode>
<faultstring>*HTTP operation failed invoking
http://10.3.17.157:10101/XYZ/abc/CustomerWSV1Port with statusCode:
500*</faultstring>
</soap:Fault>
2) If i try to comment out proxyInProcessor and try to test Real WebService
--> proxyOutProcessor,
I am able to get output of real webservice call in proxyOutProcessor but not
able to see the output in soapUI.
In proxyInProcessor and proxyOutProcessor i am just getting input and
printing it for testing.
How can i solve both the issues????
public class ProxyOutProcessor implements Processor{
@Override
public void process(Exchange exchange) throws Exception {
System.out.println("Entered into ProxyProcessor.process method");
exchange.setPattern(ExchangePattern.InOut);
String exchangeId = exchange.getExchangeId();
System.out.println("exchangeId : "+exchangeId);
String inputMsg = exchange.getIn().getBody(String.class);
System.out.println("Input message "+inputMsg);
}
}
--
View this message in context: http://servicemix.396122.n5.nabble.com/CXF-WS-proxy-using-camel-tp5714027.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.