Package javax.wsdl

Examples of javax.wsdl.Part


                Operation operation = bindingOperation.getOperation();
                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) {
                        inputHeaderParts.add(part);
                    }
                }
            }
View Full Code Here


                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

        }
        return outputHeaderParts;
    }

    private Part getPartFromSOAPHeader(Message message, Object extensibilityElement) {
        Part part = null;
        if (extensibilityElement instanceof SOAPHeader) {
            SOAPHeader soapHeader = (SOAPHeader) extensibilityElement;
            QName msgName = soapHeader.getMessage();
            if (message.getQName().equals(msgName)) {
                part = message.getPart(soapHeader.getPart());
View Full Code Here

        }
        List parts = msg.getOrderedParts(null);
        if (parts.size() != 1) {
            return false;
        }
        Part part = (Part) parts.get(0);
        QName element = part.getElementName();
        if (element == null) {
            return false;
        }
        return element.getLocalPart().equals(bindingOperation.getOperation().getName());
    }
View Full Code Here

            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();) {
                    Part part = (Part) i.next();
                    if (bodyParts == null) {
                        // All parts
                        QName elementName = part.getElementName();
                        if (elementName == null) {
                            elementName = new QName("", part.getName());
                            // TODO: [rfeng] throw new
                            // ServiceRuntimeException("Message part for
                            // document style must refer to an XSD element
                            // using a QName: " + part);
                        }
                        signature.add(elementName);
                    } else {
                        // "parts" in soap:body
                        if (bodyParts.contains(part.getName())) {
                            QName elementName = part.getElementName();
                            if (elementName == null) {
                                elementName = new QName("", part.getName());
                                // TODO: [rfeng] throw new
                                // ServiceRuntimeException("Message part for
                                // document style must refer to an XSD
                                // element using a QName: " + part);
                            }
View Full Code Here

            return output == null ? null : output.getMessage();
        }
    }

    public Part getInputPart(int index) {
        Part part = null;
        Message message = getMessage(true);
        if (message == null) {
            return part;
        }
View Full Code Here

        return (Part) parts.get(index);

    }

    public Part getOutputPart(int index) {
        Part part = null;
        Message message = getMessage(false);
        if (message == null) {
            return part;
        }
View Full Code Here

        List parts = message.getOrderedParts(null);
        Set headerParts = isInput ? getInputHeaderParts() : getOutputHeaderParts();

        int index = 0;
        for (Iterator i = parts.iterator(); i.hasNext(); index++) {
            Part part = (Part) i.next();
            if (headerParts.contains(part)) {
                continue;
            }
            if (bodyParts == null) {
                // All parts
                indexes.add(index);
            } else {
                // "parts" in soap:body
                if (bodyParts.contains(part.getName())) {
                    indexes.add(index);
                }
            }
        }
        return indexes;
View Full Code Here

        List parts = message.getOrderedParts(null);
        Set headerParts = isInput ? getInputHeaderParts() : getOutputHeaderParts();

        int index = 0;
        for (Iterator i = parts.iterator(); i.hasNext(); index++) {
            Part part = (Part) i.next();
            // Test if the part is in header section
            if (headerParts.contains(part) && elementName.equals(part.getElementName())) {
                return index;
            }
        }
        return -1;
    }
View Full Code Here

                    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

TOP

Related Classes of javax.wsdl.Part

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.