cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Willem Jiang <>
Subject Re: Getting started with JAX-WS
Date Fri, 19 Jan 2007 16:56:08 GMT
Hi Cameron,

I just took a look at cxf-rt-transports-http2 's return the service wsdl 
for the query string with 'wsdl'.
It is real a bug for the cxf-rt-transports-http2.  I had done a quick 
fix for it, please see the latest code in the repository.

Thank you for your trying and giving the feedback.

CXF supports the REST and the urls those you ask for the service should be :



Cameron Taggart wrote:
> Hi Willem,
> Thanks for your help.  Where do I find the hello_world JAX-WS example?
> I've been hacking away.  This is partially working:
> Bus bus = BusFactoryHelper.newInstance().createBus();
> SoapTransportFactory soap = new SoapTransportFactory();
> soap.setBus(bus);
> HTTPTransportFactory http = new HTTPTransportFactory();
> http.setBus(bus);
> JaxWsServerFactoryBean sf = new JaxWsServerFactoryBean();
> sf.setBus(bus);
> sf.setAddress("http://localhost:9000/hello");
> //        sf.setServiceClass(Hello.class);
> Hello hello = new Hello();
> hello.addGreeting("hola");
> sf.setServiceBean(hello);
> sf.create();
> Attached is the whole as well as the modified
>  The problem I am having now is that a new Hello instance
> gets created for each SOAP request.  I was hoping that it would use
> the service bean that I set with setServiceBean().  Anyway to make
> this happen?
> Just a note, the  cxf-rt-transports-http works as expected and I can
> get the WSDL at:
> http://localhost:9000/hello?wsdl
> But the cxf-rt-transports-http2 seams to default to the rest style, I
> think.  I can't get the WSDL at the above URL, but these URL's work:
> http://localhost:9000/getGrettings
> http://localhost:9000/sayHi?text=Cameron
> cheers,
> Cameron
> On 1/17/07, Willem Jiang <> wrote:
>> Hi Cameron,
>> Just as Jervis had said, you can use the JAX-WS API as the hello_world
>> sample had showed to create Web Services.
>> I just read quick look at your code. If you want to use the
>> JaxWsServiceFactoryBean, I can give you some points about the
>> BusExtension stuff.
>> 1.  The Bus keeps all the extension stuff in it hashmap, so the rt-code
>> can know nothing about the binding and transport , in that way we can
>> make our CXF more pluggable.
>> 2.  The Bus will automatically register the extension by look up the
>> spring configuration file cxf-extension-* in the classpath. (Seeing
>> SpringBusFactory and BusApplicationContext for more detail things)
>> 3.  You can hack the bus extension by write the hard code, just like
>> AbstractJaxWsTest.
>> I checked your code, you had created the bus and setup the bus to the
>> JaxWsServiceFactoryBean .
>> I think the real reason which you can't get the DestinationFactory with
>> the namespace "" is your
>> project did not add the cxf-rt-transport-http as your depended project.
>> I guess you just add this code in the cxf-rt-frontend-jaxws project. And
>> In the cxf-rt-frontend-jaxws, we skip the cxf-rt-transport-http and
>> using the local transport for sending message, so the namespace
>> ""  will not be resisted with
>> the bus. If you want to do this with code, you can find the detail codes
>> in AbstractJaxWsTest.
>> Enjoy your hacking work in CXF.
>> Willem.

View raw message