Page 2 of 2 FirstFirst 12
Results 11 to 17 of 17

Thread: HttpRequestHandlingMessagingGateway Support for Multiple HTTP Methods/Same Endpoint

  1. #11
    Join Date
    Apr 2005
    Posts
    112

    Default

    The following is what I configured for Dispatcher Servlet in web.xml. Is the issue related to url-pattern? I am also supporting the regular SOAP web service within the same application and the url pattern for Spring Web Services mapped to /services and that is all working. It is the REST part that is not working. My gut feeling is that it is to do with the url-pattern configured with Dispatcher Servlet. All rest calls are mapped to /services/cis/*. Kindly offer suggestions or recommendations.

    Code:
    <servlet>
    			<servlet-name>Destiny Customer Information Search Restful Web Service</servlet-name>
    		    <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
    		    <init-param>
    		      <param-name>contextConfigLocation</param-name>
    		      <param-value></param-value>
    		    </init-param>
    		    <load-on-startup>2</load-on-startup>
    		</servlet>
    		<servlet-mapping>
    		    <servlet-name>Destiny Customer Information Search Restful Web Service</servlet-name>
    		    <url-pattern>/services/cis/*</url-pattern>
    		</servlet-mapping>
    
    
    <servlet>
    		        <servlet-name>ws</servlet-name>
    		        <servlet-class>org.springframework.ws.transport.http.MessageDispatcherServlet</servlet-class>
    		        <init-param>
    					<param-name>transformWsdlLocations</param-name>
    					<param-value>true</param-value>
    				</init-param>
    				<load-on-startup>1</load-on-startup>
    		</servlet>
    		<servlet-mapping>
              <servlet-name>ws</servlet-name>
                  <url-pattern>/services</url-pattern>
            </servlet-mapping>
            <servlet-mapping>
                  <servlet-name>ws</servlet-name>
                  <url-pattern>*.wsdl</url-pattern>
            </servlet-mapping>
            <mime-mapping>
            	  <extension>xsd</extension>
            	  <mime-type>text/xml</mime-type>
        	</mime-mapping>
    Thanks,
    Vigil

  2. #12
    Join Date
    Apr 2005
    Posts
    112

    Default

    The following Dispatcher Servlet url-pattern configuration worked for me. I changed the url-pattern from /services/cis/* to /* and now everything working.

    Code:
    <servlet>
    			<servlet-name>Destiny Customer Information Search Restful Web Service</servlet-name>
    		    <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
    		    <init-param>
    		      <param-name>contextConfigLocation</param-name>
    		      <param-value></param-value>
    		    </init-param>
    		    <load-on-startup>2</load-on-startup>
    		</servlet>
    		<servlet-mapping>
    		    <servlet-name>Destiny Customer Information Search Restful Web Service</servlet-name>
    		    <url-pattern>/*</url-pattern>
    		</servlet-mapping>

  3. #13
    Join Date
    Jan 2008
    Location
    Mohnton, PA USA (that's near Philadelphia)
    Posts
    2,148

    Default

    Cool, great to hear

    Here is the question
    Would you be abel and willing to provide a very simple example of 'path' usage? We would include it with our samples so others can benefit.
    I figures you probably have something rather simple now and are willing to share. Let me know

  4. #14
    Join Date
    Apr 2005
    Posts
    112

    Default

    I was going to ask that question to SpringSource. I am more than willing to write one example on this since I struggled a lot in finding a solution and I would like others to benefit from the experience I got using Spring Integration and Spring MVC REST support. By the way, our application is a bit complex because it supports both SOAP Web services and REST style access support and the security configuration for REST is a bit more involved. How do I post the example to Spring Repository?

  5. #15
    Join Date
    Aug 2005
    Location
    Atlanta
    Posts
    123

    Default

    Hi Vigil,

    I think I can help with this. The Spring Integration Samples project is hosted on GitHub:

    https://github.com/SpringSource/spri...ration-samples

    I have documented the contribution process on the Spring Integration Samples Wiki:

    https://github.com/SpringSource/spri...n-samples/wiki

    I hope it provides all the necessary steps you need. The Spring Integration Samples, project is basically organized into the following categories:

    • basic
    • intermediate
    • advanced
    • application


    Pick the category appropriate to your sample. Also, if possible, please provide some documentation for your sample. Just place a README.md in your sample directory. Also, the Spring Integration Samples project is currently using Maven (although we still target to migrate the Samples project to Gradle eventually). Also, we would really appreciate any unit/functional test you can provide for your sample (But don't dispair, we can help you with that).

    Please let us know if you have any questions. We are looking forward to your Sample!! THANKS!

    Cheers,
    Gunnar Hillert
    SpringSource/VMWare, Spring Integration team
    SpringSource Team - Spring Training, Consulting, and Support - "From the Source"
    http://twitter.com/ghillert
    http://blog.hillert.com/
    http://blog.springsource.com/author/ghillert/

  6. #16
    Join Date
    Apr 2005
    Posts
    112

    Default

    Thanks so much. I will post my example with tests.

    Regards,
    Vigil

  7. #17
    Join Date
    Apr 2005
    Posts
    112

    Default

    Quote Originally Posted by vbose View Post
    Thanks so much. I will post my example with tests.

    Regards,
    Vigil
    Ok. I completed the sample with functional test included and it looks good. I am ready to post the sample to the repository.

    Thanks,
    Vigil

Posting Permissions

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