Call an external web service with CXF camel - web-services

I want to call the webservice from camel and print the response as a log like :
from("cxf://http://www.webservicex.net/ConvertTemperature.asmx/ConvertTemp?Temperature=37&FromUnit=degreeCelsius&ToUnit=degreeFahrenheit)
.log("Body received is ${body}");
I am facing issues in passing the parameters with CXF component and i am not still clear about usage of payload and how to i am accomplish the above simple thing. Am new to CXF and using camel with webservices. Can anyone help ??

Related

setup ESB Mule to eliminate point to point connection

I am new to ESB Mule, and i am trying to figure out how to utilize not to have point to point connectin for each webservice, i want to do the following:
1-Provide an XML SOAP webservice that will be consumed by different external clinets (XML SOAP and Restful client) and then send the message to an external SOAP webservice that is connected to ESB Mule.
2-Consume two websevices, but instead of having point to point connection, i want the client to consume web service through ESB Mule and then it will be routed to the desird external webservices.
Thanks for the help
i would suggest you start of by getting yourself a bit familiar with mule, you will find examples for your usecase here:
https://www.mulesoft.com/exchange#!/?searchTerm=soap
AND
http://blogs.mulesoft.com/dev/newbie/mule-school-web-services-part-1/

How to pass collection<?> over JAX-WS web service

In my project I need to write a web service which will receive Collection<?> as a parameter.. I am using apache CXF.. After I have written the service method I am unable to test it using SOAP UI (It is not generating any request).. My question is - Is it possible to receive Collection<?> over web service? I need to receive Collection of any object type.. Please help..
You need to work directly with SOAP messages.

SOAP over HTTP and SOAP over JMS

I have a requirement where a web service has to be exposed both as SOAP over HTTP and JMS. How would be the bindings for both in a WSDL at the same time ?
Also what all extra care(compared to a simple web service SOAP over HTTP) need to be taken for generating and deploying webservice in this scenario?
If possible, please give an example of a WSDL where both bindings are mentioned.

How to create SOAP client with spring application

I need to create a client with WSDL. I have a Java web application with JSF, Spring and JPA. In this application I need to create a form and send the info to the SOAP web service. This service should return another object with status.
Please, any idea I will be grateful
regards
sorry by my english
I assume you have generated classes from the WSDL needed for you client. In Spring it is very simple by using Apache CXF. For e.g.:
<jaxws:client id="yourService"
serviceClass="com.something.YourService"
address="the URL of web service"
username="username"
password="password"/>
And in your class where you need to call this web service just autowire it:
#Autowired
#Qualifier("yourService")
private YourService service;
Take a look at the example: http://cxf.apache.org/docs/writing-a-service-with-spring.html

soap webservice to return a pojo instead of xml

I'm quite new to webservices, recently started implementing Soap Webservice using Spring-WS and client using Axis and Spring. As i understood, we send xml as request for webservice and we get back response xml. These request/response Xmls can then be marshalled/unmarshalled.
Is there a way to directly return a pojo from webservice and get it on client side with out xml marshall/unmarshalling?
We always end up using Apache Axis and using WSDL2JAVA which produces pojo's for you and hides the service implementation. For the marshaling you can use something like XMLBeans to easily marshal between xml and pojos.
Also see Spring WS Client - How to create mapping POJO for WSDLs without using Axis
Short answer : no.