You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Forum Specific <fo...@gmail.com> on 2008/10/28 11:35:25 UTC

[JAX-RS]integration with spring+Tomcat

Hi all,

I want sample tutorial or code for Restful Web Services for  JAX-RS API
integration with Spring using CXF framework by deploying on Tomcat.
Does anybody have this kind of link where I can find sample code for the
same.

Thanks in advance.

Regards,
RT

Re: [JAX-RS]integration with spring+Tomcat

Posted by Forum Specific <fo...@gmail.com>.
Hi all,

Now I simple took the sample code from jaxrs SAMPLES of
CXF-APACHE-2.1.2.Noconfoguration issues are coming up now.
But now it is giving me

the following msg at cleint console

 *-*<http://localhost:8080/fetchfirst-webservice-1.0-SNAPSHOT/customerservice#>
<ns1:XMLFault xmlns:ns1="*http://cxf.apache.org/bindings/xformat*">
 * * <ns1:faultstring xmlns:ns1="*http://cxf.apache.org/bindings/xformat*">*.No
operation matching request path /customerservice/ is found, ContentType :
*/*, Accept : image/gif, image/x-xbitmap, image/jpeg, image/pjpeg,
application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword,
application/x-shockwave-flash, application/x-ms-application,
application/x-ms-xbap, application/vnd.ms-xpsdocument, application/xaml+xml,
*/*.*</ns1:faultstring>
* * </ns1:XMLFault>

Please provide me ur valuable inputs to remove this prob.

Regards,
FS



On Wed, Oct 29, 2008 at 3:00 PM, Forum Specific <fo...@gmail.com>wrote:

>
> Hi,
>
> Whatever you have suggested I made changes according to that.But still
> facing the same prob.I am sending you my web.xml,cxf-rest.xml files also
> please find it in the attachment.I think some prob is in the CXF-rest.xml
> file only. I am not having  any  document for <jaxrs:server> tag.So i am not
> clear abt this particular tag .How this tag is work around.
>  Please help me out this is really very urgent.
>
>
>   FS
>
>
>
>
> On Wed, Oct 29, 2008 at 1:22 PM, Gabo Manuel <km...@solegysystems.com>wrote:
>
>> Hi,
>>
>> 1. add <import
>> resource="classpath:META-INF/cxf/cxf-extension-jaxrs-binding.xml" /> to
>> beans.xml. I think the httpbinding resource could be removed since you are
>> not using http binding.
>> 2. add http://cxf.apache.org/jaxrs in the schemalocation property of
>> beans tag.
>> 3. Don't mix and match jax-rs and jax-ws tags,i.e. javax.ws.rs.GET and
>> org.codehaus.jra.Get
>> 4. I'm not sure how your complex objects would fit in the path as param,
>> especially for POST. shouldn't it be in the payload of POST?
>>
>> How do you define the web.xml file?
>>
>> Gabo
>>
>> P.S. I'm attaching the objects sent earlier.
>>
>> Forum Specific wrote:
>>
>>
>>
>>> Hi,
>>>
>>> I have attached my  cxf-rest.xml file which contains jaxrs:server mapping
>>> and also the java classes which will be required for the mapping of bean.
>>> When I moved cxf.xml file in to WEB-INF/classes folder then tomcat container
>>> is not giving cxf.xml not found warning.All the XML file whichever is
>>> mentioned in cxf-rest.xml file is under WEB-INF folder.
>>> But still giving the warning on Tomcat console :
>>>
>>
>> Oct 29, 2008 12:58:19 PM org.apache.cxf.transport.servlet.CXFServlet
>> updateContext
>> INFO: Load the bus without application context
>>
>> Regards,
>> forum specific
>>
>>>
>>>
>>>
>>> On Wed, Oct 29, 2008 at 12:53 PM, Gabo Manuel <kmanuel@solegysystems.com
>>> > wrote:
>>>
>>>> Hi,
>>>>
>>>> How does tomcat unwrap the war file? what does the cxf.xml (and other
>>>> xmls) look like and where are they located after start up? Could you paste a
>>>> section of the configuration files?
>>>>
>>>> Gabo
>>>>
>>>> Forum Specific wrote:
>>>>
>>>>> Hi All,
>>>>>
>>>>> My second problem(INFO: No cxf.xml configuration file detected, relying
>>>>> on
>>>>> defaults) hasbeen solved but my first problem is still there("INFO:
>>>>> Load the
>>>>> bus without application context")
>>>>> Please help me out this is very urgent :(.
>>>>>
>>>>> Reagrds,
>>>>> FS
>>>>>
>>>>
>>
>
>

Re: [JAX-RS]integration with spring+Tomcat

Posted by Gabo Manuel <km...@solegysystems.com>.
Hi,

Hmm... I'm not sure what is going wrong. Others?

But do try transferring the class level @Path and @ProduceMime of the 
interface to the implementation. Also, are the objects Orders and Order 
have their respective @XmlRootElement annotations?

Hth.

Gabo

Forum Specific wrote:
>
> Hi,
>  
> Whatever you have suggested I made changes according to that.But still 
> facing the same prob.I am sending you my web.xml,cxf-rest.xml files 
> also please find it in the attachment.I think some prob is in the 
> CXF-rest.xml file only. I am not having  any  document for 
> <jaxrs:server> tag.So i am not clear abt this particular tag .How this 
> tag is work around.
> Please help me out this is really very urgent.
>  
>  
> FS

Re: [JAX-RS]integration with spring+Tomcat

Posted by Forum Specific <fo...@gmail.com>.
I forgot to mention one thing is that I also import one more XML in my
cxf-rest.xml  as suggested by IAN and GABO i.e. <import
resource="cxf-extension-jaxrs-binding.xml"/>

Thanks IAN and GABO for providing me valuable inputs.

Reagrds,
FS


On Thu, Oct 30, 2008 at 10:17 AM, Forum Specific <fo...@gmail.com>wrote:

> Hi,
>
>
>
> Thanks for the reply.
>
> The problem has been fixed.The problem was  with the mime type which
> client program was sending to Rest-Web service.Now my problem has been fixed
> and it is working fine now.
>
>
>
> Thanks,
>
> FS
>
>
>  On Thu, Oct 30, 2008 at 9:56 AM, Gabo Manuel <km...@solegysystems.com>wrote:
>
>> Hi,
>>
>> Well, the error message speaks for itself,
>>
>> No operation matching request path /customerservice/ is found
>>
>> If the application is deployed in tomcat then the access url is as
>> follows:
>>
>> http://localhost:8080/<webapps folder>/services/customerservice/
>>
>> Some notes:
>>
>> webapps folder should match the folder name as is.
>> the services keyword is dependent on the web.xml configuration.
>>
>> Also, the customerservice should match the path you stated in the
>> annotation of the class + the path stated in the annotation of the method.
>>
>> Hth.
>>
>> Forum Specific wrote:
>>
>>>  Hi Ian,
>>>
>>> Thanks for getin matter insight.I have already fixed that problem and the
>>> problem was that I was following some other example which I have
>>> implemented
>>> in JAX-WS earlier.So finally I left all the things and just strictly
>>> followed the sample code which is given in CXF-2.1.2 .
>>> So now I am not getting any configuration issues , But I am getting one
>>> exception on client console is
>>>
>>>
>>>
>>>  <ns1:XMLFault xmlns:ns1="*http://cxf.apache.org/bindings/xformat*">
>>>  * * <ns1:faultstring xmlns:ns1="*
>>> http://cxf.apache.org/bindings/xformat*">*.No
>>> operation matching request path /customerservice/ is found, ContentType :
>>> */*, Accept : image/gif, image/x-xbitmap, image/jpeg, image/pjpeg,
>>> application/vnd.ms-excel, application/vnd.ms-powerpoint,
>>> application/msword,
>>> application/x-shockwave-flash, application/x-ms-application,
>>> application/x-ms-xbap, application/vnd.ms-xpsdocument,
>>> application/xaml+xml,
>>> */*.*</ns1:faultstring>
>>> * * </ns1:XMLFault>
>>>
>>>
>>> Regarding this I have already sent mail on this forum.
>>> If you please help me out  to fix this problem then It will be greatful.
>>>
>>> Regards,
>>> FS
>>>
>>>
>>>
>>>
>>>
>>> On Wed, Oct 29, 2008 at 5:40 PM, Ian Roberts <i.roberts@dcs.shef.ac.uk
>>> >wrote:
>>>
>>>
>>>
>>>> Forum Specific wrote:
>>>>
>>>>
>>>>> Hi,
>>>>>
>>>>> Whatever you have suggested I made changes according to that.But still
>>>>> facing the same prob.I am sending you my web.xml,cxf-rest.xml files
>>>>> also
>>>>> please find it in the attachment.I think some prob is in the
>>>>> CXF-rest.xml file only. I am not having  any  document for
>>>>> <jaxrs:server> tag.So i am not clear abt this particular tag .How this
>>>>> tag is work around.
>>>>>
>>>>>
>>>> Gabo has already mentioned the examples at
>>>> http://cwiki.apache.org/CXF20DOC/jax-rs-jsr-311.html, I suggest you
>>>> read
>>>> this page and follow the example carefully.  In particular:
>>>>
>>>> - The main thing you're currently missing is the Spring context loader
>>>> listener in your web.xml
>>>>
>>>> <listener>
>>>>  <listener-class>
>>>>   org.springframework.web.context.ContextLoaderListener
>>>>  </listener-class>
>>>> </listener>
>>>>
>>>> - change the imports in your cxf-rest.xml to match the ones in the
>>>> example, i.e.
>>>>
>>>> <import resource="classpath:META-INF/cxf/cxf.xml" />
>>>> <import
>>>> resource="classpath:META-INF/cxf/cxf-extension-jaxrs-binding.xml"
>>>> />
>>>> <import resource="classpath:META-INF/cxf/cxf-servlet.xml" />
>>>>
>>>> - delete the cxf-extension-*, cxf-servlet and cxf.xml files from your
>>>> WEB-INF, they don't need to be there as the classpath: URLs will load
>>>> them directly from inside the relevant JAR files.
>>>>
>>>> You don't need to import the http-binding extension, just the jaxrs one.
>>>>
>>>> Ian
>>>>
>>>> --
>>>> Ian Roberts               | Department of Computer Science
>>>> i.roberts@dcs.shef.ac.uk  | University of Sheffield, UK
>>>>
>>>>
>>>>
>>>
>>>
>>>  ------------------------------------------------------------------------
>>>
>>>
>>> No virus found in this incoming message.
>>> Checked by AVG - http://www.avg.com Version: 8.0.175 / Virus Database:
>>> 270.8.5/1755 - Release Date: 10/29/2008 5:27 PM
>>>
>>>
>>>
>>
>

Re: [JAX-RS]integration with spring+Tomcat

Posted by Forum Specific <fo...@gmail.com>.
Hi,



Thanks for the reply.

The problem has been fixed.The problem was  with the mime type which client
program was sending to Rest-Web service.Now my problem has been fixed and it
is working fine now.



Thanks,

FS


On Thu, Oct 30, 2008 at 9:56 AM, Gabo Manuel <km...@solegysystems.com>wrote:

> Hi,
>
> Well, the error message speaks for itself,
>
> No operation matching request path /customerservice/ is found
>
> If the application is deployed in tomcat then the access url is as follows:
>
> http://localhost:8080/<webapps folder>/services/customerservice/
>
> Some notes:
>
> webapps folder should match the folder name as is.
> the services keyword is dependent on the web.xml configuration.
>
> Also, the customerservice should match the path you stated in the
> annotation of the class + the path stated in the annotation of the method.
>
> Hth.
>
> Forum Specific wrote:
>
>> Hi Ian,
>>
>> Thanks for getin matter insight.I have already fixed that problem and the
>> problem was that I was following some other example which I have
>> implemented
>> in JAX-WS earlier.So finally I left all the things and just strictly
>> followed the sample code which is given in CXF-2.1.2 .
>> So now I am not getting any configuration issues , But I am getting one
>> exception on client console is
>>
>>
>>
>> <ns1:XMLFault xmlns:ns1="*http://cxf.apache.org/bindings/xformat*">
>>  * * <ns1:faultstring xmlns:ns1="*http://cxf.apache.org/bindings/xformat*
>> ">*.No
>> operation matching request path /customerservice/ is found, ContentType :
>> */*, Accept : image/gif, image/x-xbitmap, image/jpeg, image/pjpeg,
>> application/vnd.ms-excel, application/vnd.ms-powerpoint,
>> application/msword,
>> application/x-shockwave-flash, application/x-ms-application,
>> application/x-ms-xbap, application/vnd.ms-xpsdocument,
>> application/xaml+xml,
>> */*.*</ns1:faultstring>
>> * * </ns1:XMLFault>
>>
>>
>> Regarding this I have already sent mail on this forum.
>> If you please help me out  to fix this problem then It will be greatful.
>>
>> Regards,
>> FS
>>
>>
>>
>>
>>
>> On Wed, Oct 29, 2008 at 5:40 PM, Ian Roberts <i.roberts@dcs.shef.ac.uk
>> >wrote:
>>
>>
>>
>>> Forum Specific wrote:
>>>
>>>
>>>> Hi,
>>>>
>>>> Whatever you have suggested I made changes according to that.But still
>>>> facing the same prob.I am sending you my web.xml,cxf-rest.xml files also
>>>> please find it in the attachment.I think some prob is in the
>>>> CXF-rest.xml file only. I am not having  any  document for
>>>> <jaxrs:server> tag.So i am not clear abt this particular tag .How this
>>>> tag is work around.
>>>>
>>>>
>>> Gabo has already mentioned the examples at
>>> http://cwiki.apache.org/CXF20DOC/jax-rs-jsr-311.html, I suggest you read
>>> this page and follow the example carefully.  In particular:
>>>
>>> - The main thing you're currently missing is the Spring context loader
>>> listener in your web.xml
>>>
>>> <listener>
>>>  <listener-class>
>>>   org.springframework.web.context.ContextLoaderListener
>>>  </listener-class>
>>> </listener>
>>>
>>> - change the imports in your cxf-rest.xml to match the ones in the
>>> example, i.e.
>>>
>>> <import resource="classpath:META-INF/cxf/cxf.xml" />
>>> <import resource="classpath:META-INF/cxf/cxf-extension-jaxrs-binding.xml"
>>> />
>>> <import resource="classpath:META-INF/cxf/cxf-servlet.xml" />
>>>
>>> - delete the cxf-extension-*, cxf-servlet and cxf.xml files from your
>>> WEB-INF, they don't need to be there as the classpath: URLs will load
>>> them directly from inside the relevant JAR files.
>>>
>>> You don't need to import the http-binding extension, just the jaxrs one.
>>>
>>> Ian
>>>
>>> --
>>> Ian Roberts               | Department of Computer Science
>>> i.roberts@dcs.shef.ac.uk  | University of Sheffield, UK
>>>
>>>
>>>
>>
>>  ------------------------------------------------------------------------
>>
>>
>> No virus found in this incoming message.
>> Checked by AVG - http://www.avg.com Version: 8.0.175 / Virus Database:
>> 270.8.5/1755 - Release Date: 10/29/2008 5:27 PM
>>
>>
>>
>

Re: [JAX-RS]integration with spring+Tomcat

Posted by Gabo Manuel <km...@solegysystems.com>.
Hi,

Well, the error message speaks for itself,

No operation matching request path /customerservice/ is found

If the application is deployed in tomcat then the access url is as follows:

http://localhost:8080/<webapps folder>/services/customerservice/

Some notes:

webapps folder should match the folder name as is.
the services keyword is dependent on the web.xml configuration.

Also, the customerservice should match the path you stated in the 
annotation of the class + the path stated in the annotation of the method.

Hth.

Forum Specific wrote:
> Hi Ian,
>
> Thanks for getin matter insight.I have already fixed that problem and the
> problem was that I was following some other example which I have implemented
> in JAX-WS earlier.So finally I left all the things and just strictly
> followed the sample code which is given in CXF-2.1.2 .
> So now I am not getting any configuration issues , But I am getting one
> exception on client console is
>
>  *-*<http://localhost:8080/fetchfirst-webservice-1.0-SNAPSHOT/customerservice#>
> <ns1:XMLFault xmlns:ns1="*http://cxf.apache.org/bindings/xformat*">
>  * * <ns1:faultstring xmlns:ns1="*http://cxf.apache.org/bindings/xformat*">*.No
> operation matching request path /customerservice/ is found, ContentType :
> */*, Accept : image/gif, image/x-xbitmap, image/jpeg, image/pjpeg,
> application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword,
> application/x-shockwave-flash, application/x-ms-application,
> application/x-ms-xbap, application/vnd.ms-xpsdocument, application/xaml+xml,
> */*.*</ns1:faultstring>
> * * </ns1:XMLFault>
>
>
> Regarding this I have already sent mail on this forum.
> If you please help me out  to fix this problem then It will be greatful.
>
> Regards,
> FS
>
>
>
>
>
> On Wed, Oct 29, 2008 at 5:40 PM, Ian Roberts <i....@dcs.shef.ac.uk>wrote:
>
>   
>> Forum Specific wrote:
>>     
>>> Hi,
>>>
>>> Whatever you have suggested I made changes according to that.But still
>>> facing the same prob.I am sending you my web.xml,cxf-rest.xml files also
>>> please find it in the attachment.I think some prob is in the
>>> CXF-rest.xml file only. I am not having  any  document for
>>> <jaxrs:server> tag.So i am not clear abt this particular tag .How this
>>> tag is work around.
>>>       
>> Gabo has already mentioned the examples at
>> http://cwiki.apache.org/CXF20DOC/jax-rs-jsr-311.html, I suggest you read
>> this page and follow the example carefully.  In particular:
>>
>> - The main thing you're currently missing is the Spring context loader
>> listener in your web.xml
>>
>> <listener>
>>  <listener-class>
>>    org.springframework.web.context.ContextLoaderListener
>>  </listener-class>
>> </listener>
>>
>> - change the imports in your cxf-rest.xml to match the ones in the
>> example, i.e.
>>
>> <import resource="classpath:META-INF/cxf/cxf.xml" />
>> <import resource="classpath:META-INF/cxf/cxf-extension-jaxrs-binding.xml"
>> />
>> <import resource="classpath:META-INF/cxf/cxf-servlet.xml" />
>>
>> - delete the cxf-extension-*, cxf-servlet and cxf.xml files from your
>> WEB-INF, they don't need to be there as the classpath: URLs will load
>> them directly from inside the relevant JAR files.
>>
>> You don't need to import the http-binding extension, just the jaxrs one.
>>
>> Ian
>>
>> --
>> Ian Roberts               | Department of Computer Science
>> i.roberts@dcs.shef.ac.uk  | University of Sheffield, UK
>>
>>     
>
>   
> ------------------------------------------------------------------------
>
>
> No virus found in this incoming message.
> Checked by AVG - http://www.avg.com 
> Version: 8.0.175 / Virus Database: 270.8.5/1755 - Release Date: 10/29/2008 5:27 PM
>
>   

Re: [JAX-RS]integration with spring+Tomcat

Posted by Forum Specific <fo...@gmail.com>.
Hi Ian,

Thanks for getin matter insight.I have already fixed that problem and the
problem was that I was following some other example which I have implemented
in JAX-WS earlier.So finally I left all the things and just strictly
followed the sample code which is given in CXF-2.1.2 .
So now I am not getting any configuration issues , But I am getting one
exception on client console is

 *-*<http://localhost:8080/fetchfirst-webservice-1.0-SNAPSHOT/customerservice#>
<ns1:XMLFault xmlns:ns1="*http://cxf.apache.org/bindings/xformat*">
 * * <ns1:faultstring xmlns:ns1="*http://cxf.apache.org/bindings/xformat*">*.No
operation matching request path /customerservice/ is found, ContentType :
*/*, Accept : image/gif, image/x-xbitmap, image/jpeg, image/pjpeg,
application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword,
application/x-shockwave-flash, application/x-ms-application,
application/x-ms-xbap, application/vnd.ms-xpsdocument, application/xaml+xml,
*/*.*</ns1:faultstring>
* * </ns1:XMLFault>


Regarding this I have already sent mail on this forum.
If you please help me out  to fix this problem then It will be greatful.

Regards,
FS





On Wed, Oct 29, 2008 at 5:40 PM, Ian Roberts <i....@dcs.shef.ac.uk>wrote:

> Forum Specific wrote:
> >
> > Hi,
> >
> > Whatever you have suggested I made changes according to that.But still
> > facing the same prob.I am sending you my web.xml,cxf-rest.xml files also
> > please find it in the attachment.I think some prob is in the
> > CXF-rest.xml file only. I am not having  any  document for
> > <jaxrs:server> tag.So i am not clear abt this particular tag .How this
> > tag is work around.
>
> Gabo has already mentioned the examples at
> http://cwiki.apache.org/CXF20DOC/jax-rs-jsr-311.html, I suggest you read
> this page and follow the example carefully.  In particular:
>
> - The main thing you're currently missing is the Spring context loader
> listener in your web.xml
>
> <listener>
>  <listener-class>
>    org.springframework.web.context.ContextLoaderListener
>  </listener-class>
> </listener>
>
> - change the imports in your cxf-rest.xml to match the ones in the
> example, i.e.
>
> <import resource="classpath:META-INF/cxf/cxf.xml" />
> <import resource="classpath:META-INF/cxf/cxf-extension-jaxrs-binding.xml"
> />
> <import resource="classpath:META-INF/cxf/cxf-servlet.xml" />
>
> - delete the cxf-extension-*, cxf-servlet and cxf.xml files from your
> WEB-INF, they don't need to be there as the classpath: URLs will load
> them directly from inside the relevant JAR files.
>
> You don't need to import the http-binding extension, just the jaxrs one.
>
> Ian
>
> --
> Ian Roberts               | Department of Computer Science
> i.roberts@dcs.shef.ac.uk  | University of Sheffield, UK
>

Re: [JAX-RS]integration with spring+Tomcat

Posted by Ian Roberts <i....@dcs.shef.ac.uk>.
Forum Specific wrote:
> 
> Hi,
>  
> Whatever you have suggested I made changes according to that.But still
> facing the same prob.I am sending you my web.xml,cxf-rest.xml files also
> please find it in the attachment.I think some prob is in the
> CXF-rest.xml file only. I am not having  any  document for
> <jaxrs:server> tag.So i am not clear abt this particular tag .How this
> tag is work around.

Gabo has already mentioned the examples at
http://cwiki.apache.org/CXF20DOC/jax-rs-jsr-311.html, I suggest you read
this page and follow the example carefully.  In particular:

- The main thing you're currently missing is the Spring context loader
listener in your web.xml

<listener>
  <listener-class>
    org.springframework.web.context.ContextLoaderListener
  </listener-class>
</listener>

- change the imports in your cxf-rest.xml to match the ones in the
example, i.e.

<import resource="classpath:META-INF/cxf/cxf.xml" />
<import resource="classpath:META-INF/cxf/cxf-extension-jaxrs-binding.xml" />
<import resource="classpath:META-INF/cxf/cxf-servlet.xml" />

- delete the cxf-extension-*, cxf-servlet and cxf.xml files from your
WEB-INF, they don't need to be there as the classpath: URLs will load
them directly from inside the relevant JAR files.

You don't need to import the http-binding extension, just the jaxrs one.

Ian

-- 
Ian Roberts               | Department of Computer Science
i.roberts@dcs.shef.ac.uk  | University of Sheffield, UK

[JAX-RS]integration with spring+Tomcat

Posted by Forum Specific <fo...@gmail.com>.
Hi,

Whatever you have suggested I made changes according to that.But still
facing the same prob.I am sending you my web.xml,cxf-rest.xml files also
please find it in the attachment.I think some prob is in the CXF-rest.xml
file only. I am not having  any  document for <jaxrs:server> tag.So i am not
clear abt this particular tag .How this tag is work around.
Please help me out this is really very urgent.


FS




On Wed, Oct 29, 2008 at 1:22 PM, Gabo Manuel <km...@solegysystems.com>wrote:

> Hi,
>
> 1. add <import
> resource="classpath:META-INF/cxf/cxf-extension-jaxrs-binding.xml" /> to
> beans.xml. I think the httpbinding resource could be removed since you are
> not using http binding.
> 2. add http://cxf.apache.org/jaxrs in the schemalocation property of beans
> tag.
> 3. Don't mix and match jax-rs and jax-ws tags,i.e. javax.ws.rs.GET and
> org.codehaus.jra.Get
> 4. I'm not sure how your complex objects would fit in the path as param,
> especially for POST. shouldn't it be in the payload of POST?
>
> How do you define the web.xml file?
>
> Gabo
>
> P.S. I'm attaching the objects sent earlier.
>
> Forum Specific wrote:
>
>
>
>> Hi,
>>
>> I have attached my  cxf-rest.xml file which contains jaxrs:server mapping
>> and also the java classes which will be required for the mapping of bean.
>> When I moved cxf.xml file in to WEB-INF/classes folder then tomcat container
>> is not giving cxf.xml not found warning.All the XML file whichever is
>> mentioned in cxf-rest.xml file is under WEB-INF folder.
>> But still giving the warning on Tomcat console :
>>
>
> Oct 29, 2008 12:58:19 PM org.apache.cxf.transport.servlet.CXFServlet
> updateContext
> INFO: Load the bus without application context
>
> Regards,
> forum specific
>
>>
>>
>>
>> On Wed, Oct 29, 2008 at 12:53 PM, Gabo Manuel <km...@solegysystems.com>wrote:
>>
>>> Hi,
>>>
>>> How does tomcat unwrap the war file? what does the cxf.xml (and other
>>> xmls) look like and where are they located after start up? Could you paste a
>>> section of the configuration files?
>>>
>>> Gabo
>>>
>>> Forum Specific wrote:
>>>
>>>> Hi All,
>>>>
>>>> My second problem(INFO: No cxf.xml configuration file detected, relying
>>>> on
>>>> defaults) hasbeen solved but my first problem is still there("INFO: Load
>>>> the
>>>> bus without application context")
>>>> Please help me out this is very urgent :(.
>>>>
>>>> Reagrds,
>>>> FS
>>>>
>>>
>

Re: [JAX-RS]integration with spring+Tomcat

Posted by Gabo Manuel <km...@solegysystems.com>.
Hi,

1. add <import 
resource="classpath:META-INF/cxf/cxf-extension-jaxrs-binding.xml" /> to 
beans.xml. I think the httpbinding resource could be removed since you 
are not using http binding.
2. add http://cxf.apache.org/jaxrs in the schemalocation property of 
beans tag.
3. Don't mix and match jax-rs and jax-ws tags,i.e. javax.ws.rs.GET and 
org.codehaus.jra.Get
4. I'm not sure how your complex objects would fit in the path as param, 
especially for POST. shouldn't it be in the payload of POST?

How do you define the web.xml file?

Gabo

P.S. I'm attaching the objects sent earlier.

Forum Specific wrote:
>
>      
>     Hi,
>      
>     I have attached my  cxf-rest.xml file which contains jaxrs:server
>     mapping and also the java classes which will be required for the
>     mapping of bean. When I moved cxf.xml file in to WEB-INF/classes
>     folder then tomcat container is not giving cxf.xml not found
>     warning.All the XML file whichever is mentioned in cxf-rest.xml
>     file is under WEB-INF folder.
>     But still giving the warning on Tomcat console :
>
>  
> Oct 29, 2008 12:58:19 PM org.apache.cxf.transport.servlet.CXFServlet 
> updateContext
> INFO: Load the bus without application context
>  
> Regards,
> forum specific
>
>      
>
>      
>     On Wed, Oct 29, 2008 at 12:53 PM, Gabo Manuel
>     <kmanuel@solegysystems.com <ma...@solegysystems.com>> wrote:
>
>         Hi,
>
>         How does tomcat unwrap the war file? what does the cxf.xml
>         (and other xmls) look like and where are they located after
>         start up? Could you paste a section of the configuration files?
>
>         Gabo
>
>
>         Forum Specific wrote:
>
>             Hi All,
>
>             My second problem(INFO: No cxf.xml configuration file
>             detected, relying on
>             defaults) hasbeen solved but my first problem is still
>             there("INFO: Load the
>             bus without application context")
>             Please help me out this is very urgent :(.
>
>             Reagrds,
>             FS
>
>

Re: [JAX-RS]integration with spring+Tomcat

Posted by Gabo Manuel <km...@solegysystems.com>.
Hi,

How does tomcat unwrap the war file? what does the cxf.xml (and other 
xmls) look like and where are they located after start up? Could you 
paste a section of the configuration files?

Gabo

Forum Specific wrote:
> Hi All,
>
> My second problem(INFO: No cxf.xml configuration file detected, relying on
> defaults) hasbeen solved but my first problem is still there("INFO: Load the
> bus without application context")
> Please help me out this is very urgent :(.
>
> Reagrds,
> FS
>
> On Wed, Oct 29, 2008 at 11:07 AM, Forum Specific <fo...@gmail.com>wrote:
>
>   
>> Hi,
>>
>>
>>
>> Thanks for the prompt reply !!!!!!!!!
>>
>> I have created sample project by using JAX-RS. While deploying the war file
>> on tomcat I am getting following message on console
>>
>> "INFO: Load the bus without application context"
>>
>> I have all the required XML files
>> ("cxf-extension-http-binding.xml,cxf-servlet.xml,cxf.xml) in my WEB-INF
>> folder.
>>
>> But still I am getting the message  INFO: No cxf.xml configuration file
>> detected, relying on defaults.
>>
>> I will be very greatful If somebody help me out..
>>     

Re: [JAX-RS]integration with spring+Tomcat

Posted by Forum Specific <fo...@gmail.com>.
Hi All,

My second problem(INFO: No cxf.xml configuration file detected, relying on
defaults) hasbeen solved but my first problem is still there("INFO: Load the
bus without application context")
Please help me out this is very urgent :(.

Reagrds,
FS

On Wed, Oct 29, 2008 at 11:07 AM, Forum Specific <fo...@gmail.com>wrote:

> Hi,
>
>
>
> Thanks for the prompt reply !!!!!!!!!
>
> I have created sample project by using JAX-RS. While deploying the war file
> on tomcat I am getting following message on console
>
> "INFO: Load the bus without application context"
>
> I have all the required XML files
> ("cxf-extension-http-binding.xml,cxf-servlet.xml,cxf.xml) in my WEB-INF
> folder.
>
> But still I am getting the message  INFO: No cxf.xml configuration file
> detected, relying on defaults.
>
> I will be very greatful If somebody help me out..
>
>
>
> Thanks in advance...
>
>
>
> Regards,
>
> FS
>
>  On Tue, Oct 28, 2008 at 4:16 PM, Gabo Manuel <km...@solegysystems.com>wrote:
>
>> Hi,
>>
>> The user's guide from cxf home page (
>> http://cwiki.apache.org/CXF20DOC/jax-rs-jsr-311.html) is very extensive
>> to have a basic webservice running.
>>
>> If you download a release of cxf, sample programs are available in <root
>> directory>/samples/jax_rs.
>>
>> Deployment in tomcat is pretty much the same as other web applications,
>> i.e. create a folder in webapps, have web.xml and beans.xml in
>> webapps/<root>/WEB-INF, and have all the needed binaries in
>> webapps/<root>/WEB-INF/lib/. <cxf root>/lib/WHICH_JARS should give you a
>> heads-up with regards to which jars you need to include in the said
>> directory.
>>
>> Hth.
>>
>> Gabo
>>
>> Forum Specific wrote:
>>
>>>   Hi all,
>>>
>>> I want sample tutorial or code for Restful Web Services for  JAX-RS API
>>> integration with Spring using CXF framework by deploying on Tomcat.
>>> Does anybody have this kind of link where I can find sample code for the
>>> same.
>>>
>>> Thanks in advance.
>>>
>>> Regards,
>>> FS
>>>  ------------------------------------------------------------------------
>>>
>>>
>>> No virus found in this incoming message.
>>> Checked by AVG - http://www.avg.com Version: 8.0.175 / Virus Database:
>>> 270.8.4/1751 - Release Date: 10/27/2008 10:44 PM
>>>
>>>
>>>
>>
>

Re: [JAX-RS]integration with spring+Tomcat

Posted by Forum Specific <fo...@gmail.com>.
Hi,



Thanks for the prompt reply !!!!!!!!!

I have created sample project by using JAX-RS. While deploying the war file
on tomcat I am getting following message on console

"INFO: Load the bus without application context"

I have all the required XML files
("cxf-extension-http-binding.xml,cxf-servlet.xml,cxf.xml) in my WEB-INF
folder.

But still I am getting the message  INFO: No cxf.xml configuration file
detected, relying on defaults.

I will be very greatful If somebody help me out..



Thanks in advance...



Regards,

FS

On Tue, Oct 28, 2008 at 4:16 PM, Gabo Manuel <km...@solegysystems.com>wrote:

> Hi,
>
> The user's guide from cxf home page (
> http://cwiki.apache.org/CXF20DOC/jax-rs-jsr-311.html) is very extensive to
> have a basic webservice running.
>
> If you download a release of cxf, sample programs are available in <root
> directory>/samples/jax_rs.
>
> Deployment in tomcat is pretty much the same as other web applications,
> i.e. create a folder in webapps, have web.xml and beans.xml in
> webapps/<root>/WEB-INF, and have all the needed binaries in
> webapps/<root>/WEB-INF/lib/. <cxf root>/lib/WHICH_JARS should give you a
> heads-up with regards to which jars you need to include in the said
> directory.
>
> Hth.
>
> Gabo
>
> Forum Specific wrote:
>
>>  Hi all,
>>
>> I want sample tutorial or code for Restful Web Services for  JAX-RS API
>> integration with Spring using CXF framework by deploying on Tomcat.
>> Does anybody have this kind of link where I can find sample code for the
>> same.
>>
>> Thanks in advance.
>>
>> Regards,
>> FS
>>  ------------------------------------------------------------------------
>>
>>
>> No virus found in this incoming message.
>> Checked by AVG - http://www.avg.com Version: 8.0.175 / Virus Database:
>> 270.8.4/1751 - Release Date: 10/27/2008 10:44 PM
>>
>>
>>
>

Re: [JAX-RS]integration with spring+Tomcat

Posted by Gabo Manuel <km...@solegysystems.com>.
Hi,

The user's guide from cxf home page 
(http://cwiki.apache.org/CXF20DOC/jax-rs-jsr-311.html) is very extensive 
to have a basic webservice running.

If you download a release of cxf, sample programs are available in <root 
directory>/samples/jax_rs.

Deployment in tomcat is pretty much the same as other web applications, 
i.e. create a folder in webapps, have web.xml and beans.xml in 
webapps/<root>/WEB-INF, and have all the needed binaries in 
webapps/<root>/WEB-INF/lib/. <cxf root>/lib/WHICH_JARS should give you a 
heads-up with regards to which jars you need to include in the said 
directory.

Hth.

Gabo

Forum Specific wrote:
> Hi all,
>
> I want sample tutorial or code for Restful Web Services for  JAX-RS API
> integration with Spring using CXF framework by deploying on Tomcat.
> Does anybody have this kind of link where I can find sample code for the
> same.
>
> Thanks in advance.
>
> Regards,
> RT
>
>   
> ------------------------------------------------------------------------
>
>
> No virus found in this incoming message.
> Checked by AVG - http://www.avg.com 
> Version: 8.0.175 / Virus Database: 270.8.4/1751 - Release Date: 10/27/2008 10:44 PM
>
>