You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Jens Meuller <su...@googlemail.com> on 2009/09/22 07:20:15 UTC

Disable Listing of Web-Services in Browser? | Deploying two CXFServlet instances?

Hello CXF Users,

I would be very greatful for your help regarding my two Questions:

1. When installing CXF in Tomcat as a Servlet, calling the "Default-Path" of
the Servlet results in a list of all installed Web-Services (alonge with a
link to the WSDL). Some of my Web-Services are "private" and I do not want
to have them included in this List. Is there any possibilty to configure,
which installed WebServices will be listed there and which not? Where and
how do I have to configure this?

2. Would it be possible to deploy the CXFServlet two ore more times in a
Web-Application?

<servlet>
    <servlet-name>CXFServlet1</servlet-name>
    <servlet-class>
        org.apache.cxf.transport.servlet.CXFServlet
    </servlet-class>
  </servlet>
AND
<servlet>
    <servlet-name>CXFServlet2</servlet-name>
    <servlet-class>
        org.apache.cxf.transport.servlet.CXFServlet
    </servlet-class>
  </servlet>

Or will this result in dangerous behaviour (race conditions etc) as it is
not intended to have two instances (with different url/path mappings)
installed in the Servlet Container? (My Idea was to use one instance only
for the internal Webservices and another one for the Webservices that are
intended for the public.

thank you  very much!
jens

RE: Disable Listing of Web-Services in Browser? | Deploying two CXFServlet instances?

Posted by Ron Grimes <rg...@sinclairoil.com>.
Jens,

It seems to me that the best way to accomplish what you want is to restrict access to certain url patterns via Tomcat's security realm configuration in server.xml. See http://onjava.com/pub/a/onjava/2001/07/24/tomcat.html?page=1 as a good starting point for info on how to set these up.

Ron Grimes


-----Original Message-----
From: Jens Meuller [mailto:supidupi007@googlemail.com] 
Sent: Monday, September 21, 2009 11:20 PM
To: users@cxf.apache.org
Subject: Disable Listing of Web-Services in Browser? | Deploying two CXFServlet instances?

Hello CXF Users,

I would be very greatful for your help regarding my two Questions:

1. When installing CXF in Tomcat as a Servlet, calling the "Default-Path" of the Servlet results in a list of all installed Web-Services (alonge with a link to the WSDL). Some of my Web-Services are "private" and I do not want to have them included in this List. Is there any possibilty to configure, which installed WebServices will be listed there and which not? Where and how do I have to configure this?

2. Would it be possible to deploy the CXFServlet two ore more times in a Web-Application?

<servlet>
    <servlet-name>CXFServlet1</servlet-name>
    <servlet-class>
        org.apache.cxf.transport.servlet.CXFServlet
    </servlet-class>
  </servlet>
AND
<servlet>
    <servlet-name>CXFServlet2</servlet-name>
    <servlet-class>
        org.apache.cxf.transport.servlet.CXFServlet
    </servlet-class>
  </servlet>

Or will this result in dangerous behaviour (race conditions etc) as it is not intended to have two instances (with different url/path mappings) installed in the Servlet Container? (My Idea was to use one instance only for the internal Webservices and another one for the Webservices that are intended for the public.

thank you  very much!
jens

Re: Disable Listing of Web-Services in Browser? | Deploying two CXFServlet instances?

Posted by Daniel Kulp <dk...@apache.org>.
On Tue September 22 2009 1:20:15 am Jens Meuller wrote:
> Hello CXF Users,
> 
> I would be very greatful for your help regarding my two Questions:
> 
> 1. When installing CXF in Tomcat as a Servlet, calling the "Default-Path"
>  of the Servlet results in a list of all installed Web-Services (alonge
>  with a link to the WSDL). Some of my Web-Services are "private" and I do
>  not want to have them included in this List. Is there any possibilty to
>  configure, which installed WebServices will be listed there and which not?
>  Where and how do I have to configure this?

You can completely disable the service list page.   An init param of:
hide-service-list-page set to true 
will completely disable the page.   

> 2. Would it be possible to deploy the CXFServlet two ore more times in a
> Web-Application?
> 
> <servlet>
>     <servlet-name>CXFServlet1</servlet-name>
>     <servlet-class>
>         org.apache.cxf.transport.servlet.CXFServlet
>     </servlet-class>
>   </servlet>
> AND
> <servlet>
>     <servlet-name>CXFServlet2</servlet-name>
>     <servlet-class>
>         org.apache.cxf.transport.servlet.CXFServlet
>     </servlet-class>
>   </servlet>

I've never really tried this, but it SHOULD work providing you provide a 
unique  config-location for each of them.   Like I said, never really tried it 
though.
 
> Or will this result in dangerous behaviour (race conditions etc) as it is
> not intended to have two instances (with different url/path mappings)
> installed in the Servlet Container? (My Idea was to use one instance only
> for the internal Webservices and another one for the Webservices that are
> intended for the public.

Having them in separate WAR's would definitely work.   Just not sure about in 
the same war.    If you have  a problem, please create a small test  case and 
log a jira.  


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