Forum Discussion

jhberges's avatar
jhberges
New Contributor
14 years ago

Is there a limitation regarding overloaded methods in mocks?

I.e attempting to mock two methods:
someMethod(int,int,int)

and
someMethod(int,AComplexObject)

seems to always resolve to the first in the WSDL?

I found this: viewtopic.php?f=5&t=1127&p=4195&hilit=overload#p4195 - but the answer didn't seem conclusive?

So; can it be confirmed that soapUI mocks do not handle argument-overloaded methods?

If so, is there a workaround (using scripts or whatnot)?

For the record, this is a partner system which is "unmodifiable" - so adding uniqueness to the mocked methods is not an option.

Thanks, Jan-Helge

1 Reply

  • jhberges's avatar
    jhberges
    New Contributor
    Follow up:
    Inspecting the logs while running in the GUI, I can see:


    Tue Apr 10 11:44:17 CEST 2012:ERROR:com.eviware.soapui.impl.wsdl.mock.DispatchException: Missing operation for soapAction [] and body element [{http://www.tilgin.com/CentreConnector}changeSoftware] with SOAP Version [SOAP 1.1]
    com.eviware.soapui.impl.wsdl.mock.DispatchException: Missing operation for soapAction [] and body element [{http://www.tilgin.com/CentreConnector}changeSoftware] with SOAP Version [SOAP 1.1]
    at com.eviware.soapui.impl.wsdl.support.soap.SoapUtils.findOperationForRequest(SoapUtils.java:359)
    at com.eviware.soapui.impl.wsdl.mock.WsdlMockRunner.dispatchPostRequest(WsdlMockRunner.java:250)
    at com.eviware.soapui.impl.wsdl.mock.WsdlMockRunner.dispatchRequest(WsdlMockRunner.java:375)
    at com.eviware.soapui.monitor.JettyMockEngine$ServerHandler.handle(JettyMockEngine.java:715)


    The WSDL defines:

    <wsdl:operation name="changeSoftware" parameterOrder="in0 in1 in2">
    <wsdl:input message="impl:changeSoftwareRequest" name="changeSoftwareRequest"/>
    <wsdl:output message="impl:changeSoftwareResponse" name="changeSoftwareResponse"/>
    </wsdl:operation>
    <wsdl:operation name="changeSoftware" parameterOrder="in0 in1">
    <wsdl:input message="impl:changeSoftwareRequest1" name="changeSoftwareRequest1"/>
    <wsdl:output message="impl:changeSoftwareResponse1" name="changeSoftwareResponse1"/>
    </wsdl:operation>


    TIA, for all help on this.