camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From david_geary <>
Subject Calling non CXF webservice
Date Fri, 07 Mar 2008 11:02:35 GMT

Im trying to use camel as a dynamic mechanism to transform xml and use this
as message to send to external webservices (not cxf). Ie use camel as a glue
between our system and other webservices where the configuration is done at
deploy time in xml. Is this possible?

As a test im trying to code an endpoint using camel cxf to consume a non cxf
web service by sending the xml request. 

My code is:

CxfEndpoint endpoint = new CxfEndpoint(
		  new CxfComponent());
URL request = this.getClass().getResource("RequestBody.xml");
File requestFile = new File(request.toURI());
FileInputStream inputStream = new FileInputStream(requestFile);        
XMLStreamReader xmlReader = StaxUtils.createXMLStreamReader(inputStream);
DOMSource source = new DOMSource(;        

template.sendBody(endpoint, source);

But this seems to generate a null pointer when attempting to access the
'service class' which i dont have. Also I'm using the same thing for URI and
address which doesnt seem right. As anyone a code example of getting this to



View this message in context:
Sent from the Camel - Users mailing list archive at

View raw message