cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Kulp <dk...@apache.org>
Subject Re: Help: POJO + Servlet transport
Date Wed, 30 Jul 2008 12:27:27 GMT

That SHOULD be all that is necessary.  You might need to add a:

f.setAddress("/MyService");

to make it start up on the right URL.   (that would end up at:
http://localhost:8080/warname/services/MyService)


Dan



On Jul 30, 2008, at 8:15 AM, Ian McDonagh wrote:

> My servlet code looks like this:
>
> public class CxfServlet extends CXFNonSpringServlet {
>
>  @Override
>  public void loadBus(ServletConfig servletConfig) throws  
> ServletException {
>    super.loadBus(servletConfig);
>
>    Bus bus = getBus();
>    BusFactory.setDefaultBus(bus);
>    ServerFactoryBean f = new ServerFactoryBean();
>    f.setServiceClass(MyService.class);
>    f.setServiceBean(new MyService());
>    f.create();
>    ???
>  }
>
> }
>
> I'm missing the code that actually connects my service with the  
> servlet.
>
> How would I do that.
>
> Sorry for many questions.
>
> - Ian
>
>
>
>
> ----- Original Message ----
> From: Daniel Kulp <dkulp@apache.org>
> To: users@cxf.apache.org
> Sent: Wednesday, 30 July, 2008 1:51:43 PM
> Subject: Re: Help: POJO + Servlet transport
>
>
> On Jul 30, 2008, at 7:37 AM, Ian McDonagh wrote:
>
>> I have created a servlet that subclasses CXFNonSpringServlet.
>>
>> I would like to make my POJO service class available via the servlet
>> using the simple fontend.
>>
>> Is that possible?
>>
>
> Yea, same way.   Just use the
> org.apache.cxf.frontend.ServerFactoryBean factory.
>
> Dan
>
>
>
>
>> Thanks for your help.
>>
>> - Ian
>>
>>
>>
>> ----- Original Message ----
>> From: Daniel Kulp <dkulp@apache.org>
>> To: users@cxf.apache.org
>> Sent: Wednesday, 30 July, 2008 11:49:01 AM
>> Subject: Re: Help: POJO + Servlet transport
>>
>>
>> I see it at:
>> http://cxf.apache.org/javadoc/2.1.1/org/apache/cxf/jaxws/JaxWsServerFactoryBean.html
>>
>> Dan
>>
>>
>>
>> On Jul 30, 2008, at 2:45 AM, Ian McDonagh wrote:
>>
>>> Hi Dan
>>>
>>> Thanks for your help.
>>>
>>> Strangely, the class JaxWsServerFactoryBean does not show up in the
>>> javadocs.  I'm using version 2.1.1.
>>>
>>> Am I missing something?
>>>
>>> - Ian
>>>
>>>
>>>
>>> ----- Original Message ----
>>> From: Daniel Kulp <dkulp@apache.org>
>>> To: users@cxf.apache.org
>>> Sent: Tuesday, 29 July, 2008 4:52:48 PM
>>> Subject: Re: Help: POJO + Servlet transport
>>>
>>>
>>> In your subclass, you can pretty much do whatever you want.    You
>>> can
>>> use the JAX-WS Endpoint.create(....) stuff if you want.   You can  
>>> use
>>> the JaxWsServerFactoryBean.    Etc.....
>>>
>>>
>>> Dan
>>>
>>>
>>> On Jul 29, 2008, at 9:25 AM, Ian McDonagh wrote:
>>>
>>>> Hi all
>>>>
>>>> I'd like to have a web service with the following configuration:
>>>>
>>>> Service interface and implementation: POJO (no annotations)
>>>> Transport: HTTP Servlet (to be deployed to servlet container, eg.
>>>> Tomcat)
>>>> No dependency on Spring for configuration.
>>>>
>>>> Is this possible?
>>>>
>>>> From what I can tell, you need to subclass CXFNonSpringServlet, but
>>>> I can't figure out how to publish the service.
>>>>
>>>> Do I have to use XML or can I do it with the API's only?
>>>>
>>>> Any help would be greatly appreciated.
>>>>
>>>> Thanks.
>>>>
>>>> Ian
>>>>
>>>>
>>>>
>>>>   __________________________________________________________
>>>> Not happy with your email address?.
>>>> Get the one you really want - millions of new email addresses
>>>> available now at Yahoo! http://uk.docs.yahoo.com/ymail/new.html
>>>
>>> ---
>>> Daniel Kulp
>>> dkulp@apache.org
>>> http://www.dankulp.com/blog
>>>
>>>
>>>    __________________________________________________________
>>> Not happy with your email address?.
>>> Get the one you really want - millions of new email addresses
>>> available now at Yahoo! http://uk.docs.yahoo.com/ymail/new.html
>>
>> ---
>> Daniel Kulp
>> dkulp@apache.org
>> http://www.dankulp.com/blog
>>
>>
>>     __________________________________________________________
>> Not happy with your email address?.
>> Get the one you really want - millions of new email addresses
>> available now at Yahoo! http://uk.docs.yahoo.com/ymail/new.html
>
> ---
> Daniel Kulp
> dkulp@apache.org
> http://www.dankulp.com/blog
>
>
>      __________________________________________________________
> Not happy with your email address?.
> Get the one you really want - millions of new email addresses  
> available now at Yahoo! http://uk.docs.yahoo.com/ymail/new.html

---
Daniel Kulp
dkulp@apache.org
http://www.dankulp.com/blog





Mime
View raw message