use of io.irontest.models.endpoint.SOAPEndpointProperties in project irontest by zheng-wang.
the class EndpointDAO method createUnmanagedEndpoint_NoTransaction.
public Endpoint createUnmanagedEndpoint_NoTransaction(String teststepType, AppMode appMode) throws JsonProcessingException {
Endpoint endpoint = null;
if (!Teststep.TYPE_WAIT.equals(teststepType)) {
endpoint = new Endpoint();
endpoint.setName("Unmanaged Endpoint");
if (Teststep.TYPE_SOAP.equals(teststepType)) {
endpoint.setType(Endpoint.TYPE_SOAP);
endpoint.setOtherProperties(new SOAPEndpointProperties());
} else if (Teststep.TYPE_DB.equals(teststepType)) {
endpoint.setType(Endpoint.TYPE_DB);
} else if (Teststep.TYPE_MQ.equals(teststepType)) {
endpoint.setType(Endpoint.TYPE_MQ);
MQEndpointProperties endpointProperties = new MQEndpointProperties();
endpointProperties.setConnectionMode(appMode == AppMode.LOCAL ? MQConnectionMode.BINDINGS : MQConnectionMode.CLIENT);
endpoint.setOtherProperties(endpointProperties);
} else if (Teststep.TYPE_IIB.equals(teststepType)) {
endpoint.setType(Endpoint.TYPE_IIB);
}
long id = insertUnmanagedEndpoint_NoTransaction(endpoint);
endpoint.setId(id);
}
return endpoint;
}
use of io.irontest.models.endpoint.SOAPEndpointProperties in project irontest by zheng-wang.
the class ManagedEndpointResource method create.
@POST
@Path("environments/{environmentId}/endpoints")
@PermitAll
public Endpoint create(@PathParam("environmentId") long environmentId, Endpoint endpoint) throws JsonProcessingException {
Environment env = new Environment();
env.setId(environmentId);
endpoint.setEnvironment(env);
if (Endpoint.TYPE_SOAP.equals(endpoint.getType())) {
endpoint.setOtherProperties(new SOAPEndpointProperties());
} else if (Endpoint.TYPE_MQ.equals(endpoint.getType())) {
((MQEndpointProperties) endpoint.getOtherProperties()).setConnectionMode(appInfo.getAppMode() == AppMode.LOCAL ? MQConnectionMode.BINDINGS : MQConnectionMode.CLIENT);
}
long id = endpointDAO.insertManagedEndpoint(endpoint);
endpoint.setId(id);
return endpoint;
}
Aggregations