soapOperation.setHttpMethod(HttpMethod.POST); soapOperation.setStatus(SoapOperationStatus.MOCKED); soapOperation.setResponseStrategy(SoapResponseStrategy.RANDOM);
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; } }
private SoapOperation createSoapOperation(String portId, HttpMethod method, SoapVersion soapVersion, String identifierName, String namespace) { SoapOperation soapOperation = new SoapOperation(); soapOperation.setPortId(portId); soapOperation.setHttpMethod(method); soapOperation.setSoapVersion(soapVersion); soapOperation.setIdentifyStrategy(SoapOperationIdentifyStrategy.ELEMENT_NAMESPACE); SoapOperationIdentifier soapOperationIdentifier = new SoapOperationIdentifier(); soapOperationIdentifier.setName(identifierName); soapOperationIdentifier.setNamespace(namespace); soapOperation.setOperationIdentifier(soapOperationIdentifier); return soapOperation; }
soapOperation.setCurrentResponseSequenceIndex(0); soapOperation.setForwardedEndpoint(FORWARD_ENDPOINT); soapOperation.setHttpMethod(HttpMethod.GET); soapOperation.setId(SOAP_OPERATION_ID); soapOperation.setInvokeAddress("http://localhost:8080" + CONTEXT + SLASH + MOCK + SLASH + SOAP + SLASH +
operation.setResponseStrategy(operationV1.getResponseStrategy()); operation.setStatus(operationV1.getStatus()); operation.setHttpMethod(operationV1.getHttpMethod()); operation.setSoapVersion(operationV1.getSoapVersion()); operation.setDefaultBody(operationV1.getDefaultBody());