Package javax.wsdl

Examples of javax.wsdl.BindingOutput


    public Set<Part> getOutputHeaderParts() {
        if (outputHeaderParts == null) {
            // Build a set of header parts that we need to exclude
            outputHeaderParts = new HashSet<Part>();
            BindingOutput bindingOutput = bindingOperation.getBindingOutput();

            if (bindingOutput != null) {
                Operation operation = bindingOperation.getOperation();
                javax.wsdl.Message message = operation.getOutput().getMessage();
                List elements = bindingOutput.getExtensibilityElements();
                for (Iterator i = elements.iterator(); i.hasNext();) {
                    Object extensibilityElement = i.next();
                    Part part = getPartFromSOAPHeader(message, extensibilityElement);
                    if (part != null) {
                        outputHeaderParts.add(part);
View Full Code Here


            if (bindingInput == null) {
                return null;
            }
            elements = bindingInput.getExtensibilityElements();
        } else {
            BindingOutput bindingOutput = bindingOperation.getBindingOutput();
            if (bindingOutput == null) {
                return null;
            }
            elements = bindingOutput.getExtensibilityElements();
        }
        javax.wsdl.extensions.soap.SOAPBody soapBody = WebServicePortMetaData.getExtensibilityElement(elements,
                javax.wsdl.extensions.soap.SOAPBody.class);
        return soapBody;
    }
View Full Code Here

        }
    }
   
    protected void buildBindingOutput(Definition def, BindingOperation bindingOperation,
                                   BindingMessageInfo bindingMessageInfo) {
        BindingOutput bindingOutput = null;
        if (bindingMessageInfo != null) {
            bindingOutput = def.createBindingOutput();
            bindingOutput.setName(bindingMessageInfo.getMessageInfo().getName().getLocalPart());
            bindingOperation.setBindingOutput(bindingOutput);
            addExtensibilityAttributes(bindingOutput, bindingMessageInfo.getExtensionAttributes());
            addExtensibilityElements(bindingOutput, getWSDL11Extensors(bindingMessageInfo));
        }
    }
View Full Code Here

                                        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());

        bindingOutput.addExtensibilityElement(output);
       
        // Ad input and output to operation
        bindingOper.setBindingInput(bindingInput);
        bindingOper.setBindingOutput(bindingOutput);
View Full Code Here

            // Get the namespace for the operation from the <soap:body>
            // RJB: is this the right thing to do?
            String namespace = "";
            Iterator bindingMsgIterator = null;
            BindingInput input = operation.getBindingInput();
            BindingOutput output;
            if (input != null) {
                bindingMsgIterator =
                        input.getExtensibilityElements().iterator();
            }
            else {
                output = operation.getBindingOutput();
                if (output != null) {
                    bindingMsgIterator =
                            output.getExtensibilityElements().iterator();
                }
            }
            if (bindingMsgIterator != null) {
                for (; bindingMsgIterator.hasNext();) {
                    Object obj = bindingMsgIterator.next();
View Full Code Here

            HashMap faultMap = new HashMap(); // name to SOAPFault from WSDL4J
            for (Iterator opIterator = bindList.iterator(); opIterator.hasNext();) {
                BindingOperation bindOp = (BindingOperation) opIterator.next();
                Operation operation = bindOp.getOperation();
                BindingInput bindingInput = bindOp.getBindingInput();
                BindingOutput bindingOutput = bindOp.getBindingOutput();
                String opName = bindOp.getName();

                // First, make sure the binding operation matches a portType operation
                String inputName = bindingInput == null ? null :
                        bindingInput.getName();
                String outputName = bindingOutput == null ? null :
                        bindingOutput.getName();
                if (binding.getPortType().getOperation(
                        opName, inputName, outputName) == null) {
                    throw new IOException(Messages.getMessage("unmatchedOp",
                            new String[] {opName, inputName, outputName}));
                }

                ArrayList faults = new ArrayList();

                // input
                if (bindingInput != null) {
                    if (bindingInput.getExtensibilityElements() != null) {
                        Iterator inIter = bindingInput.
                                getExtensibilityElements().iterator();
                        fillInBindingInfo(bEntry, operation, inIter, faults,
                                true);
                    }
                }

                // output
                if (bindingOutput != null) {
                    if (bindingOutput.getExtensibilityElements() != null) {
                        Iterator outIter = bindingOutput.
                                getExtensibilityElements().iterator();
                        fillInBindingInfo(bEntry, operation, outIter, faults,
                                false);
                    }
                }
View Full Code Here

            }
            bindingInput.addExtensibilityElement(inputExtension);
            bindingOperation.setBindingInput(bindingInput);
        }
        if (operation.getOutput() != null) {
            BindingOutput bindingOutput = definition.createBindingOutput();
            configureBindingOutput(bindingOutput, operation.getOutput());
            ExtensibilityElement outputExtension =
                definition.getExtensionRegistry().createExtension(BindingOutput.class, soapBody);
            if (requiresSOAP12) {
                ((SOAP12Body)outputExtension).setUse("literal");
            } else {
                ((SOAPBody)outputExtension).setUse("literal");
            }
            bindingOutput.addExtensibilityElement(outputExtension);
            bindingOperation.setBindingOutput(bindingOutput);
        }
        for (Iterator fi = operation.getFaults().values().iterator(); fi.hasNext();) {
            Fault fault = (Fault)fi.next();
            BindingFault bindingFault = definition.createBindingFault();
View Full Code Here

                    in.addExtensibilityElement(body);
                }
                bindingOp.setBindingInput(in);
            }
            if (operation.getOutput() != null) {
                BindingOutput out = def.createBindingOutput();
                out.setName(operation.getOutput().getName());
                if (soap11) {
                    SOAPBody body = new SOAPBodyImpl();
                    body.setUse("literal");
                    out.addExtensibilityElement(body);
                } else {
                    SOAP12Body body = new SOAP12BodyImpl();
                    body.setUse("literal");
                    out.addExtensibilityElement(body);
                }
                bindingOp.setBindingOutput(out);
            }
            for (Iterator itf = operation.getFaults().values().iterator(); itf
                    .hasNext();) {
View Full Code Here

        Operation wsdlOperation = wsdlBindingOperation.getOperation();
        Output wsdlOutput = wsdlOperation.getOutput();
        if (wsdlOutput == null) {
            return;
        }
        BindingOutput wsdlBindingOutput = wsdlBindingOperation.getBindingOutput();
        SOAP12Body wsdlSoapBody = WSDLUtils.getExtension(wsdlBindingOutput, SOAP12Body.class);
        List<SOAP12Header> wsdlSoapHeaders = WSDLUtils.getExtensions(wsdlBindingOutput, SOAP12Header.class);
        Wsdl1SoapMessageImpl output = new Wsdl1SoapMessageImpl();
        output.setName(wsdlOutput.getMessage().getQName());
        output.setNamespace(wsdlSoapBody.getNamespaceURI());
View Full Code Here

        Operation wsdlOperation = wsdlBindingOperation.getOperation();
        Output wsdlOutput = wsdlOperation.getOutput();
        if (wsdlOutput == null) {
            return;
        }
        BindingOutput wsdlBindingOutput = wsdlBindingOperation.getBindingOutput();
        SOAPBody wsdlSoapBody = WSDLUtils.getExtension(wsdlBindingOutput, SOAPBody.class);
        List<SOAPHeader> wsdlSoapHeaders = WSDLUtils.getExtensions(wsdlBindingOutput, SOAPHeader.class);
        Wsdl1SoapMessageImpl output = new Wsdl1SoapMessageImpl();
        output.setName(wsdlOutput.getMessage().getQName());
        output.setNamespace(wsdlSoapBody.getNamespaceURI());
View Full Code Here

TOP

Related Classes of javax.wsdl.BindingOutput

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.