soapOperation.setNetworkDelay(0L); soapOperation.setResponseStrategy(SoapResponseStrategy.SEQUENCE); soapOperation.setSimulateNetworkDelay(false); soapOperation.setStatus(SoapOperationStatus.MOCKED); soapOperation.setMockResponses(Arrays.asList(soapMockResponse));
/** * The process message is responsible for processing an incoming serviceTask and generate * a response based on the incoming serviceTask input * @param serviceTask The serviceTask that will be processed by the service * @return A result based on the processed incoming serviceTask * @see ServiceTask * @see ServiceResult */ @Override public ServiceResult<UpdateSoapOperationOutput> process(final ServiceTask<UpdateSoapOperationInput> serviceTask) { final UpdateSoapOperationInput input = serviceTask.getInput(); final SoapOperation updated = input.getOperation(); final SoapOperation soapOperation = this.operationRepository.findOne(input.getOperationId()); soapOperation.setStatus(updated.getStatus()); soapOperation.setForwardedEndpoint(updated.getForwardedEndpoint()); soapOperation.setResponseStrategy(updated.getResponseStrategy()); soapOperation.setSimulateNetworkDelay(updated.getSimulateNetworkDelay()); soapOperation.setNetworkDelay(updated.getNetworkDelay()); soapOperation.setDefaultMockResponseId(updated.getDefaultMockResponseId()); soapOperation.setMockOnFailure(updated.getMockOnFailure()); soapOperation.setIdentifyStrategy(updated.getIdentifyStrategy()); final SoapOperation updatedSoapOperation = this.operationRepository.update(input.getOperationId(), soapOperation); return createServiceResult(UpdateSoapOperationOutput.builder() .operation(updatedSoapOperation) .build()); } }
operation.setOriginalEndpoint(operationV1.getOriginalEndpoint()); operation.setDefaultXPathMockResponseId(operationV1.getDefaultXPathMockResponseId()); operation.setSimulateNetworkDelay(operationV1.getSimulateNetworkDelay()); operation.setNetworkDelay(operationV1.getNetworkDelay()); operation.setPortId(port.getId());