Announcement Announcement Module
No announcement yet.
Hosting the Spring Contract-first web service tutorial example on Cloud Foundry Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Hosting the Spring Contract-first web service tutorial example on Cloud Foundry

    I have successfully built and deployed the STS contract-first web services tutorial to Cloud Foundry. Cloud Foundry gave me a URL address: "".

    In the tutorial the Web Service Client originally used the following URL to contact the service: http://localhost:8080/ws-tutorial/services

    I now changed the URL address in the Web Service Client to: "" - the address I was given for the application by Cloud Foundry

    However I am getting a "connection refused: connect" message when I run the client.

    My question is: Is my URL address incorrect - should I put "/ws-tutorial/services" on the end of it - though this doesn't work either.

    And in general can a web service that runs locally on an instance of Tomcat be deployed to Cloud Foundry without any changes to the code?

  • #2
    in fact you can get answer from reviewing "Remote Systems".
    double click your application, go to "application" page, then click "Remote System View".


    • #3
      Remote View

      Yes I tried this - I can see my application in Remote System View. Under VMware Cloud Foundry I can see a folder called ws-tutorial#0. In this folder there are folders logs and tomcat. However I still doen't know the URL my client should use to call the service. Is the information visible somewhere in Remote System View. The URL doesn't work in my client.



      • #4
        The url to access a spring web service that is deployed on tomcat server would be some things like this
        • server_url/web_app_context/servlet_mapping_for_msg_dispatch_servlet

        Now getting back to the issue with your web service deployment, I suggest you look at your application's web.xml, You need to find the mapping for (MessageDispatcherServlet), A typical mapping would be

                         //init config
        If I deploy a web app with above servlet mapping and context root of ws-tutorial to my local tomcat server, I would be accessing a web service on the server using this url