You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by PhilBurress <nm...@amig.com> on 2013/04/17 17:23:52 UTC

Calling WebService with Camel

Has anyone had any success calling a webservice via cxf in Camel? We're
running into a lot of problems. Are there any examples out there?



--
View this message in context: http://camel.465427.n5.nabble.com/Calling-WebService-with-Camel-tp5731026.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Calling WebService with Camel

Posted by abhi <il...@rediffmail.com>.
You can also refer to 

http://camel.465427.n5.nabble.com/How-to-call-CXF-web-service-from-Camel-td5729692.html#a5729744
<http://camel.465427.n5.nabble.com/How-to-call-CXF-web-service-from-Camel-td5729692.html#a5729744>  

Thanks,
ABhi



--
View this message in context: http://camel.465427.n5.nabble.com/Calling-WebService-with-Camel-tp5731026p5731123.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Calling WebService with Camel

Posted by abhi <il...@rediffmail.com>.
Hi,
PLease find below example that is working for me .

    <bean id="myBean" class="org.test.MyBean"/>
    
    <cxf:cxfEndpoint id="helloService" 
    address="http://localhost:8080/HelloWeb/Hello"
    wsdlURL="http://localhost:8080/HelloWeb/Hello?wsdl" 
    serviceClass="com.server.HelloFirst" endpointName="s:HelloFirstImplPort"
serviceName="s:HelloFirstImplService" xmlns:s="http://server.com/">
		<cxf:properties>
			<entry key="dataFormat" value="MESSAGE"/>
		</cxf:properties>
	</cxf:cxfEndpoint>
	
	<camel:camelContext xmlns="http://camel.apache.org/schema/spring">
	<route id="test3">
	    <from uri="stream:in?promptMessage=Enter Something:"/>
	    <to uri="cxf:bean:helloService"/>     
        <to uri="bean:myBean?method=myMethod"/>
	</route>
	</camel:camelContext>
	
	
package com.server;
import javax.jws.WebService;

@WebService(endpointInterface = "com.server.HelloFirst")
public class HelloFirstImpl {
	public String myHello(String str){
		return "HelloFirstImpl: Hello :"+str;
	}
}


Thanks,
Abhi



--
View this message in context: http://camel.465427.n5.nabble.com/Calling-WebService-with-Camel-tp5731026p5731122.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Calling WebService with Camel

Posted by "valerian.merkling" <va...@capgemini.com>.
What about this ? 

http://camel.465427.n5.nabble.com/How-can-I-call-a-web-service-with-no-parameters-via-a-producerTemplate-td4806257.html



--
View this message in context: http://camel.465427.n5.nabble.com/Calling-WebService-with-Camel-tp5731026p5731063.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Calling WebService with Camel

Posted by PhilBurress <nm...@amig.com>.
At this moment, we are getting this error:

Here's the endpoint definition:

And the route (using a test case to send Jaxb object to direct:start):




--
View this message in context: http://camel.465427.n5.nabble.com/Calling-WebService-with-Camel-tp5731026p5731031.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Calling WebService with Camel

Posted by "valerian.merkling" <va...@capgemini.com>.
What kind of problem ? And where ?

I'm currently using cxf for ws consumer and producer, so i may be able to
help you, but i can't post my whole project here. 





--
View this message in context: http://camel.465427.n5.nabble.com/Calling-WebService-with-Camel-tp5731026p5731027.html
Sent from the Camel - Users mailing list archive at Nabble.com.