Results 1 to 3 of 3

Thread: DefaultWsdl11Definition - WSDL not found

  1. #1
    Join Date
    Aug 2008
    Posts
    3

    Default DefaultWsdl11Definition - WSDL not found

    We are planning to use spring web service in our application, I am start learning spring-ws.I would like to start Contract first approach specically from Schema.
    I have created and deployed successfully in the server.When I typed http://localhost:8080/WebApps/personService/ url I don't find the wsdl.In the console I don't find any error message.I am using Spring 2.5 and Spring 1.5.9, Netbeans 6.8,Tomcat 6.0, jdk 6.I am using spring-ws all,wsdl4j,jaxb spring ws jar files.Please let me know how I fix this.



    Spring-Context.xml


    <?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="http://www.springframework.org/schema/p"
    xmlns:context="http://www.springframework.org/schema/context"
    xsi:schemaLocation="http://www.springframework.org/schema/beans
    http://www.springframework.org/schem...ring-beans.xsd
    http://www.springframework.org/schema/context
    http://www.springframework.org/schema/context/spring-context.xsd">

    <context:component-scan base-package="org.springbyexample.ws.service" />

    <bean id="person" class="org.springframework.ws.wsdl.wsdl11.DefaultW sdl11Definition"
    portTypeName="Person"
    p:locationUri="http://localhost:8080/WebApps/personService/"
    p:requestSuffix="-request"
    p:responseSuffix="-response">
    <property name="schema">
    <bean class="org.springframework.xml.xsd.SimpleXsdSchema "
    p:xsd="classpath:resources/person.xsd">
    </bean>
    </property>
    </bean>

    <bean class="org.springframework.ws.server.endpoint.mapp ing.PayloadRootAnnotationMethodEndpointMapping">
    <description>An endpoint mapping strategy that looks for @Endpoint and @PayloadRoot annotations.</description>
    </bean>

    <bean class="org.springframework.ws.server.endpoint.adap ter.MarshallingMethodEndpointAdapter">
    <description>Enables the MessageDispatchServlet to invoke methods requiring OXM marshalling.</description>
    <constructor-arg ref="marshaller"/>
    </bean>

    <bean id="marshaller" class="org.springframework.oxm.jaxb.Jaxb2Marshalle r"
    p:contextPath="schema.domain" />

    </beans>



    person.xsd


    <xsd:schema xmlns="http://www.springbyexample.org/person/schema/beans"
    targetNamespace="http://www.springbyexample.org/person/schema/beans"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema">

    <xsd:element name="get-persons-request">
    <xsd:complexType>
    <xsd:sequence>
    <xsd:element name="name" type="xsd:string" />
    </xsd:sequence>
    </xsd:complexType>
    </xsd:element>

    <xsd:element name="person-response">
    <xsd:complexType>
    <xsd:sequence>
    <xsd:element name="person" type="person"
    minOccurs="0" maxOccurs="unbounded"/>
    </xsd:sequence>
    </xsd:complexType>
    </xsd:element>

    <xsd:complexType name="person">
    <xsd:sequence>
    <xsd:element name="id" type="xsd:int" />
    <xsd:element name="first-name" type="xsd:string" />
    <xsd:element name="last-name" type="xsd:string" />
    </xsd:sequence>
    </xsd:complexType>

    </xsd:schema>


    web.xml

    <?xml version="1.0" encoding="UTF-8"?>
    <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns="http://java.sun.com/xml/ns/javaee"
    xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
    xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
    http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
    id="WebApp_ID" version="2.5">

    <servlet>
    <servlet-name>spring-ws</servlet-name>
    <servlet-class>org.springframework.ws.transport.http.Messag eDispatcherServlet</servlet-class>
    <init-param>
    <param-name>contextConfigLocation</param-name>
    <param-value>classpath:resources/spring-ws-context.xml</param-value>
    </init-param>
    </servlet>

    <servlet-mapping>
    <servlet-name>spring-ws</servlet-name>
    <url-pattern>/*</url-pattern>
    </servlet-mapping>

    </web-app>

  2. #2
    Join Date
    Jul 2010
    Posts
    7

    Default URL to Access WSDL

    Have you tried accessing this URL ?

    http://localhost:8080/WebApps/personService/person.wsdl

    Spring WS provide the WSDL name as the bean id of the DefaultWsdl11Definition.

    With the URL what you are looking, the URL if appended with the WSDL file name, then you should be able to view the WSDL.

    Hope this is what you are looking for

    Cheers!

  3. #3
    Join Date
    Aug 2008
    Posts
    3

    Default DefaultWsdl11Definition - WSDL not found

    It works fine.Excellent thanks.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •