Package javax.wsdl

Examples of javax.wsdl.BindingInput


        return output == null ? null : output.getMessage();
    }
    private SOAPBody getSOAPBody(boolean input) {
        List elements = null;
        if (input) {
            BindingInput bindingInput = bindingOp.getBindingInput();
            if (bindingInput == null) {
                return null;
            }
            elements = bindingInput.getExtensibilityElements();
        } else {
            BindingOutput bindingOutput = bindingOp.getBindingOutput();
            if (bindingOutput == null) {
                return null;
            }
View Full Code Here


                    initDocLitBareParam(parms, parmMap, operation);
                }
            }

            // Set the header flags
            BindingInput bindingInput = bindingOp.getBindingInput();
            if (bindingInput != null) {
                javax.wsdl.Message message = operation.getInput().getMessage();
                List elements = bindingInput.getExtensibilityElements();
                for (Iterator i = elements.iterator(); i.hasNext();) {
                    Object extensibilityElement = i.next();
                    Part part = getPartFromSOAPHeader(message, extensibilityElement);
                    if (part != null) {
                        OperationWebParam p = parmMap.get(part.getName());
View Full Code Here

    }

    private void addWrapperRoot(XMLMessage xmlMessage, DataBindingCallback callback) throws WSDLException {
        BindingOperation operation = getBindingOperation(callback.getOperationName());
       
        BindingInput input = operation.getBindingInput();

        TBody xmlBinding = null;
        Iterator ite = input.getExtensibilityElements().iterator();
        while (ite.hasNext()) {
            Object obj = ite.next();
            if (obj instanceof TBody) {
                xmlBinding = (TBody)obj;
            }
View Full Code Here

        Port port = EndpointReferenceUtils.getPort(bus.getWSDLManager(), reference);
        List ops = port.getBinding().getBindingOperations();
        Iterator opIt = ops.iterator();
        while (opIt.hasNext()) {
            BindingOperation op = (BindingOperation)opIt.next();
            BindingInput bindingInput = op.getBindingInput();
            List elements = bindingInput.getExtensibilityElements();
            QName qn = new QName(def.getTargetNamespace(), op.getName());
            for (Iterator i = elements.iterator(); i.hasNext();) {
                Object element = i.next();
                if (SOAPBody.class.isInstance(element)) {
                    SOAPBody body = (SOAPBody)element;
View Full Code Here

        return style;

    }

    public SOAPBody getBindingInputSOAPBody(BindingOperation bop) {
        BindingInput bindingInput = bop.getBindingInput();
        if (bindingInput != null) {
            Iterator ite = bindingInput.getExtensibilityElements().iterator();
            while (ite.hasNext()) {
                Object obj = ite.next();
                if (obj instanceof SOAPBody) {
                    return (SOAPBody)obj;
                }
View Full Code Here

        return null;
    }

    public SOAPHeader getBindingInputSOAPHeader(BindingOperation bop) {
        BindingInput bindingInput = bop.getBindingInput();
        if (bindingInput != null) {
            Iterator ite = bindingInput.getExtensibilityElements().iterator();
            while (ite.hasNext()) {
                Object obj = ite.next();
                if (obj instanceof SOAPHeader) {
                    return (SOAPHeader)obj;
                }
View Full Code Here

        if (param == null) {
            return;
        }
        SOAPBody body = null;

        BindingInput bindingInput = definition.createBindingInput();
        bindingInput.setName(param.getName());

        operation.setBindingInput(bindingInput);

        try {
            body = (SOAPBody)extensionRegistry.createExtension(BindingInput.class,
                                                               new QName(WSDLConstants.SOAP11_NAMESPACE,
                                                                         "body"));
        } catch (WSDLException e1) {
            throw new ToolException(e1.getMessage(), e1);
        }

        if (jmethod.getSoapUse() == SOAPBinding.Use.LITERAL) {
            body.setUse("literal");
        } else {
            Message msg = new Message("ENCODED_USE_NOT_SUPPORTED", LOG);
            throw new ToolException(msg);
        }

        List<JavaParameter> bodyParams = new ArrayList<JavaParameter>();
        List<JavaParameter> headerParams = new ArrayList<JavaParameter>();

        splitSoapHeaderBodyParams(param, bodyParams, headerParams);

        // if exists soap header,then generate soap body parts

        if (headerParams.size() > 0) {
            List<String> parts = new ArrayList<String>();
            for (JavaParameter parameter : bodyParams) {
                parts.add(parameter.getPartName());
            }
            body.setParts(parts);
            SOAPHeader soapHeader = null;
            for (JavaParameter jp : headerParams) {

                try {
                    soapHeader = (SOAPHeader)extensionRegistry
                        .createExtension(BindingInput.class, new QName(WSDLConstants.SOAP11_NAMESPACE,
                                                                       "header"));

                    soapHeader.setMessage(new QName(param.getTargetNamespace(), param.getName()));
                    soapHeader.setPart(jp.getPartName());
                    soapHeader.setUse("literal");

                } catch (WSDLException e) {
                    throw new ToolException(e.getMessage(), e);
                }
            }

            if (jmethod.getSoapStyle() == SOAPBinding.Style.RPC) {
                body.setNamespaceURI(param.getTargetNamespace());
            }
            bindingInput.addExtensibilityElement(soapHeader);

        }
        bindingInput.addExtensibilityElement(body);

    }
View Full Code Here

                }
            }
            if (!found) {
                fail("Element soap:operation style=rpc Missed!");
            }
            BindingInput bi = bo.getBindingInput();
            it = bi.getExtensibilityElements().iterator();
            found = false;
            while (it.hasNext()) {
                Object obj = it.next();
                if (obj instanceof SOAPBody && ((SOAPBody)obj).getUse().equalsIgnoreCase("literal")) {
                    found = true;
View Full Code Here

        soapOperation.setSoapActionURI("");
        bo.addExtensibilityElement(soapOperation);
    }

    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;
    }
View Full Code Here

            binding.addBindingOperation(bindingOperation);
        }
    }

    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;
    }
View Full Code Here

TOP

Related Classes of javax.wsdl.BindingInput

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.