Re: How to export non-annotated service in spring

2007-11-21 Thread Jeff Yu
You will have 2 filters, one for spring mvc, the other for the 
webservices that you want to expose: like :


 
ims
   
org.springframework.web.servlet.DispatcherServlet

1
 

 
   CXFServlet
   CXF Servlet
   
   org.apache.cxf.transport.servlet.CXFServlet
   
   1
 

  
ims
*.do
  

   
   CXFServlet
   /services/*
   

Question 2:
Using  serviceClass attribute like:

 serviceClass="demo.hw.server.HelloWorld" address="/hello_world">

 
 
 
 

Thanks
Jeff


ojs wrote:

Willem2 wrote:
  

You should use CXFServlet to handler the http request and not the spring
DispatcherServlet.
Since CXFServlet will replace all the http related transport to the
servlet transport, you endpoint will not try to start a jetty engine for
http transport listening.

You can find the CXFServlet's web.xml here.
[1]https://svn.apache.org/repos/asf/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/servlet/web-spring.xml
[2]https://svn.apache.org/repos/asf/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/servlet/spring.xml




Hello Willem,

thanks for your help so far. It's a bummer, that CXF isn't as easy to
configure as XFire is. I don't want to have another servlet, because I want
to use the Spring MVC infrastructure (interceptors, custom mapping
strategies, ...). I guess I can use Springs ServletWrappingController to
wrap the CXFServlet - but this isn't a very good alternative compared to the
XFireExporter.

Another thing is: how to specify the Service interface? CXF currently tries
to create an endpoint for my implementation (which is proxied). XFire has a
serviceInterface property for that.


Best

Oliver

  


Re: How to export non-annotated service in spring

2007-11-21 Thread ojs


Willem2 wrote:
> 
> You should use CXFServlet to handler the http request and not the spring
> DispatcherServlet.
> Since CXFServlet will replace all the http related transport to the
> servlet transport, you endpoint will not try to start a jetty engine for
> http transport listening.
> 
> You can find the CXFServlet's web.xml here.
> [1]https://svn.apache.org/repos/asf/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/servlet/web-spring.xml
> [2]https://svn.apache.org/repos/asf/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/servlet/spring.xml
> 

Hello Willem,

thanks for your help so far. It's a bummer, that CXF isn't as easy to
configure as XFire is. I don't want to have another servlet, because I want
to use the Spring MVC infrastructure (interceptors, custom mapping
strategies, ...). I guess I can use Springs ServletWrappingController to
wrap the CXFServlet - but this isn't a very good alternative compared to the
XFireExporter.

Another thing is: how to specify the Service interface? CXF currently tries
to create an endpoint for my implementation (which is proxied). XFire has a
serviceInterface property for that.


Best

Oliver

-- 
View this message in context: 
http://www.nabble.com/How-to-export-non-annotated-service-in-spring-tf4838545.html#a13873445
Sent from the cxf-user mailing list archive at Nabble.com.



Re: How to export non-annotated service in spring

2007-11-20 Thread Willem2

You should use CXFServlet to handler the http request and not the spring
DispatcherServlet.
Since CXFServlet will replace all the http related transport to the servlet
transport, you endpoint will not try to start a jetty engine for http
transport listening.

You can find the CXFServlet's web.xml here.
[1]https://svn.apache.org/repos/asf/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/servlet/web-spring.xml
[2]https://svn.apache.org/repos/asf/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/servlet/spring.xml

Willem.


ojs wrote:
> 
> 
> Willem2 wrote:
>> Can you show me your web.xml ?
>> There must be something wrong with your web.xml.
> 
> Sure, but I don't know what should be wrong with it. It starts my
> application and all requests are handled by springs DispatcherServlet (as
> wanted). BTW: My application is deployed in tomcat 6.0.14.
> 
> 
> http://java.sun.com/xml/ns/javaee";
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
> xsi:schemaLocation="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd";
> metadata-complete="true" version="2.5">
> 
> 
> contextConfigLocation
> 
> /WEB-INF/classes/config/spring/applicationContext.xml
> 
> 
> 
> 
>
> org.springframework.web.context.ContextLoaderListener
> 
> 
> 
> backend
>
> org.springframework.web.servlet.DispatcherServlet
>     1
> 
> 
> 
> backend
> /*
> 
> 
> 
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/How-to-export-non-annotated-service-in-spring-tf4838545.html#a13866136
Sent from the cxf-user mailing list archive at Nabble.com.



Re: How to export non-annotated service in spring

2007-11-20 Thread ojs


Willem2 wrote:
> Can you show me your web.xml ?
> There must be something wrong with your web.xml.

Sure, but I don't know what should be wrong with it. It starts my
application and all requests are handled by springs DispatcherServlet (as
wanted). BTW: My application is deployed in tomcat 6.0.14.


http://java.sun.com/xml/ns/javaee";
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd";
metadata-complete="true" version="2.5">


contextConfigLocation

/WEB-INF/classes/config/spring/applicationContext.xml




   
org.springframework.web.context.ContextLoaderListener



backend
   
org.springframework.web.servlet.DispatcherServlet
1



backend
/*





-- 
View this message in context: 
http://www.nabble.com/How-to-export-non-annotated-service-in-spring-tf4838545.html#a13853725
Sent from the cxf-user mailing list archive at Nabble.com.



Re: How to export non-annotated service in spring

2007-11-20 Thread Willem Jiang

Hi,

Can you show me your web.xml ?
There must be something wrong with your web.xml.

Willem.
ojs wrote:

Willem2 wrote:
  

You can use the simple front end custom server bean definition.
Please see [1] for more information.

[1] http://cwiki.apache.org/CXF20DOC/simple-frontend.html



I tried that, but it seems that simple front end tries to start a separate
http server (jetty) instance?! Or did I misunderstand something?

  


Re: How to export non-annotated service in spring

2007-11-20 Thread ojs


Willem2 wrote:
> You can use the simple front end custom server bean definition.
> Please see [1] for more information.
> 
> [1] http://cwiki.apache.org/CXF20DOC/simple-frontend.html

I tried that, but it seems that simple front end tries to start a separate
http server (jetty) instance?! Or did I misunderstand something?

-- 
View this message in context: 
http://www.nabble.com/How-to-export-non-annotated-service-in-spring-tf4838545.html#a13853335
Sent from the cxf-user mailing list archive at Nabble.com.



Re: How to export non-annotated service in spring

2007-11-20 Thread Willem Jiang

Hi,

You can use the simple front end custom server bean definition.
Please see [1] for more information.

[1] http://cwiki.apache.org/CXF20DOC/simple-frontend.html

Willem.
ojs wrote:

Hello,

I'm trying to switch from xfire to cxf - don't had much luck so far...

My xfire configuration (in spring) looks like:







So Spring's DispatcherServlet handles the request and forward request to
/myService to this bean. The service I'm exporting isn't (and shouldn't be)
annotated. Is there a similar thing in cxf to export a service as it is
possible with xfire?


Best

Oliver
  


How to export non-annotated service in spring

2007-11-19 Thread ojs

Hello,

I'm trying to switch from xfire to cxf - don't had much luck so far...

My xfire configuration (in spring) looks like:







So Spring's DispatcherServlet handles the request and forward request to
/myService to this bean. The service I'm exporting isn't (and shouldn't be)
annotated. Is there a similar thing in cxf to export a service as it is
possible with xfire?


Best

Oliver
-- 
View this message in context: 
http://www.nabble.com/How-to-export-non-annotated-service-in-spring-tf4838545.html#a13842667
Sent from the cxf-user mailing list archive at Nabble.com.