Forum Discussion

SeanSoap's avatar
SeanSoap
New Contributor
10 years ago

REST MockResponse can't access requestContent

I'm trying to get my REST MockResponse to return a response based on the input criteria.The issue i'm seeing however is that this line of SCRIPT fails:
def holder = new com.eviware.soapui.support.XmlHolder( mockRequest.requestContent )



When I run the mockRequest against this response the error is returned as:

ERROR:com.eviware.soapui.impl.wsdl.mock.DispatchException: com.eviware.soapui.impl.wsdl.mock.DispatchException: Failed to dispatch using script; groovy.lang.GroovyRuntimeException: Ambiguous method overloading for method com.eviware.soapui.support.XmlHolder#<init>.
Cannot resolve which method to invoke for [null] due to overlapping prototypes between:
[interface org.apache.xmlbeans.XmlObject]
[interface org.w3c.dom.Node]
com.eviware.soapui.impl.wsdl.mock.DispatchException: com.eviware.soapui.impl.wsdl.mock.DispatchException: Failed to dispatch using script; groovy.lang.GroovyRuntimeException: Ambiguous method overloading for method com.eviware.soapui.support.XmlHolder#<init>.
Cannot resolve which method to invoke for [null] due to overlapping prototypes between:
[interface org.apache.xmlbeans.XmlObject]
[interface org.w3c.dom.Node]

There's no documentation that i can see to assist with this error? Has anyone seen this and resolved?

1 Reply

  • SeanSoap's avatar
    SeanSoap
    New Contributor
    Just download SOAPUI Pro Trial and this works ok, but running same project in free version doesn't work

    This seems to be the bare minimum required to have REST MockResponses returned for a given request, so I guess we will have to look at a seperate solution for this type of service mocking.