use of javax.wsdl.BindingOperation in project cxf by apache.
the class AttributeVisitor method generateCorbaBindingOperation.
private BindingOperation generateCorbaBindingOperation(Binding wsdlBinding, Operation op, OperationType corbaOp) {
BindingInput bindingInput = definition.createBindingInput();
bindingInput.setName(op.getInput().getName());
BindingOutput bindingOutput = definition.createBindingOutput();
bindingOutput.setName(op.getOutput().getName());
BindingOperation bindingOperation = definition.createBindingOperation();
bindingOperation.addExtensibilityElement((ExtensibilityElement) corbaOp);
bindingOperation.setOperation(op);
bindingOperation.setName(op.getName());
bindingOperation.setBindingInput(bindingInput);
bindingOperation.setBindingOutput(bindingOutput);
binding.addBindingOperation(bindingOperation);
return bindingOperation;
}
use of javax.wsdl.BindingOperation in project cxf by apache.
the class OperationVisitor method generateBindingOperation.
private BindingOperation generateBindingOperation(Binding wsdlBinding, Operation op, String corbaOpName) {
BindingOperation bindingOperation = definition.createBindingOperation();
// OperationType operationType = null;
try {
corbaOperation = (OperationType) extReg.createExtension(BindingOperation.class, CorbaConstants.NE_CORBA_OPERATION);
} catch (WSDLException ex) {
throw new RuntimeException(ex);
}
corbaOperation.setName(corbaOpName);
bindingOperation.addExtensibilityElement((ExtensibilityElement) corbaOperation);
bindingOperation.setOperation(op);
bindingOperation.setName(op.getName());
binding.addBindingOperation(bindingOperation);
return bindingOperation;
}
use of javax.wsdl.BindingOperation in project tomee by apache.
the class JaxRpcServiceInfoBuilder method getStyle.
private BindingStyle getStyle(Binding binding) throws OpenEJBException {
SOAPBinding soapBinding = getExtensibilityElement(SOAPBinding.class, binding.getExtensibilityElements());
String styleString = soapBinding.getStyle();
BindingInput bindingInput = ((BindingOperation) binding.getBindingOperations().get(0)).getBindingInput();
SOAPBody soapBody = getExtensibilityElement(SOAPBody.class, bindingInput.getExtensibilityElements());
String useString = soapBody.getUse();
BindingStyle bindingStyle = BindingStyle.getBindingStyle(styleString, useString);
return bindingStyle;
}
use of javax.wsdl.BindingOperation in project tomee by apache.
the class WsdlVisitor method walkTree.
public void walkTree() {
begin();
try {
visit(definition);
for (Iterator iterator = definition.getImports().entrySet().iterator(); iterator.hasNext(); ) {
Map.Entry entry = (Map.Entry) iterator.next();
String namespaceURI = (String) entry.getKey();
List importsForNamespace = (List) entry.getValue();
for (Iterator iterator1 = importsForNamespace.iterator(); iterator1.hasNext(); ) {
Import anImport = (Import) iterator1.next();
visit(anImport);
}
}
visit(definition.getTypes());
Collection messages = definition.getMessages().values();
for (Iterator iterator = messages.iterator(); iterator.hasNext(); ) {
Message message = (Message) iterator.next();
visit(message);
Collection parts = message.getParts().values();
for (Iterator iterator2 = parts.iterator(); iterator2.hasNext(); ) {
Part part = (Part) iterator2.next();
visit(part);
}
}
Collection services = definition.getServices().values();
for (Iterator iterator = services.iterator(); iterator.hasNext(); ) {
Service service = (Service) iterator.next();
visit(service);
Collection ports = service.getPorts().values();
for (Iterator iterator1 = ports.iterator(); iterator1.hasNext(); ) {
Port port = (Port) iterator1.next();
visit(port);
Binding binding = port.getBinding();
visit(binding);
List bindingOperations = binding.getBindingOperations();
for (int i = 0; i < bindingOperations.size(); i++) {
BindingOperation bindingOperation = (BindingOperation) bindingOperations.get(i);
visit(bindingOperation);
visit(bindingOperation.getBindingInput());
visit(bindingOperation.getBindingOutput());
Collection bindingFaults = bindingOperation.getBindingFaults().values();
for (Iterator iterator2 = bindingFaults.iterator(); iterator2.hasNext(); ) {
BindingFault bindingFault = (BindingFault) iterator2.next();
visit(bindingFault);
}
}
PortType portType = binding.getPortType();
visit(portType);
List operations = portType.getOperations();
for (int i = 0; i < operations.size(); i++) {
Operation operation = (Operation) operations.get(i);
visit(operation);
{
Input input = operation.getInput();
visit(input);
}
{
Output output = operation.getOutput();
visit(output);
}
Collection faults = operation.getFaults().values();
for (Iterator iterator2 = faults.iterator(); iterator2.hasNext(); ) {
Fault fault = (Fault) iterator2.next();
visit(fault);
}
}
}
}
} catch (Exception e) {
logger.error(e.getMessage(), e);
} finally {
end();
}
}
use of javax.wsdl.BindingOperation in project Activiti by Activiti.
the class WSDLImporter method importServicesAndOperations.
/**
* Imports services and operations from the WSDL definition
*/
private void importServicesAndOperations(Definition definition) {
for (Object serviceObject : definition.getServices().values()) {
Service service = (Service) serviceObject;
WSService wsService = this.importService(service);
this.wsServices.put(this.namespace + wsService.getName(), wsService);
Port port = (Port) service.getPorts().values().iterator().next();
for (Object bindOperationObject : port.getBinding().getBindingOperations()) {
BindingOperation bindOperation = (BindingOperation) bindOperationObject;
WSOperation operation = this.processOperation(bindOperation.getOperation(), wsService);
wsService.addOperation(operation);
this.wsOperations.put(this.namespace + operation.getName(), operation);
}
}
}
Aggregations