Examples of Wsdl1SoapOperation


Examples of org.apache.servicemix.soap.bindings.soap.model.wsdl1.Wsdl1SoapOperation

                                     Message message,
                                     Set<URI> serviceRoles) {
        // Retrieve soap headers bound to message parts
        Operation operation = message.get(Operation.class);
        if (operation instanceof Wsdl1SoapOperation) {
            Wsdl1SoapOperation soapOper = (Wsdl1SoapOperation) operation;
            for (Wsdl1SoapPart part : soapOper.getInput().getParts()) {
                if (part.isHeader()) {
                    understoodQNames.add(part.getElement());
                }
            }
        }
View Full Code Here

Examples of org.apache.servicemix.soap.bindings.soap.model.wsdl1.Wsdl1SoapOperation

            NodeList nodes = partWrapper.getChildNodes();
            partsContent.add(nodes);
            partWrapper = DomUtil.getNextSiblingElement(partWrapper);
        }
       
        Wsdl1SoapOperation wsdlOperation = getOperation(message);
        Wsdl1SoapMessage wsdlMessage = server ? wsdlOperation.getOutput() : wsdlOperation.getInput();
        Collection orderedParts = wsdlMessage.getParts();
        if (orderedParts.size() != partsContent.size()) {
            throw new Fault("Message contains " + partsContent.size() + " part(s) but expected "
                    + orderedParts.size() + " parts");
        }
       
        Document document = DomUtil.createDocument();
        Node body = null;
        if (wsdlOperation.getStyle() == Style.RPC) {
            body = DomUtil.createElement(document, wsdlMessage.getElementName());
        }
        int idxPart = 0;
        for (Wsdl1SoapPart part : wsdlMessage.getParts()) {
            NodeList nodes =  partsContent.get(idxPart++);
            if (part.isBody()) {
                if (wsdlOperation.getStyle() == Style.DOCUMENT) {
                    Element e = null;
                    for (int i = 0; i < nodes.getLength(); i++) {
                        Node n = nodes.item(i);
                        if (n instanceof Element) {
                            if (e != null) {
View Full Code Here

Examples of org.apache.servicemix.soap.bindings.soap.model.wsdl1.Wsdl1SoapOperation

                message.setContent(Source.class, StaxUtil.createSource(xmlReader));
            }
            return;
        }
       
        Wsdl1SoapOperation wsdlOperation = getOperation(message);
        Wsdl1SoapMessage wsdlMessage = server ? wsdlOperation.getInput() : wsdlOperation.getOutput();

        Document document = DomUtil.createDocument();
        Element root = DomUtil.createElement(document, JbiConstants.WSDL11_WRAPPER_MESSAGE);
        String typeNamespace = wsdlMessage.getName().getNamespaceURI();
        if (typeNamespace == null || typeNamespace.length() == 0) {
            throw new IllegalArgumentException("messageType namespace is null or empty");
        }
        root.setAttribute(XMLConstants.XMLNS_ATTRIBUTE + ":" + JbiConstants.WSDL11_WRAPPER_MESSAGE_PREFIX,
                          typeNamespace);
        String typeLocalName = wsdlMessage.getName().getLocalPart();
        if (typeLocalName == null || typeLocalName.length() == 0) {
            throw new IllegalArgumentException("messageType local name is null or empty");
        }
        root.setAttribute(JbiConstants.WSDL11_WRAPPER_TYPE, JbiConstants.WSDL11_WRAPPER_MESSAGE_PREFIX + ":" + typeLocalName);
        String messageName = wsdlMessage.getMessageName();
        root.setAttribute(JbiConstants.WSDL11_WRAPPER_NAME, messageName);
        root.setAttribute(JbiConstants.WSDL11_WRAPPER_VERSION, "1.0");
       
        Element body = getBodyElement(message);
        for (Wsdl1SoapPart part : wsdlMessage.getParts()) {
            if (part.isBody()) {
                if (wsdlOperation.getStyle() == Wsdl1SoapBinding.Style.DOCUMENT) {
                    addPart(root, body);
                } else /* rpc-style */ {
                    // SOAP:Body element is the operation name, children are operation parameters
                    Element param = DomUtil.getFirstChildElement(body);
                    boolean found = false;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.