You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Nuwan Arambage <nu...@gmail.com> on 2011/09/28 09:10:13 UTC

Purpose of cxf-servlet.xml file

Hi All,

I'm new to cxf and I manged to run the java_first_jaxws and
java_first_pojo in samples folder bundled in cxf distribution. When I
go through code I find that cxf-servlet.xml file is there. I would
like to know the purpose of this file and I have noted, for these
examples(java_first_jaxws and java_first_pojo) cxf-servlet.xml file is
different. In pojo example, I couldn't see webservice annotations.

Hopefully, expecting a better answer from you...

Thanks
--
 Fail again. Fail better

With Regards ,
Nuwan  Arambage

Re: Purpose of cxf-servlet.xml file

Posted by Glen Mazza <gl...@gmail.com>.
I just put in CXF-3831 for that, at least for the intro level java-first 
and wsdl-first examples.  I found it redundant to repeat it for every 
CXF example, because it clutters the pom.xmls with new profiles and 
library (jetty) exemptions, which distracts the reader from the specific 
technologies each example is intended to teach.

Glen

On 09/28/2011 09:49 AM, Daniel Kulp wrote:
> On Wednesday, September 28, 2011 12:08:23 PM Christian Schneider wrote:
>> Yes, but the java_first_jaxws example does not seem to use a servlet or
>> am I wrong there?
> I think most of the are remnants from the now-removed Ant build.xml files.
> Several of those did have "war" targets along with the client and server
> targets.  Thus, the cxf-servlet.xml files that you see are likely for the
> examples that did have the war target.    Most of those can be removed or the
> pom could be updated for packaging war and such.    Either way.  :-)
>
> Dan
>
>
>
>> Christian
>>
>> Am 28.09.2011 11:40, schrieb Willem Jiang:
>>> cxf-servlet.xml will be loaded by CXFServlet for publishing the
>>> endpoints.
>>>
>>> On Wed Sep 28 15:30:46 2011, Christian Schneider wrote:
>>>> Hi Arambage,
>>>>
>>>> cxf-servlet.xml is a spring config to start the cxf endpoint as a
>>>> servlet in a container. I just checked the java_first_jaxws demo.
>>>> I could simply remove the cxf-servlet.xml and the demo still works. So
>>>> I guess it is a leftover from when the example also had a mode to run
>>>> it in tomcat.
>>>>
>>>> The calls "mvn -Pserver" and "mvn -Pclient" work without it.
>>>>
>>>> Christian
>>>>
>>>> Am 28.09.2011 09:10, schrieb Nuwan Arambage:
>>>>> Hi All,
>>>>>
>>>>> I'm new to cxf and I manged to run the java_first_jaxws and
>>>>> java_first_pojo in samples folder bundled in cxf distribution. When
>>>>> I
>>>>> go through code I find that cxf-servlet.xml file is there. I would
>>>>> like to know the purpose of this file and I have noted, for these
>>>>> examples(java_first_jaxws and java_first_pojo) cxf-servlet.xml file
>>>>> is
>>>>> different. In pojo example, I couldn't see webservice annotations.
>>>>>
>>>>> Hopefully, expecting a better answer from you...
>>>>>
>>>>> Thanks
>>>>>
>>>>> With Regards ,
>>>>> Nuwan Arambage


-- 
Glen Mazza
Talend - http://www.talend.com/ai
Blog - http://www.jroller.com/gmazza
Twitter - glenmazza


Re: Purpose of cxf-servlet.xml file

Posted by Daniel Kulp <dk...@apache.org>.
On Wednesday, September 28, 2011 12:08:23 PM Christian Schneider wrote:
> Yes, but the java_first_jaxws example does not seem to use a servlet or
> am I wrong there?

I think most of the are remnants from the now-removed Ant build.xml files.   
Several of those did have "war" targets along with the client and server 
targets.  Thus, the cxf-servlet.xml files that you see are likely for the 
examples that did have the war target.    Most of those can be removed or the 
pom could be updated for packaging war and such.    Either way.  :-)

Dan



> Christian
> 
> Am 28.09.2011 11:40, schrieb Willem Jiang:
> > cxf-servlet.xml will be loaded by CXFServlet for publishing the
> > endpoints.
> > 
> > On Wed Sep 28 15:30:46 2011, Christian Schneider wrote:
> >> Hi Arambage,
> >> 
> >> cxf-servlet.xml is a spring config to start the cxf endpoint as a
> >> servlet in a container. I just checked the java_first_jaxws demo.
> >> I could simply remove the cxf-servlet.xml and the demo still works. So
> >> I guess it is a leftover from when the example also had a mode to run
> >> it in tomcat.
> >> 
> >> The calls "mvn -Pserver" and "mvn -Pclient" work without it.
> >> 
> >> Christian
> >> 
> >> Am 28.09.2011 09:10, schrieb Nuwan Arambage:
> >>> Hi All,
> >>> 
> >>> I'm new to cxf and I manged to run the java_first_jaxws and
> >>> java_first_pojo in samples folder bundled in cxf distribution. When
> >>> I
> >>> go through code I find that cxf-servlet.xml file is there. I would
> >>> like to know the purpose of this file and I have noted, for these
> >>> examples(java_first_jaxws and java_first_pojo) cxf-servlet.xml file
> >>> is
> >>> different. In pojo example, I couldn't see webservice annotations.
> >>> 
> >>> Hopefully, expecting a better answer from you...
> >>> 
> >>> Thanks
> >>> 
> >>> With Regards ,
> >>> Nuwan Arambage
-- 
Daniel Kulp
dkulp@apache.org
http://dankulp.com/blog
Talend - http://www.talend.com

Re: Purpose of cxf-servlet.xml file

Posted by Christian Schneider <ch...@die-schneider.net>.
Yes, but the java_first_jaxws example does not seem to use a servlet or 
am I wrong there?

Christian


Am 28.09.2011 11:40, schrieb Willem Jiang:
> cxf-servlet.xml will be loaded by CXFServlet for publishing the 
> endpoints.
>
> On Wed Sep 28 15:30:46 2011, Christian Schneider wrote:
>> Hi Arambage,
>>
>> cxf-servlet.xml is a spring config to start the cxf endpoint as a
>> servlet in a container. I just checked the java_first_jaxws demo.
>> I could simply remove the cxf-servlet.xml and the demo still works. So
>> I guess it is a leftover from when the example also had a mode to run
>> it in tomcat.
>>
>> The calls "mvn -Pserver" and "mvn -Pclient" work without it.
>>
>> Christian
>>
>> Am 28.09.2011 09:10, schrieb Nuwan Arambage:
>>> Hi All,
>>>
>>> I'm new to cxf and I manged to run the java_first_jaxws and
>>> java_first_pojo in samples folder bundled in cxf distribution. When I
>>> go through code I find that cxf-servlet.xml file is there. I would
>>> like to know the purpose of this file and I have noted, for these
>>> examples(java_first_jaxws and java_first_pojo) cxf-servlet.xml file is
>>> different. In pojo example, I couldn't see webservice annotations.
>>>
>>> Hopefully, expecting a better answer from you...
>>>
>>> Thanks
>>> -- 
>>> Fail again. Fail better
>>>
>>> With Regards ,
>>> Nuwan Arambage
>>>
>>
>
>


-- 
--
Christian Schneider
http://www.liquid-reality.de

Open Source Architect
Talend Application Integration Division http://www.talend.com


Re: Purpose of cxf-servlet.xml file

Posted by Willem Jiang <wi...@gmail.com>.
cxf-servlet.xml will be loaded by CXFServlet for publishing the endpoints.

On Wed Sep 28 15:30:46 2011, Christian Schneider wrote:
> Hi Arambage,
>
> cxf-servlet.xml is a spring config to start the cxf endpoint as a
> servlet in a container. I just checked the java_first_jaxws demo.
> I could simply remove the cxf-servlet.xml and the demo still works. So
> I guess it is a leftover from when the example also had a mode to run
> it in tomcat.
>
> The calls "mvn -Pserver" and "mvn -Pclient" work without it.
>
> Christian
>
> Am 28.09.2011 09:10, schrieb Nuwan Arambage:
>> Hi All,
>>
>> I'm new to cxf and I manged to run the java_first_jaxws and
>> java_first_pojo in samples folder bundled in cxf distribution. When I
>> go through code I find that cxf-servlet.xml file is there. I would
>> like to know the purpose of this file and I have noted, for these
>> examples(java_first_jaxws and java_first_pojo) cxf-servlet.xml file is
>> different. In pojo example, I couldn't see webservice annotations.
>>
>> Hopefully, expecting a better answer from you...
>>
>> Thanks
>> --
>> Fail again. Fail better
>>
>> With Regards ,
>> Nuwan Arambage
>>
>


-- 
Willem
----------------------------------
FuseSource
Web: http://www.fusesource.com
Blog:    http://willemjiang.blogspot.com (English)
          http://jnn.javaeye.com (Chinese)
Twitter: willemjiang
Weibo: willemjiang

Re: Purpose of cxf-servlet.xml file

Posted by Christian Schneider <ch...@die-schneider.net>.
Hi Arambage,

cxf-servlet.xml is a spring config to start the cxf endpoint as a 
servlet in a container. I just checked the java_first_jaxws demo.
I could simply remove the cxf-servlet.xml and the demo still works. So I 
guess it is a leftover from when the example also had a mode to run it 
in tomcat.

The calls  "mvn -Pserver" and "mvn -Pclient"  work without it.

Christian

Am 28.09.2011 09:10, schrieb Nuwan Arambage:
> Hi All,
>
> I'm new to cxf and I manged to run the java_first_jaxws and
> java_first_pojo in samples folder bundled in cxf distribution. When I
> go through code I find that cxf-servlet.xml file is there. I would
> like to know the purpose of this file and I have noted, for these
> examples(java_first_jaxws and java_first_pojo) cxf-servlet.xml file is
> different. In pojo example, I couldn't see webservice annotations.
>
> Hopefully, expecting a better answer from you...
>
> Thanks
> --
>   Fail again. Fail better
>
> With Regards ,
> Nuwan  Arambage
>

-- 
Christian Schneider
http://www.liquid-reality.de

Open Source Architect
http://www.talend.com


Re: Purpose of cxf-servlet.xml file

Posted by Glen Mazza <gl...@gmail.com>.
explained here (and in other guides on the CXF Resources page): 
http://www.jroller.com/gmazza/entry/web_service_tutorial

On 09/28/2011 03:10 AM, Nuwan Arambage wrote:
> Hi All,
>
> I'm new to cxf and I manged to run the java_first_jaxws and
> java_first_pojo in samples folder bundled in cxf distribution. When I
> go through code I find that cxf-servlet.xml file is there. I would
> like to know the purpose of this file and I have noted, for these
> examples(java_first_jaxws and java_first_pojo) cxf-servlet.xml file is
> different. In pojo example, I couldn't see webservice annotations.
>
> Hopefully, expecting a better answer from you...
>
> Thanks
> --
>   Fail again. Fail better
>
> With Regards ,
> Nuwan  Arambage


-- 
Glen Mazza
Talend - http://www.talend.com/ai
Blog - http://www.jroller.com/gmazza
Twitter - glenmazza