Forum Discussion
soapuiuser2013
12 years agoNew Contributor
If anyone is interested, I found a way to change the endpoint. The code is pretty nasty and only works with one interface defined, but I couldn't find anything in the API and it can easily be adapted to work with multiple interfaces.
String projectFile = String.format("src/main/resources/%s-soapui-project.xml", projectName);
project = (WsdlProject)ProjectFactoryRegistry.getProjectFactory("wsdl").createNew(projectFile);
Interface i = project.getInterfaceAt(0);
for(String existingEndpoint : i.getEndpoints()) {
i.changeEndpoint(existingEndpoint, endpoint);
}
Related Content
Recent Discussions
- 9 days agoemoya