soapOperation.setResponseStrategy(SoapResponseStrategy.RANDOM); soapOperation.setForwardedEndpoint(address.getLocation()); soapOperation.setOriginalEndpoint(address.getLocation()); soapOperation.setSoapVersion(address.getVersion()); soapOperation.setMockResponses(new ArrayList<SoapMockResponse>());
public static SoapOperation generateSoapOperation(){ final SoapOperation soapOperation = new SoapOperation(); soapOperation.setId("SOAP OPERATION"); soapOperation.setName("Soap operation name"); soapOperation.setCurrentResponseSequenceIndex(1); soapOperation.setDefaultBody("Default body"); soapOperation.setForwardedEndpoint("Forwarded event"); soapOperation.setInvokeAddress("Invoke address"); soapOperation.setOriginalEndpoint("Original endpoint"); soapOperation.setHttpMethod(HttpMethod.POST); soapOperation.setStatus(SoapOperationStatus.MOCKED); soapOperation.setSoapVersion(SoapVersion.SOAP11); soapOperation.setIdentifyStrategy(SoapOperationIdentifyStrategy.ELEMENT_NAMESPACE); soapOperation.setMockResponses(new ArrayList<SoapMockResponse>()); return soapOperation; } }
operation.setCurrentResponseSequenceIndex(operationV1.getCurrentResponseSequenceIndex()); operation.setForwardedEndpoint(operationV1.getForwardedEndpoint()); operation.setOriginalEndpoint(operationV1.getOriginalEndpoint()); operation.setDefaultXPathMockResponseId(operationV1.getDefaultXPathMockResponseId()); operation.setSimulateNetworkDelay(operationV1.getSimulateNetworkDelay());
existingSoapOperation.setOriginalEndpoint(newSoapOperation.getOriginalEndpoint()); existingSoapOperation.setSoapVersion(newSoapOperation.getSoapVersion()); this.operationRepository.update(existingSoapOperation.getId(), existingSoapOperation);