cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christian Schneider <>
Subject AW: manual SOAP generation via wsdl2java generated classes
Date Sat, 26 Feb 2011 00:46:24 GMT

I suggest to use camel for this. If you use the camel transport for cxf. Then you can write
somthing like this:

	<jaxws:client id="greeterProxy" 

	<camelContext id="camelContext" xmlns="">
			<from uri="direct:greeterClientEndpoint" />
			<bean ref="transportBean" />

	<bean id="transportBean" class="YourTransportBean"/>

You simply could write a class  YourTransportBean with one method

String callTransport(String request) {

Camel would give your class the soap request and you return the soap response from the service
after calling it how you like. Camel also supports streams here if that matches better.
May I ask what kind of transport you want to use? Perhaps camel supports it.

>From the cxf side you can use the greeterProxy like any cxf http proxy.

If you would like to offer your special service to several clients you could alternatively
do something like
<from uri="jetty:http://localhost:8080/service"/>
<bean ref=" transportBean "/>
In this way you create a http proxy for your service that behaves like a nice soap/http service.


-----Urspr√ľngliche Nachricht-----
Von: tuxboxxer [] 
Gesendet: Freitag, 25. Februar 2011 22:59
Betreff: manual SOAP generation via wsdl2java generated classes

I'm using Apache CXF's wsdl2java tool to generate java interface classes from a web service
with which I'm trying to interact. 

I'd like to use these generated classes in some manner to build up a Java object, then serialize
to a SOAP message which I must be able to send through a separate transport (outside of CXF).

Once I've sent the serialized SOAP (as a string of XML) to the web service, and receive a
response back, I'd like to then utilize the generated classes again to parse the SOAP response
(as a string) and build appropriate objects for me. 

How can this be done?

Thus far, I've been able to successfully generate java classes, but have been unsuccessful
in trying to build a simple request object using them, (utilizing the xmlbeans databinding
during wsdl2java generation). When I try to simply use one of the generated object factories
to create a new instance, I receive the following error:


View this message in context:
Sent from the cxf-user mailing list archive at

View raw message