private BindingOperation writeBindingOperation (Definition def,
Binding binding,
Operation oper,
OperationDesc desc) {
BindingOperation bindingOper = def.createBindingOperation();
BindingInput bindingInput = def.createBindingInput();
BindingOutput bindingOutput = def.createBindingOutput();
bindingOper.setName(oper.getName());
bindingOper.setOperation(oper);
SOAPOperation soapOper = new SOAPOperationImpl();
// If the soapAction option is OPERATION, force
// soapAction to the name of the operation. If NONE,
// force soapAction to "".
// Otherwise use the information in the operationDesc.
String soapAction = "";
if (getSoapAction().equals("OPERATION")) {
soapAction = oper.getName();
} else if (getSoapAction().equals("NONE")) {
soapAction = "";
} else {
soapAction = desc.getSoapAction();
if (soapAction == null) {
soapAction = "";
}
}
soapOper.setSoapActionURI(soapAction);
// Until we have per-operation configuration, this will always be
// the same as the binding default.
// soapOper.setStyle("rpc");
bindingOper.addExtensibilityElement(soapOper);
// Input clause
ExtensibilityElement input = null;
input = writeSOAPBody(desc.getElementQName());
bindingInput.addExtensibilityElement(input);
//Output clause
ExtensibilityElement output = null;
output = writeSOAPBody(desc.getReturnQName());