2008/11/6 Joshua Partogi <[EMAIL PROTECTED]>:
> hi all,
>
> I was wondering whether anyone has worked cxf on jetty here? Does it
> work? Because mine does not work on jetty, but works on tomcat. Would
> you share what you have done to make it work on jetty?

I use jetty in the testing phase, before building a war to deploy to
tomcat. Seems to work fine. I followed the general outline described
here under "Testing SOAP calls with the Endpoint class":

http://www.jroller.com/gmazza/entry/writing_junit_test_cases_for#testep

It's pretty simple, you don't even need to import any jetty classes
yourself, CXF does it for you under the covers. Basically I publish
the service endpoints like this:

Endpoint ep =  Endpoint.publish( "http://localhost:9001/CodaCath";,
                                new CodaCathProvider() );

CodaCathProvider is a class implementing javax.xml.ws.Provider and
annotated with @WebServiceProvider (i.e. it generates raw xml) but in
the tutorial it uses the same method to publish a regular @WebService
implementor.

If you do happen to be using Provider, my class is declared like this:

@WebServiceProvider( portName = "CodaCathPort",
                 serviceName = "CodaCathService",
                 targetNamespace = "http://cathdb.info/FuncNet_0_1/"; )
public class CodaCathProvider implements Provider<StreamSource>
...

If you're using databinding like most people, follow the steps in the
tutorial and you'll get there. What problem were you getting exactly,
anyway?

Andrew.

Reply via email to