Java Code Examples for javax.wsdl.BindingInput#setName()

The following examples show how to use javax.wsdl.BindingInput#setName() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: AttributeVisitor.java    From cxf with Apache License 2.0 6 votes vote down vote up
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;
}
 
Example 2
Source File: OperationVisitor.java    From cxf with Apache License 2.0 5 votes vote down vote up
public Message generateInputMessage(Operation operation, BindingOperation bindingOperation) {
    Message msg = definition.createMessage();
    QName msgName;
    if (!mapper.isDefaultMapping()) {
        //mangle the message name
        //REVISIT, do we put in the entire scope for mangling
        msgName = new QName(definition.getTargetNamespace(),
                            getScope().tail() + "." + operation.getName());
    } else {
        msgName = new QName(definition.getTargetNamespace(), operation.getName());
    }
    msg.setQName(msgName);
    msg.setUndefined(false);

    String inputName = operation.getName() + REQUEST_SUFFIX;
    Input input = definition.createInput();
    input.setName(inputName);
    input.setMessage(msg);

    BindingInput bindingInput = definition.createBindingInput();
    bindingInput.setName(inputName);

    bindingOperation.setBindingInput(bindingInput);
    operation.setInput(input);

    definition.addMessage(msg);

    return msg;
}
 
Example 3
Source File: WSDLToCorbaBinding.java    From cxf with Apache License 2.0 5 votes vote down vote up
private void addBindingOperations(Definition definition, PortType portType, Binding binding)
    throws Exception {

    List<Operation> ops = CastUtils.cast(portType.getOperations());
    for (Operation op : ops) {
        try {
            BindingOperation bindingOperation = definition.createBindingOperation();
            addCorbaOperationExtElement(bindingOperation, op);
            bindingOperation.setName(op.getName());
            if (op.getInput() != null) {
                BindingInput bindingInput = definition.createBindingInput();
                bindingInput.setName(op.getInput().getName());
                bindingOperation.setBindingInput(bindingInput);
            }
            if (op.getOutput() != null) {
                BindingOutput bindingOutput = definition.createBindingOutput();
                bindingOutput.setName(op.getOutput().getName());
                bindingOperation.setBindingOutput(bindingOutput);
            }
            // add Faults
            if (op.getFaults() != null && op.getFaults().size() > 0) {
                Collection<Fault> faults = CastUtils.cast(op.getFaults().values());
                for (Fault fault : faults) {
                    BindingFault bindingFault = definition.createBindingFault();
                    bindingFault.setName(fault.getName());
                    bindingOperation.addBindingFault(bindingFault);
                }
            }
            bindingOperation.setOperation(op);
            binding.addBindingOperation(bindingOperation);
        } catch (Exception ex) {
            LOG.warning("Operation " + op.getName() + " not mapped to CORBA binding.");
        }
    }
}
 
Example 4
Source File: WSDLToSoapProcessor.java    From cxf with Apache License 2.0 5 votes vote down vote up
private BindingInput getBindingInput(Input input) throws ToolException {
    BindingInput bi = wsdlDefinition.createBindingInput();
    bi.setName(input.getName());
    // As command line won't specify the details of body/header for message
    // parts
    // All input message's parts will be added into one soap body element
    bi.addExtensibilityElement(getSoapBody(BindingInput.class));
    return bi;
}
 
Example 5
Source File: WSDLToXMLProcessor.java    From cxf with Apache License 2.0 5 votes vote down vote up
private BindingInput getBindingInput(Input input, String operationName) throws ToolException {
    BindingInput bi = wsdlDefinition.createBindingInput();
    bi.setName(input.getName());
    //This ext element in some scenario is optional, but if provided, won't cause error
    bi.addExtensibilityElement(getXMLBody(BindingInput.class, operationName));
    return bi;
}
 
Example 6
Source File: ServiceWSDLBuilder.java    From cxf with Apache License 2.0 5 votes vote down vote up
protected void buildBindingInput(Definition def, BindingOperation bindingOperation,
                                     BindingMessageInfo bindingMessageInfo) {
    BindingInput bindingInput = null;
    if (bindingMessageInfo != null) {
        bindingInput = def.createBindingInput();
        addDocumentation(bindingInput, bindingMessageInfo.getDocumentation());
        bindingInput.setName(bindingMessageInfo.getMessageInfo().getName().getLocalPart());
        bindingOperation.setBindingInput(bindingInput);
        addExtensibilityAttributes(def, bindingInput, bindingMessageInfo.getExtensionAttributes());
        addExtensibilityElements(def, bindingInput, getWSDL11Extensors(bindingMessageInfo));
    }
}
 
Example 7
Source File: PartialWSDLProcessor.java    From cxf with Apache License 2.0 5 votes vote down vote up
private static BindingInput getBindingInput(Input input, Definition wsdlDefinition,
                                            ExtensionRegistry extReg) throws Exception {
    BindingInput bi = wsdlDefinition.createBindingInput();
    bi.setName(input.getName());
    bi.addExtensibilityElement(getSoapBody(BindingInput.class, extReg));
    return bi;
}