Forum Discussion

juandid's avatar
juandid
Occasional Contributor
15 years ago

Deploying Mock Services as War File

With soapUI 3.6, 3.6.1 and 3.6.2-Snapshot I tried to create a war file based on Mock Service as described in http://www.soapui.org/Service-Mocking/d ... files.html.
Unfortunately I was not able to create a war File at all. I only saw the unpacked structure. Finally I was able to deploy the folder content under webapps of my Tomcat, but the behaviour of the new web context was strange. I definitely could receive the wsdl from this mock service deployed under Tomcat. Accessing the Mock Services with soapUI was not possible. I always got the java.net.ConnectException.

Anybody else out there who was successful? I am not using the pro version. Are there limitations in this area?

4 Replies

  • Hi!

    hmm.. are you getting any errors in your server log?

    Which version of Tomcat are you using?

    regards!

    /Ole
    eviware.com
  • juandid's avatar
    juandid
    Occasional Contributor
    Hi

    In discussion with a colleague I realized that I have to provide the full path for the war file. I always assumed the war file would end up in the folder I provided for the value "war directory". If you change the documentation and just provide the line "C:\Temp\soapuimocks.war" instead of just "soapuimocks.war" there will be no doubt anymore where the war file is going to be stored.

    Now I used to deploy the war file into my tomcat 5.5.31 on Windows Vista. I am able to access the wsdl file under http://localhost:8080/calculator/mockCa ... nding?wsdl

    But accessing http://localhost:8080/calculator gives me a content with 3 frames each saying me something like
    HTTP Status 404 - /master

    --------------------------------------------------------------------------------

    type Status report

    message /master

    description The requested resource (/master) is not available.


    --------------------------------------------------------------------------------

    Apache Tomcat/5.5.31

    However running a sample request from within soapUI upon the endpoint http://localhost:8080/calculator/mockCa ... ortBinding results in a java.net.ConnectException. What is the endpoint URL I am supposed to use instead?
  • Hi!

    hmm.. what endpoint do you get from the exposed WSDL? (ie if you import that into soapUI)

    regards!

    /Ole
    eviware.com
  • juandid's avatar
    juandid
    Occasional Contributor
    It is unbelievable. Based on a discussion I found on the internet I decided to test with tomcat 6 instead of 5. Now I verified using a tomcat 6.0.29 instead of 5.5.23. The java.net.ConnectException has gone. I can access the mock service from nettool as well as from soapUI.

    So this issue is solved.