Search in sources :

Example 1 with WsdlMockResponse

use of com.eviware.soapui.impl.wsdl.mock.WsdlMockResponse in project microcks by microcks.

the class SoapUIProjectImporter method buildResponse.

/**
 * Build a domain Response from SoapUI MockResponse using this dispatchCriteria.
 */
private Response buildResponse(MockResponse mockResponse, String dispatchCriteria) {
    Response response = new Response();
    response.setName(mockResponse.getName());
    response.setContent(((WsdlMockResponse) mockResponse).getResponseContent());
    response.setHeaders(buildHeaders(((WsdlMockResponse) mockResponse).getResponseHeaders()));
    response.setDispatchCriteria(dispatchCriteria);
    if ("500".equals(((WsdlMockResponse) mockResponse).getConfig().getHttpResponseStatus())) {
        response.setFault(true);
    }
    return response;
}
Also used : RestMockResponse(com.eviware.soapui.impl.rest.mock.RestMockResponse) WsdlMockResponse(com.eviware.soapui.impl.wsdl.mock.WsdlMockResponse) MockResponse(com.eviware.soapui.model.mock.MockResponse) WsdlMockResponse(com.eviware.soapui.impl.wsdl.mock.WsdlMockResponse)

Aggregations

RestMockResponse (com.eviware.soapui.impl.rest.mock.RestMockResponse)1 WsdlMockResponse (com.eviware.soapui.impl.wsdl.mock.WsdlMockResponse)1 MockResponse (com.eviware.soapui.model.mock.MockResponse)1