Forum Discussion

lajson's avatar
lajson
New Contributor
7 years ago

Mock multiple wsdls on same port

Hi!

I'm rather new on webservices and quite new on SoapUI, trying to simulate a webservice I'm going to interact with.

The service has two wsdls giving access to two different database tables and have the same set of functions.

 

The URIs look like this:

http://www.foobar.com/table1(table1.wsdl)
http://www.foobar.com/table2 (table2.wsdl)

And both have e.g. the function 'get' to get date from the tables.

 

I've read in the forum that you chould setup two projects, one for each wsdl, and then clone the mock from one to the other.

I can't get it going though.

I've started both the cloned and the 'master' mock but get:

Missing operation for soapAction [http://www.foobar.com/test2/get] and body element [null] with SOAP Version [SOAP 1.1]

 

If I start the mock in the project for test2.wsdl, I can perform the queries.

 

Is it not supported to start multiple wsdls this way if the same functions are used in both wsdls?

 

BR

/Thomas

  • Hi!

    It turned out it'll work fine if I start the original mock-service, not the cloned one.

    Feels rather awkward, at least to me.

    Maybe I do not quite understand the clone concept.

     

    BR

    /Thomas

  • JHunt's avatar
    JHunt
    Community Hero

    Each MockService for SOAP services has a unique URL (port + path), and each MockService can handle multiple Operations at that URL (the Operation is determined by the SoapAction header on the request).

     

    If you want multiple MockServices (for instance, because you want to keep them in seperate Projects), then they should have either a different port, or a different path.

     

    It sounds like you have two different paths, but you might be using the wrong path for your request. The MockService that is getting the request doesn't have that Operation.

  • lajson's avatar
    lajson
    New Contributor

    Hi!

    It turned out it'll work fine if I start the original mock-service, not the cloned one.

    Feels rather awkward, at least to me.

    Maybe I do not quite understand the clone concept.

     

    BR

    /Thomas