Package com.sun.tools.ws.wsdl.document

Examples of com.sun.tools.ws.wsdl.document.Message


    }

    protected java.util.List<String> getAsynParameterOrder() {
        //for async operation ignore the parameterOrder
        java.util.List<String> parameterList = new ArrayList<String>();
        Message inputMessage = getInputMessage();
        List<MessagePart> inputParts = inputMessage.getParts();
        for (MessagePart part : inputParts) {
            parameterList.add(part.getName());
        }
        return parameterList;
    }
View Full Code Here


            parameterList = XmlUtil.parseTokenList(parameterOrder);
            parameterOrderPresent = true;
        } else {
            parameterList = new ArrayList<String>();
        }
        Message inputMessage = getInputMessage();
        Message outputMessage = getOutputMessage();
        List<MessagePart> outputParts = null;
        List<MessagePart> inputParts = inputMessage.getParts();
        //reset the mode and ret flag, as MEssagePArts aer shared across ports
        for (MessagePart part : inputParts) {
            part.setMode(Mode.IN);
            part.setReturn(false);
        }
        if (isRequestResponse()) {
            outputParts = outputMessage.getParts();
            for (MessagePart part : outputParts) {
                part.setMode(Mode.OUT);
                part.setReturn(false);
            }
        }

        if (parameterOrderPresent) {
            boolean validParameterOrder = true;
            Iterator<String> paramOrders = parameterList.iterator();
            // If any part in the parameterOrder is not present in the request or
            // response message, we completely ignore the parameterOrder hint
            while (paramOrders.hasNext()) {
                String param = paramOrders.next();
                boolean partFound = false;
                for (MessagePart part : inputParts) {
                    if (param.equals(part.getName())) {
                        partFound = true;
                        break;
                    }
                }
                // if not found, check in output parts
                if (!partFound) {
                    for (MessagePart part : outputParts) {
                        if (param.equals(part.getName())) {
                            partFound = true;
                            break;
                        }
                    }
                }
                if (!partFound) {
                    warning(info.operation.getEntity(), ModelerMessages.WSDLMODELER_INVALID_PARAMETERORDER_PARAMETER(param, info.operation.getName().getLocalPart()));
                    validParameterOrder = false;
                }
            }

            List<MessagePart> inputUnlistedParts = new ArrayList<MessagePart>();
            List<MessagePart> outputUnlistedParts = new ArrayList<MessagePart>();

            //gather input Parts
            if (validParameterOrder) {
                for (String param : parameterList) {
                    MessagePart part = inputMessage.getPart(param);
                    if (part != null) {
                        params.add(part);
                        continue;
                    }
                    if (isRequestResponse()) {
                        MessagePart outPart = outputMessage.getPart(param);
                        if (outPart != null) {
                            params.add(outPart);
                        }
                    }
                }
View Full Code Here

                //add all the wsdl:type elements to latter make a list of all the schema elements
                // that will be needed to create jaxb model
                if(!options.isExtensionMode())
                    validateSchemaImports(e2);
            } else if (XmlUtil.matchesTagNS(e2, WSDLConstants.QNAME_MESSAGE)) {
                Message message = parseMessage(context, definitions, e2);
                definitions.add(message);
            } else if (
                XmlUtil.matchesTagNS(e2, WSDLConstants.QNAME_PORT_TYPE)) {
                PortType portType = parsePortType(context, definitions, e2);
                definitions.add(portType);
View Full Code Here

        TWSDLParserContextImpl context,
        Definitions definitions,
        Element e) {
        context.push();
        context.registerNamespaces(e);
        Message message = new Message(definitions, forest.locatorTable.getStartLocation(e), errReceiver);
        String name = Util.getRequiredAttribute(e, Constants.ATTR_NAME);
        message.setName(name);

        boolean gotDocumentation = false;

        for (Iterator iter = XmlUtil.getAllChildren(e); iter.hasNext();) {
            Element e2 = Util.nextElement(iter);
            if (e2 == null)
                break;

            if (XmlUtil.matchesTagNS(e2, WSDLConstants.QNAME_DOCUMENTATION)) {
                if (gotDocumentation) {
                    Util.fail(
                        "parsing.onlyOneDocumentationAllowed",
                        e.getLocalName());
                }
                gotDocumentation = true;
                message.setDocumentation(getDocumentationFor(e2));
            } else if (XmlUtil.matchesTagNS(e2, WSDLConstants.QNAME_PART)) {
                MessagePart part = parseMessagePart(context, e2);
                message.add(part);
            } else {
                //Ignore any extensibility elements, WS-I BP 1.1 Profiled WSDL 1.1 schema allows extension elements here.
                /*Util.fail(
                    "parsing.invalidElement",
                    e2.getTagName(),
View Full Code Here

TOP

Related Classes of com.sun.tools.ws.wsdl.document.Message

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.