Announcement Announcement Module
Collapse
No announcement yet.
Spring MVC 3 + Spring-WS 2 + Spring Security 3 + Tiles Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • #16
    I tried adding all the differing configurations you've made in my sample app and everything works.

    The only different configuration is I have not enable any SSL support. What happens when you disable SSL?

    By the way out of topic, there's a specific View Resolver for Tiles 2:
    Code:
    <!-- Convenience subclass of UrlBasedViewResolver that supports TilesView (i.e. Tiles definitions) and custom subclasses of it. -->
    	<!-- Don't forget to set the order if you declared other ViewResolvers -->
    	<!-- See http://static.springsource.org/spring/docs/3.0.x/javadoc-api/org/springframework/web/servlet/view/tiles2/TilesViewResolver.html  -->
    	<bean id="tilesviewResolver" class="org.springframework.web.servlet.view.tiles2.TilesViewResolver" 
    			p:order="0"/>
    Though it wouldn't really matter

    I'll be honest with you. It also took me days to figure out how to glue together MVC and WS. It's a pain.

    Have you tried adding the extra configurations you did in your app to the sample tutorial and see if it works?

    Are you able to access the WSDL at
    https://localhost:8080/myapp/hs/ws/authentication.wsdl
    (Note it's 8080) when SSL is disabled?

    A quick Google search, I've found some people having problems with Web Services when https is enabled. See http://tugdualgrall.blogspot.com/200...-services.html
    (Check the comments)

    At the end it seems to be a mapping problem. So simple that we can't find it

    Comment


    • #17
      Skram,

      I managed to make it all work (MVC+WS+Security) with two servlets, following the configuration files of the airline project and starting from scratch.

      Thanks a lot for your comments and help, and keep doing those great tutorials!

      Cheers,

      Nacho

      Comment


      • #18
        Did you solve the problem?

        I have a very similar problem (see http://forum.springsource.org/showthread.php?t=104116)
        . I have a working spring-ws project where I tried to add MVC, using the krams example.

        But I have the same problem as you. And I dont use security.

        Did you solve the problem?

        Comment


        • #19
          Hi Thomas,

          As I mentioned in my last post, the solution was to do it the other way: using two servlets, instead of one (as in the krams example).

          Look for the airline example project (I'm not sure if it came with Spring-MVC or Spring-WS), I reproduced its configuration in my project and it worked immediatly

          Good luck, do not surrender!

          Nacho

          Comment


          • #20
            Hi

            I tried it with mixed success.

            If I have both servlets my web service works, but the mvc gives me 405 not allowed.

            But if I comment the web.xml code for web service, then mvc runs.

            My modified web.xml

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

            <display-name>Archetype Created Web Application</display-name>

            <servlet>
            <servlet-name>spring-ws2</servlet-name>
            <servlet-class>org.springframework.ws.transport.http.Messag eDispatcherServlet</servlet-class>
            </servlet>

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

            <context-param>
            <param-name>contextConfigLocation</param-name>
            <param-value>/WEB-INF/spring-wsmvc-application-config.xml</param-value>
            </context-param>

            <listener>
            <listener-class>org.springframework.web.context.ContextLoade rListener</listener-class>
            </listener>

            <servlet>
            <servlet-name>spring-wsmvc</servlet-name>
            <servlet-class>org.springframework.web.servlet.DispatcherSe rvlet</servlet-class>
            <init-param>
            <param-name>contextConfigLocation</param-name>
            <param-value>/WEB-INF/spring-wsmvc-servlet-config.xml</param-value>
            </init-param>
            <load-on-startup>1</load-on-startup>
            </servlet>

            <servlet-mapping>
            <servlet-name>spring-wsmvc</servlet-name>
            <url-pattern>/competence/*</url-pattern>
            </servlet-mapping>

            </web-app>

            Comment

            Working...
            X