Package javax.wsdl

Examples of javax.wsdl.Input


                addNamespace(operationInfo.getName().getNamespaceURI(), def);
                if (operationInfo.isOneWay()) {
                    operation.setStyle(OperationType.ONE_WAY);
                }
                addExtensibilityElements(operation, getWSDL11Extensors(operationInfo));
                Input input = def.createInput();
                addDocumentation(input, operationInfo.getInput().getDocumentation());
                input.setName(operationInfo.getInputName());
                Message message = def.createMessage();
                buildMessage(message, operationInfo.getInput(), def);
                this.addExtensibilityAttributes(input, getInputExtensionAttributes(operationInfo));
                this.addExtensibilityElements(input, getWSDL11Extensors(operationInfo.getInput()));
                input.setMessage(message);
                operation.setInput(input);
                operation.setParameterOrdering(operationInfo.getParameterOrdering());
               
                if (operationInfo.getOutput() != null) {
                    Output output = def.createOutput();
View Full Code Here


        opInfo.setProperty(WSDL_OPERATION, op);
        List<String> porderList = CastUtils.cast((List)op.getParameterOrdering());
        opInfo.setParameterOrdering(porderList);
        this.copyExtensors(opInfo, op.getExtensibilityElements());
        this.copyExtensionAttributes(opInfo, op);
        Input input = op.getInput();
        if (input != null) {
            MessageInfo minfo = opInfo.createMessage(input.getMessage().getQName());
            opInfo.setInput(input.getName(), minfo);
            buildMessage(minfo, input.getMessage());
            copyExtensors(minfo, input.getExtensibilityElements());
            copyExtensionAttributes(minfo, input);
        }
        Output output = op.getOutput();
        if (output != null) {
            MessageInfo minfo = opInfo.createMessage(output.getMessage().getQName());
View Full Code Here

     * @return
     * @throws InvalidServiceContractException
     */
    public DataType<List<DataType>> getInputType() throws InvalidWSDLException {
        if (inputType == null) {
            Input input = operation.getInput();
            Message message = (input == null) ? null : input.getMessage();
            inputType = getMessageType(message);
            inputType.setDataBinding("idl:input");
        }
        return inputType;
    }
View Full Code Here

        for (Object oper : portType.getOperations()) {
            javax.wsdl.Operation operation = (javax.wsdl.Operation)oper;
            String opName = operation.getName();

            // if input message has no parts, add one containing an empty wrapper
            Input input = operation.getInput();
            if (input != null) {
                Message inputMsg = input.getMessage();
                if (inputMsg.getParts().isEmpty()) {
                    // create wrapper element and add it to the schema DOM
                    Element wrapper =
                        document.createElementNS("http://www.w3.org/2001/XMLSchema", xsPrefix + ":element");
                    wrapper.setAttribute("name", opName);
View Full Code Here

            throw new WSDLException("can not create WSDL", module);
        }
        def.setTypes(this.getTypes(document, def));

        // set the IN parameters
        Input input = def.createInput();
        Set<String> inParam = this.getInParamNames();
        if (inParam != null) {
            Message inMessage = def.createMessage();
            inMessage.setQName(new QName(TNS, this.name + "Request"));
            inMessage.setUndefined(false);
            Part parametersPart = def.createPart();
            parametersPart.setName("map-Map");
            parametersPart.setTypeName(new QName(TNS, "map-Map"));
            inMessage.addPart(parametersPart);
            Element documentation = document.createElement("wsdl:documentation");
            for (String paramName: inParam) {
                ModelParam param = this.getParam(paramName);
                if (!param.internal) {
                    Part part = param.getWSDLPart(def);
                    Element attribute = document.createElement("attribute");
                    attribute.setAttribute("name", paramName);
                    attribute.setAttribute("type", part.getTypeName().getLocalPart());
                    attribute.setAttribute("namespace", part.getTypeName().getNamespaceURI());
                    attribute.setAttribute("java-class", param.type);
                    attribute.setAttribute("optional", Boolean.toString(param.optional));
                    documentation.appendChild(attribute);
                }
            }
            Element usernameAttr = document.createElement("attribute");
            usernameAttr.setAttribute("name", "login.username");
            usernameAttr.setAttribute("type", "std-String");
            usernameAttr.setAttribute("namespace", TNS);
            usernameAttr.setAttribute("java-class", String.class.getName());
            usernameAttr.setAttribute("optional", Boolean.toString(!this.auth));
            documentation.appendChild(usernameAttr);

            Element passwordAttr = document.createElement("attribute");
            passwordAttr.setAttribute("name", "login.password");
            passwordAttr.setAttribute("type", "std-String");
            passwordAttr.setAttribute("namespace", TNS);
            passwordAttr.setAttribute("java-class", String.class.getName());
            passwordAttr.setAttribute("optional", Boolean.toString(!this.auth));
            documentation.appendChild(passwordAttr);

            parametersPart.setDocumentationElement(documentation);
            def.addMessage(inMessage);
            input.setMessage(inMessage);
        }

        // set the OUT parameters
        Output output = def.createOutput();
        Set<String> outParam = this.getOutParamNames();
View Full Code Here

    private BindingOperation buildBindingOperation(Definition definition, ExtensionRegistry extensionRegistry) throws WSDLException {
        Operation operation = definition.createOperation();
        operation.setName(operationName);
        operation.setStyle(OperationType.REQUEST_RESPONSE);
        Input input = definition.createInput();
        Message inputMessage = definition.createMessage();
        Part inputPart = definition.createPart();
        inputPart.setName("string");
        inputPart.setTypeName(new QName("http://www.w3.org/2001/XMLSchema", "string"));
        inputMessage.addPart(inputPart);
        operation.setInput(input);
        input.setMessage(inputMessage);
        Output output = definition.createOutput();
        Message outputMessage = definition.createMessage();
        operation.setOutput(output);
        output.setMessage(outputMessage);
        BindingOperation bindingOperation = definition.createBindingOperation();
View Full Code Here

            Operation operation = bindingOperation.getOperation();
            if (operation == null) {
                return signature;
            }

            final Input input = operation.getInput();
            if (input == null) {
                return signature;
            }

            String sstyle = getStyle();

            if ("rpc".equals(sstyle)) {
                Collection partNames = input.getMessage().getParts().values();
                for (Iterator i = partNames.iterator(); i.hasNext();) {
                    Part part = (Part) i.next();
                    signature.add(part.getName());
                }
            } else {
                /*
                 * WS-I Basic Profile 1.1 4.7.6 Operation Signatures Definition: operation signature
                 *
                 * The profile defines the "operation signature" to be the fully qualified name of the child element of SOAP body of the SOAP input
                 * message described by an operation in a WSDL binding.
                 *
                 * In the case of rpc-literal binding, the operation name is used as a wrapper for the part accessors. In the document-literal case,
                 * since a wrapper with the operation name is not present, the message signatures must be correctly designed so that they meet this
                 * requirement.
                 *
                 * An endpoint that supports multiple operations must unambiguously identify the operation being invoked based on the input message
                 * that it receives. This is only possible if all the operations specified in the wsdl:binding associated with an endpoint have a
                 * unique operation signature.
                 *
                 * R2710 The operations in a wsdl:binding in a DESCRIPTION MUST result in operation signatures that are different from one another.
                 */
                List<String> bodyParts = getSOAPBodyParts(true);

                Collection<?> parts = input.getMessage().getParts().values();
                // Exclude the parts to be transmitted in SOAP header
                if (bodyParts == null) {
                    parts.removeAll(getInputHeaderParts());
                }
                for (Iterator i = parts.iterator(); i.hasNext();) {
View Full Code Here

            ServiceContract sc = service.getServiceContract();
            if (sc instanceof WSDLServiceContract) {
                PortType pt = ((WSDLServiceContract) sc).getPortType();
                for (Object o : pt.getOperations()) {
                    Operation operation = (Operation) o;
                    Input input = operation.getInput();
                    if (input != null) {
                        Message message = input.getMessage();
                        if (message != null) {
                            List parts = message.getOrderedParts(null);
                            if (parts != null && parts.size() > 0) {
                                Part part = (Part) parts.get(0);
                                dataBinding.addElementQName(operation.getName(), part.getElementName());
View Full Code Here

        copyDocumentation(opInfo, op);
        List<String> porderList = CastUtils.cast((List<?>)op.getParameterOrdering());
        opInfo.setParameterOrdering(porderList);
        this.copyExtensors(opInfo, op.getExtensibilityElements());
        this.copyExtensionAttributes(opInfo, op);
        Input input = op.getInput();
        if (input != null) {
            if (input.getMessage() == null) {
                throw new WSDLRuntimeException(LOG, "NO_MESSAGE", "input", op.getName(), input.getName());
            }
            MessageInfo minfo = opInfo.createMessage(input.getMessage().getQName(), MessageInfo.Type.INPUT);
            opInfo.setInput(input.getName(), minfo);
            buildMessage(minfo, input.getMessage());
            copyExtensors(minfo, input.getExtensibilityElements());
            copyExtensionAttributes(minfo, input);
        }
        Output output = op.getOutput();
        if (output != null) {
            if (output.getMessage() == null) {
View Full Code Here

        Message message = null;
        if (out) {
            Output output = operation.getOutput();
            message = output.getMessage();
        } else {
            Input input = operation.getInput();
            message = input.getMessage();
        }
        return message.getParts() == null ? new HashMap() : message.getParts();
    }
View Full Code Here

TOP

Related Classes of javax.wsdl.Input

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.