It's automatic. The JAX-WS specification mandates retrieval of the WSDL when the client adds "?wsdl" to the URL. Searching "hide WSDL" in the CXF Nabble search forum will probably return many hits on how (if) you can suppress that.

Glen

On 31.01.2011 16:40, jaybytez wrote:
One quick question - I have a service endpoint utilizing CXF 2.2.10 utilizing
JAXB/JAX-WS/Spring 3.0.5 and I am deploying wars onto WebLogic Server 11.  I
am not explicitly identifying anything in my context files to expose the
wsdl or publish it.  I am putting a post onto Oracle's site to see if
WebLogic Server is doing it, but I can't figure if it's WebLogic Server or
CXF that is exposing the WSDL (I can hit it via a url in the browser with
application context url and ?WSDL)...because I am not doing any
configuration to do that.  When I deploy to two managed instances, each
managed instance in my cluster shows a different wsdl for the service
endpoint:

Context File
---------------

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans";
     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
     xmlns:aop="http://www.springframework.org/schema/aop";
     xmlns:tx="http://www.springframework.org/schema/tx";
     xmlns:p="http://www.springframework.org/schema/p";
     xmlns:context="http://www.springframework.org/schema/context";
     xmlns:jaxws="http://cxf.apache.org/jaxws";
     xmlns:jee="http://www.springframework.org/schema/jee";
     xmlns:cxf="http://cxf.apache.org/core";
     xsi:schemaLocation="
     http://www.springframework.org/schema/beans
     http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
     http://www.springframework.org/schema/tx
     http://www.springframework.org/schema/tx/spring-tx-3.0.xsd
     http://www.springframework.org/schema/aop
     http://www.springframework.org/schema/aop/spring-aop-3.0.xsd
     http://www.springframework.org/schema/context
     http://www.springframework.org/schema/context/spring-context-3.0.xsd
          http://cxf.apache.org/jaxws
          http://cxf.apache.org/schemas/jaxws.xsd
          http://cxf.apache.org/core
          http://cxf.apache.org/schemas/core.xsd
          http://www.springframework.org/schema/jee
     http://www.springframework.org/schema/jee/spring-jee-3.0.xsd";
     default-lazy-init="true">

    <context:property-placeholder
location="classpath*:/enterprise.properties"/>

   <import resource="classpath:META-INF/cxf/cxf.xml" />
        <import resource="classpath:META-INF/cxf/cxf-extension-soap.xml" />
        <import resource="classpath:META-INF/cxf/cxf-servlet.xml" />
        
     <cxf:bus>
         <cxf:features>
             <cxf:logging/>
         </cxf:features>
     </cxf:bus>

   <alias name="foodServiceApi" alias="fooServiceEndpoint"/>

        <jaxws:endpoint
                id="jaxws.FooService"
                endpointName="s:FooServiceEndpointServicePort"
                serviceName="s:FooServiceEndpointService"
                implementor="#fooServiceEndpoint"
                implementorClass="com.foo.FooService"
                address="/FooService"
                xmlns:s="http://foo.com/fooservice";>
        </jaxws:endpoint>

</beans>

web.xml
---------------
<?xml version="1.0" encoding="ISO-8859-1"?>

<!DOCTYPE web-app
     PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
     "http://java.sun.com/dtd/web-app_2_3.dtd";>

<web-app>
        <context-param>
                <param-name>contextConfigLocation</param-name>
                <param-value>/WEB-INF/FooServiceWar-context.xml
         classpath*:/FooServiceClientInt-context.xml</param-value>
        </context-param>

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

        <servlet>
                <servlet-name>CXFServlet</servlet-name>
                <display-name>CXF Servlet</display-name>
                <servlet-class>
                        org.apache.cxf.transport.servlet.CXFServlet
                </servlet-class>
                <load-on-startup>1</load-on-startup>
        </servlet>

        <servlet-mapping>
                <servlet-name>CXFServlet</servlet-name>
                <url-pattern>/*</url-pattern>
        </servlet-mapping>
</web-app>

Thanks for your help,

Jay


--
Glen Mazza
Software Engineer, Talend (http://www.talend.com)
blog: http://www.jroller.com/gmazza


Reply via email to