Announcement Announcement Module
Collapse
No announcement yet.
Finding generated WSDL url Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Finding generated WSDL url

    I am new to Spring WS and am dumbfounded where I can find the generated wsdl for my web service. I set up the servlet in the web.xml as such:

    Code:
        <servlet>
            <servlet-name>spring-ws</servlet-name>
            <servlet-class>org.springframework.ws.transport.http.MessageDispatcherServlet</servlet-class>
        </servlet>
    
        <servlet-mapping>
            <servlet-name>spring-ws</servlet-name>
            <url-pattern>/webservice/*</url-pattern>
        </servlet-mapping>
    My bean-definitions look like:

    <bean id="calculation" class="org.springframework.ws.wsdl.wsdl11.DefaultW sdl11Definition">
    <property name="schema" ref="schema"/>
    <property name="portTypeName" value="Calculation"/>
    <property name="locationUri" value="http://localhost:8080/webservice/calculationservice/"/>
    <property name="targetNamespace" value="http://cava.nl"/>
    </bean>

    <bean id="schema" class="org.springframework.xml.xsd.SimpleXsdSchema ">
    <property name="xsd" value="/WEB-INF/SubContracts.xsd"/>
    </bean>
    The war runs in an ear with conext root "cava" , so I'd expect to find the wsdl at an url like this:

    http://localhost:8080/cava/webservice/calculation.wsdl

    But it isn't. What am I doing wrong?
    Thanks in advance for any reply.

  • #2
    If you've deployed your project using tomcat the wsdl-url will proberbly be something like
    http://localhost:8080/<nameofyourwar>/calculation.wsdl

    Comment


    • #3
      Originally posted by wflikweert View Post
      If you've deployed your project using tomcat the wsdl-url will proberbly be something like
      http://localhost:8080/<nameofyourwar>/calculation.wsdl
      Actually I am deploying it under WebSphere with an EAR.

      Comment


      • #4
        An update: I seem to be a bit further, but I now get this error message in my browser:

        Error 403: Unable to get WebComponentMetaData object.

        Does anyone have any clue what this could be?
        Last edited by motormind; Mar 25th, 2009, 09:09 AM.

        Comment


        • #5
          Finding generated WSDL url

          I actually believe the WebComponentMetaData error which you are getting is a WebSphere error.
          I also noticed that you haven't made an entry in the web.xml for url mapped to *.wsdl.
          You need to add the following entry in you web.xml :
          <servlet-mapping>
          <servlet-name>spring-ws</servlet-name>
          <url-pattern>*.wsdl</url-pattern>
          </servlet-mapping>

          By the way i would also like to suggest you to use DynamicWsdl11Definition class rather than the DefaultWSDLDefinition class you are using as the former is much more powerful and should serve your purpose better.
          You can use the following entry :
          <bean id="calculation"
          class="org.springframework.ws.wsdl.wsdl11.DynamicW sdl11Definition">
          <bean class="org.springframework.ws.wsdl.wsdl11.builder. XsdBasedSoap11Wsdl4jDefinitionBuilder">
          <property name="schema"
          value="/WEB-INF/SubContracts.xsd" />
          <property name="portTypeName"
          value="calculation" />
          <property name="locationUri"
          value="http://localhost:8080/webservice/calculationservice" />
          <property name="targetNamespace" value="http://cava.nl"></property>
          </bean>



          One other thing which I noticed is the url you are using to access the web service:
          hxxp://localhost:8080/cava/webservice/calculation.wsdl
          According to your current cofiguration you should be able to access your webservice from the following url :
          hxxp://localhost:8080/webservice/calculationservice/calculation.wsdl
          The url for the wsdl will remain the same even if you use my above mentioned bean definiton for DynamicWsdl class.

          Hope this helps you move in a right direction.
          Cheers ,
          Sushant

          Comment

          Working...
          X