Package org.apache.cxf.binding.soap.wsdl.extensions

Examples of org.apache.cxf.binding.soap.wsdl.extensions.SoapBody


    }

    private boolean checkR2201Output(final Operation operation,
                                     final BindingOperation bop) {
        int outmessagePartsCount = wsdlHelper.getOutMessageParts(operation).size();
        SoapBody soapBody = SOAPBindingUtil.getBindingOutputSOAPBody(bop);
        if (soapBody != null) {
            List<?> parts = soapBody.getParts();
            int boundPartSize = parts == null ? outmessagePartsCount : parts.size();
            SoapHeader soapHeader = SOAPBindingUtil.getBindingOutputSOAPHeader(bop);
            boundPartSize = soapHeader != null
                && soapHeader.getMessage().equals(
                    operation.getOutput().getMessage()
View Full Code Here


                fail("Element soap:operation style=rpc Missed!");
            }
            BindingInput bi = bo.getBindingInput();
            found = false;
            for (Object obj : bi.getExtensibilityElements()) {
                SoapBody soapBody = SOAPBindingUtil.getSoapBody(obj);
                if (soapBody != null && soapBody.getUse().equalsIgnoreCase("literal")) {
                    found = true;
                    break;
                }
            }
            if (!found) {
View Full Code Here

            }
            BindingInput bi = bo.getBindingInput();
            for (Object obj : bi.getExtensibilityElements()) {
                assertTrue(SOAPBindingUtil.isSOAPBody(obj));
                assertTrue(obj instanceof SOAP12Body);
                SoapBody soapBody = SOAPBindingUtil.getSoapBody(obj);
                assertNotNull(soapBody);
                assertTrue("literal".equalsIgnoreCase(soapBody.getUse()));
            }
        } catch (ToolException e) {
            fail("Exception Encountered when parsing wsdl, error: " + e.getMessage());
        }
    }
View Full Code Here

            }
            BindingInput bi = bo.getBindingInput();
            for (Object obj : bi.getExtensibilityElements()) {
                assertTrue(SOAPBindingUtil.isSOAPBody(obj));
                assertTrue(obj instanceof SOAP12Body);
                SoapBody soapBody = SOAPBindingUtil.getSoapBody(obj);
                assertNotNull(soapBody);
                assertTrue("literal".equalsIgnoreCase(soapBody.getUse()));
            }
            bo = binding.getBindingOperation("pingMe", null, null);
            assertNotNull(bo);
            Iterator<?> it = bo.getExtensibilityElements().iterator();
            assertTrue(it != null && it.hasNext());
View Full Code Here

            }
            BindingInput bi = bo.getBindingInput();
            for (Object obj : bi.getExtensibilityElements()) {
                assertTrue(SOAPBindingUtil.isSOAPBody(obj));
                assertTrue(obj instanceof SOAPBody);
                SoapBody soapBody = SOAPBindingUtil.getSoapBody(obj);
                assertNotNull(soapBody);
                assertTrue("literal".equalsIgnoreCase(soapBody.getUse()));
            }
        } catch (ToolException e) {
            fail("Exception Encountered when parsing wsdl, error: " + e.getMessage());
        }
    }
View Full Code Here

            }
        }
        String use = null;
        for (ExtensibilityElement ext : inbindings) {
            if (SOAPBindingUtil.isSOAPBody(ext)) {
                SoapBody soapBody = SOAPBindingUtil.getSoapBody(ext);
                use = soapBody.getUse();
            } else if (SOAPBindingUtil.isSOAPHeader(ext)) {
                processSoapHeader(jm, operation, ext);
            }
            if (ext instanceof MIMEMultipartRelated && jm.enableMime()) {
                processMultipart(jm, operation, (MIMEMultipartRelated)ext, JavaType.Style.IN);
View Full Code Here

    private SoapBody getSoapBody(Class<?> parent) throws ToolException {
        if (extReg == null) {
            extReg = wsdlFactory.newPopulatedExtensionRegistry();
        }
        SoapBody soapBody = null;
        try {
            soapBody = SOAPBindingUtil.createSoapBody(extReg, parent, isSOAP12());
        } catch (WSDLException wse) {
            Message msg = new Message("FAIL_TO_CREATE_SOAPBINDING", LOG);
            throw new ToolException(msg, wse);
        }
        soapBody.setUse((String)env.get(ToolConstants.CFG_USE));
        if (WSDLConstants.RPC.equalsIgnoreCase((String)env.get(ToolConstants.CFG_STYLE))
            && env.optionSet(ToolConstants.CFG_NAMESPACE)) {
            soapBody.setNamespaceURI((String)env.get(ToolConstants.CFG_NAMESPACE));
        }
        return soapBody;
    }
View Full Code Here

                                      boolean output,
                                      BindingOperationInfo boi)
        throws XMLStreamException {
        String responseSuffix = output ? "Response" : "";
        String ns = boi.getName().getNamespaceURI();
        SoapBody body = null;
        if (output) {
            body = boi.getOutput().getExtensor(SoapBody.class);
        } else {
            body = boi.getInput().getExtensor(SoapBody.class);
        }       
        if (body != null && !StringUtils.isEmpty(body.getNamespaceURI())) {
            ns = body.getNamespaceURI();
        }

        nsStack.add(ns);
        String prefix = nsStack.getPrefix(ns);
        StaxUtils.writeStartElement(xmlWriter, prefix, boi.getName().getLocalPart() + responseSuffix, ns);
View Full Code Here

TOP

Related Classes of org.apache.cxf.binding.soap.wsdl.extensions.SoapBody

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.