use of com.predic8.wsdl.BindingOperation in project irontest by zheng-wang.
the class WSDLResource method getWSDLBindings.
@GET
@Path("/{wsdlUrl}/bindings")
public List<WSDLBinding> getWSDLBindings(@PathParam("wsdlUrl") String wsdlUrl) throws UnsupportedEncodingException {
List<WSDLBinding> result = new ArrayList<WSDLBinding>();
WSDLParser parser = new WSDLParser();
Definitions definition = parser.parse(wsdlUrl);
for (Binding binding : definition.getBindings()) {
List<String> operationNames = new ArrayList<String>();
for (BindingOperation operation : binding.getOperations()) {
operationNames.add(operation.getName());
}
result.add(new WSDLBinding(binding.getName(), operationNames));
}
return result;
}
Aggregations