Forum Discussion

blupin's avatar
blupin
Occasional Contributor
11 years ago

mock service war UI with http 404 on /master

Hi all,
Using SoapUI 4.6.4, I generate a mock war file named myapplimock.war. I successfully deploy it on Tomcat 7.0.34, and my client web service works well.

However, the web UI URL http://localhost:8080/myapplimock shows me 3 error panes :
HTTP 404 - /master
HTTP 404 - /detail
HTTP 404 - /log

When using http://localhost:8080/myapplimock/ (note the trailing slash), the web UI works fine.

Unfortunately, my end users always forget this /... Do you have a workaround, so that http://localhost:8080/myapplimock would work fine ?

Regards,
Bernard

8 Replies

  • blupin's avatar
    blupin
    Occasional Contributor
    Hi all,

    I can't think that I'm the only one with this annoying and very-easy-to-reproduce bug.
    Could you tell me if you encounter same problem ? and if you live with it or found a workaround ?

    Thanks a lot

    Bernard
  • redfish4ktc2's avatar
    redfish4ktc2
    Super Contributor
    hi, did you configure something special as an endpoint when generating the war?
    In the past, I have seem some issues related to the endpoint in this forum
  • blupin's avatar
    blupin
    Occasional Contributor
    Hi,
    Thank you for your suggestion.
    I do not understand what means the "MockService Endpoint:" field in the "Deploy project as WAR" window : if my war contains 2 mockservices with path /test1 and /test2, both are working when calling http://localhost:8080/myapplimock/test1?WSDL and http://localhost:8080/myapplimock/test2?WSDL. What should I put in this field ?

    Nevertheless, I tried a lot of cases for this field, with only one mockservice on path /test1 :
    * leave it blank
    * put various values : test1, /test1, xxx, /xxx, /, ...

    In all cases, I have the same behavior, this field seems to be useless.

    Here are my detailed results :
    http://localhost:8080/myapplimock : KO, 3 error frames, as detailed in previous Post
    http://localhost:8080/myapplimock/ : OK, Eviware UI
    http://localhost:8080/myapplimock/anything : OK, Eviware UI
    http://localhost:8080/myapplimock/anything/ : KO, about 25 empty horizontal frames
    http://localhost:8080/myapplimock/test1 : OK, empty screen, this is my service URL
    http://localhost:8080/myapplimock/test1?WSDL : OK, WSDL is shown

    I also tried with other application servers and have similar result :
    JBoss AS 7.2 :
    JBWEB000065: HTTP Status 404 - /master
    JBWEB000065: HTTP Status 404 - /detail
    JBWEB000065: HTTP Status 404 - /log

    Jonas 5.2 :
    3 empty frames

    Are you telling me that calling the web UI without the trailing slash works for you ?

    Regards,
    Bernard
  • blupin's avatar
    blupin
    Occasional Contributor
    Hi again,
    Thank you for your suggestion.

    I've successfully tested another workaround, which conforms to servlet specifications and seems to work on Tomcat :
    * Change servlet mapping in web.xml :
     <servlet-mapping>
    <servlet-name>SoapUIMockServlet</servlet-name>
    <url-pattern>/soapui/*</url-pattern>
    </servlet-mapping>


    * Add this index.html file in root folder :
    <html>
    <head>
    <title>redirect</title>
    <meta http-equiv="refresh" content="0; URL=soapui/">
    </head>
    <body>
    </body>
    </html>


    With these two settings, my index.html file is used on context root request (with or without trailing slash), and it refresh the page to call the SoapUI servlet on a new path : http://localhost:8080/mock/soapui/

    This is working but changes the SoapUI mock URL...

    Do you know if this should be corrected in a future version ?

    Regards
    Bernard
  • redfish4ktc2's avatar
    redfish4ktc2
    Super Contributor
    Do you know if this should be corrected in a future version ?

    No i don't know, I don't even know if SmartBear is aware of this problem with tomcat. You could create a new post in the soapui bugs, SmartBear sometimes answer directly in this forum.