Forum Discussion

BA_Service_Haus's avatar
BA_Service_Haus
Regular Contributor
15 years ago

WSDL of deployed Mock is not shown

Hi,

when testing a service, we use soapUI mocks to simulate other (used) services.
We deploy them on a weblogic server so all service and all necessary mocks are integrated there.

This works well, if the mock services was created by a wsdl from any other server.
But usually we have no deployed wsdl but a local wsdl-file.
Unfortunaly in this case the wsdl isn't shown when calling the path \\server:port\mockfolder\mockname?wsdl
The deployed mock itself works fine anyway, but we cannot call the wsdl as shown above (for mocks created by using a deployed wsdl, this works fine).

Can you tell me how to solve this or will you fix this?

Best regards
Nico

7 Replies

  • Hi Nico,

    hmm... what page do you get when requesting this URL ? Do you get any errors in the server logs related to this request?

    regards!

    /Ole
    SmartBear Software
  • Hi Nico,

    hmm... can you try this under Tomcat just to see if it is a WebLogic related issue? Alternatively if you can provide us with your soapUI project so we can try this ourselves?

    regards!

    /Ole
    SmartBear Software
  • BA_Service_Haus's avatar
    BA_Service_Haus
    Regular Contributor
    Hi Ole,

    I tried it with Tomcat and everything worked fine.
    I also will attach a simple example project to enable you checking this yourself.

    Finaly I must add, that we are modifying the generated mock a little bit. Otherwise it wouldn't run on our WLS at all.
    We first add an weblogic.xml file to the mock and build the war-file.
      <?xml version="1.0" encoding="UTF-8" ?> 
    - <wls:weblogic-web-app xmlns:wls="http://www.bea.com/ns/weblogic/weblogic-web-app" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd http://www.bea.com/ns/weblogic/weblogic-web-app http://www.bea.com/ns/weblogic/weblogic-web-app/1.0/weblogic-web-app.xsd">
    <wls:weblogic-version>10.3</wls:weblogic-version>
    - <wls:container-descriptor>
    <wls:show-archived-real-path-enabled>true</wls:show-archived-real-path-enabled>
    </wls:container-descriptor>
    </wls:weblogic-web-app>

    Then we add an weblogic-application.xml file to the war-file and generate an ear-archive of it.
    <?xml version="1.0" encoding="windows-1252" ?> 
    - <weblogic-application xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.bea.com/ns/weblogic/weblogic-application http://www.bea.com/ns/weblogic/weblogic-application/1.0/weblogic-application.xsd" xmlns="http://www.bea.com/ns/weblogic/weblogic-application">
    - <prefer-application-packages>
    <package-name>javax.wsdl.*</package-name>
    <package-name>org.w3._2001.xmlschema.*</package-name>
    </prefer-application-packages>
    </weblogic-application>


    Hope, this helps.

    Best regards
    Nico
  • BA_Service_Haus's avatar
    BA_Service_Haus
    Regular Contributor
    Update:
    We assume, that the serviceinfo.xsd isn't found on the server.
    Here is an excerpt of our (Linux) WLS:
    11:54:39,451 ERROR [SoapUI] An error occured [Missing local file for [file:/C:/temp_SimpleService/wsdl-SimpleService/serviceinfo.xsd]], see error log for details


    Within the soapui project file, the path is: file:\C:\temp_SimpleService\wsdl-SimpleService\serviceinfo.xsd

    What do you think?

    Best regards
    Nico
  • Hello,

    yes, that is a problem. You can either reference xsd file relative to project directory ( ${projectDir} ) or workspace dir ( ${workspaceDir} ) or put it on some server and access to it by url, which is the best solution.

    Does this helps,
    robert
    /SmartBear
  • BA_Service_Haus's avatar
    BA_Service_Haus
    Regular Contributor
    Hi Robert,

    thanks for your answer.
    As I'm no "power user" would you please tell me more about the possibilites you mentioned.
    1) Where can I define the xsd file reference to project or workspace directory?
    2) Is this a way (1) to solve my problem? (Mock will be deployed on a server, not on my client PC)
    3) If I put it to the server, how can I configure the correct access to it? (I think, there is some path to adapt or some configuration to be made, isn't it?)


    Best regards
    Nico