Announcement Announcement Module
Collapse
No announcement yet.
Getting the WSDL from a Web service endpoint Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Getting the WSDL from a Web service endpoint

    Hi all,

    here is my scenario :
    1. I created a WSDL file describing my service
    2. I implemented the server side according to this WSDL
    3. I deployed succesfully the service using Spring-WS and Tomcat
    4. I can test my service, everything is fine.

    Now, I want to get the WSDL file by adding ?WSDL to the end of the endpoint. Of course, this doesn't work yet because nowhere I have specified the WSDL location in my Spring configuration...

    So I have the following questions:
    - is the ?WSDL query parameter a correct way to request a WSDL from a known endpoint (I saw that the Echo sample doesn't use that) ?
    - if yes, how can I canfigure my service in the Spring configuration so the WSDL file is served properly ?

    Thanks you for any advice or solution,
    Damien.

  • #2
    got this same issue

    got the same issue, cannot find an answer yet.

    Comment


    • #3
      jsr181 attribute

      I haven't started using Spring WS yet, but xfire's built in ?wsdl handling understands the jsr181 @WebService#wsdlLocation attribute.

      e.g.

      @WebService(wsdlLocation="/path/to/service.wsdl")

      In my case, the path is actually the package of the web service, and my wsdl is copied into the WEB-INF/classes directory.


      --Joachim

      Comment


      • #4
        Originally posted by dcoraboeuf View Post
        So I have the following questions:
        - is the ?WSDL query parameter a correct way to request a WSDL from a known endpoint (I saw that the Echo sample doesn't use that) ?
        No, the ?WSDL is a way to get a WSDL of a class. In SWS, a service is not implemented as a class.

        Originally posted by dcoraboeuf View Post
        - if yes, how can I canfigure my service in the Spring configuration so the WSDL file is served properly ?
        There are two ways to expose a WSDL:
        • Simply add the WSDL to the root of the WAR, and the file is served normally. This has the disadvantage that the "location" attribute in the WSDL is static, i.e. it does not necessarily reflect the hostname of the server. That's why in the airline sample airline-servlet.xml, we define an WsdlDefinitionHandlerAdapterthere, which transforms the location.
        • Use the MessageDispatcherServlet, which is done is the echo sample. Every WsdlDefinition listed in the *-servlet.xml will be exposed under the bean name. So if you define a WsdlDefinition named echo, it will be exposed as echo.wsdl. (i.e. http://localhost:8080/echo/echo.wsdl).

        Comment

        Working...
        X