Examples of XMLBindingMessageFormat


Examples of org.apache.cxf.bindings.xformat.XMLBindingMessageFormat

        return match;
    }
   
    protected List<Element> getPartList(XMLMessage inMessage, Element rootNode, BindingMessageInfo bmi) {
        List<Element> partList = new ArrayList<Element>();
        XMLBindingMessageFormat msgFormat =
            bmi.getExtensor(XMLBindingMessageFormat.class);
        if (msgFormat != null) {
            NodeList nodeList = rootNode.getChildNodes();
            for (int idx = 0; idx < nodeList.getLength(); idx++) {
                partList.add((Element)nodeList.item(idx));
View Full Code Here

Examples of org.apache.cxf.bindings.xformat.XMLBindingMessageFormat

                    LOG.info("DOMOutInterceptor Copy Message Part related Headers to Payload.");
                }
                moveHeaderPartToPayload(bmi, header, payload);
            }
   
            XMLBindingMessageFormat msgFormat =
                bmi.getExtensor(XMLBindingMessageFormat.class);
            QName rootName = msgFormat != null ? msgFormat.getRootNode() : null;
           
            if (rootName == null) {
                if (payload.size() > 1) {
                    throw new Fault(new org.apache.cxf.common.i18n.Message(
                                    "NO_XML_ROOT_NODE", LOG));
View Full Code Here

Examples of org.apache.cxf.bindings.xformat.XMLBindingMessageFormat

    private boolean findXMLFormatRootNode(Iterator it, BindingOperationInfo bo, String errorPath) {
        while (it != null && it.hasNext()) {
            Object ext = it.next();
            if (ext instanceof XMLBindingMessageFormat) {
                XMLBindingMessageFormat xmlFormat = (XMLBindingMessageFormat)ext;
                QName rootNodeName = bo.getName();
                if (xmlFormat.getRootNode() != null) {
                    if (xmlFormat.getRootNode().equals(rootNodeName)) {
                        return true;
                    } else {
                        addErrorMessage(errorPath
                                        + ": wrong value of rootNode attribute, the value should be "
                                        + rootNodeName);
View Full Code Here

Examples of org.apache.cxf.bindings.xformat.XMLBindingMessageFormat

    private XMLBindingMessageFormat getXMLBody(Class clz, String operationName) throws ToolException {
        if (extReg == null) {
            extReg = wsdlFactory.newPopulatedExtensionRegistry();
        }
        XMLBindingMessageFormat xmlFormat = null;
        try {
            xmlFormat = (XMLBindingMessageFormat)extReg.createExtension(clz, ToolConstants.XML_FORMAT);
        } catch (WSDLException wse) {
            Message msg = new Message("FAIL_TO_CREATE_XMLBINDING", LOG);
            throw new ToolException(msg);
        }
        xmlFormat.setRootNode(new QName(wsdlDefinition.getTargetNamespace(), operationName));
        return xmlFormat;
    }
View Full Code Here

Examples of org.apache.cxf.bindings.xformat.XMLBindingMessageFormat

        }
        return match;
    }

    private boolean hasRootNode(BindingMessageInfo bmi, QName elName) {
        XMLBindingMessageFormat xmf = bmi.getExtensor(XMLBindingMessageFormat.class);
        return xmf != null && xmf.getRootNode().equals(elName);
    }
View Full Code Here

Examples of org.apache.cxf.bindings.xformat.XMLBindingMessageFormat

            bmi = boi.getInput();
        } else {
            mi = boi.getOperationInfo().getOutput();
            bmi = boi.getOutput();
        }
        XMLBindingMessageFormat xmf = bmi.getExtensor(XMLBindingMessageFormat.class);
        QName rootInModel = null;
        if (xmf != null) {
            rootInModel = xmf.getRootNode();
        }
        if (mi.getMessageParts().size() == 1) {
            // bare-one-param & wrap
            new BareOutInterceptor().handleMessage(message);
        } else {
View Full Code Here

Examples of org.apache.cxf.bindings.xformat.XMLBindingMessageFormat

    private boolean findXMLFormatRootNode(Iterator it, BindingOperationInfo bo, String errorPath) {
        while (it != null && it.hasNext()) {
            Object ext = it.next();
            if (ext instanceof XMLBindingMessageFormat) {
                XMLBindingMessageFormat xmlFormat = (XMLBindingMessageFormat)ext;
                QName rootNodeName = bo.getName();
                if (xmlFormat.getRootNode() != null) {
                    if (xmlFormat.getRootNode().equals(rootNodeName)) {
                        return true;
                    } else {
                        addErrorMessage(errorPath
                                        + ": wrong value of rootNode attribute, the value should be "
                                        + rootNodeName);
View Full Code Here

Examples of org.apache.cxf.bindings.xformat.XMLBindingMessageFormat

    private boolean findXMLFormatRootNode(Iterator it, BindingOperationInfo bo, String errorPath) {
        while (it != null && it.hasNext()) {
            Object ext = it.next();
            if (ext instanceof XMLBindingMessageFormat) {
                XMLBindingMessageFormat xmlFormat = (XMLBindingMessageFormat)ext;
                if (xmlFormat.getRootNode() == null) {
                    QName rootNodeName = bo.getName();
                    addErrorMessage(errorPath
                                    + ": empty value of rootNode attribute, the value should be "
                                    + rootNodeName);
                    return false;                   
View Full Code Here

Examples of org.apache.cxf.bindings.xformat.XMLBindingMessageFormat

import org.apache.cxf.wsdl.JAXBExtensibilityElement;

public final class XmlIoPlugin extends AbstractWSDLPlugin {

    public ExtensibilityElement createExtension(final Map<String, Object> args) throws WSDLException {
        XMLBindingMessageFormat xmlFormat = null;

        Class<?> clz = getOption(args, Class.class);
        QName qname = getOption(args, QName.class);

        ExtensibilityElement ext = registry.createExtension(clz, ToolConstants.XML_FORMAT);
        if (ext instanceof JAXBExtensibilityElement) {
            xmlFormat = (XMLBindingMessageFormat)((JAXBExtensibilityElement)ext).getValue();
        } else {
            xmlFormat = (XMLBindingMessageFormat)ext;
        }
        xmlFormat.setRootNode(qname);
        return ext;
    }
View Full Code Here

Examples of org.apache.cxf.bindings.xformat.XMLBindingMessageFormat

    private boolean findXMLFormatRootNode(Iterator<XMLBindingMessageFormat> it,
                                          BindingOperationInfo bo,
                                          String errorPath) {
        while (it != null && it.hasNext()) {
            XMLBindingMessageFormat xmlFormat = it.next();
            if (xmlFormat.getRootNode() == null) {
                QName rootNodeName = bo.getName();
                addErrorMessage(errorPath
                                + ": empty value of rootNode attribute, the value should be "
                                + rootNodeName);
                return 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.