Package org.apache.axiom.om

Examples of org.apache.axiom.om.OMElement.addChild()


  public static void setBinaryPayload(SOAPEnvelope envelope, DataHandler dh) {
    OMFactory fac = envelope.getOMFactory();
    OMElement binaryElt = envelope.getOMFactory()
        .createOMElement(BINARYELT);
    OMText text = fac.createOMText(dh, true);
    binaryElt.addChild(text);
    setXMLPayload(envelope, binaryElt);
  }

  public static void setBinaryPayload(MessageContext mc, DataHandler dh) {
    if (mc.getEnvelope() == null) {
View Full Code Here


  public static void setTextPayload(SOAPEnvelope envelope, String text) {
    OMFactory fac = envelope.getOMFactory();
    OMElement textElt = envelope.getOMFactory().createOMElement(TEXTELT);
    OMText textNode = fac.createOMText(text);
    textElt.addChild(textNode);
    setXMLPayload(envelope, textElt);
  }

  public static void setTextPayload(MessageContext mc, String text) {
    if (mc.getEnvelope() == null) {
View Full Code Here

        endpointElement.addChild(failoverElement);

        serializeCommonAttributes(endpoint,endpointElement);

        for (Endpoint childEndpoint : failoverEndpoint.getChildren()) {
            failoverElement.addChild(EndpointSerializer.getElementFromEndpoint(childEndpoint));
        }

        if (!failoverEndpoint.isDynamic()) {
            failoverElement.addAttribute("dynamic", "false", null);
        }
View Full Code Here

        if (bean != null && evaluatingBeans != null && !evaluatingBeans.contains(bean))
        {
            evaluatingBeans.add(bean);
            if (isSimpleType(bean, typeMapper))
            {
                omElement.addChild(factory.createOMText(typeMapper.getStringValue(bean)));
            }
            else if (bean instanceof byte[])
            {
                omElement.addChild(factory.createOMText(Base64.encode((byte[])bean)));
            }
View Full Code Here

            {
                omElement.addChild(factory.createOMText(typeMapper.getStringValue(bean)));
            }
            else if (bean instanceof byte[])
            {
                omElement.addChild(factory.createOMText(Base64.encode((byte[])bean)));
            }
            else
            {
                final Element currentComponentElement =
                    Axis2ClientUtils.getElementByAttribute(
View Full Code Here

                            arrayTypeElement,
                            NAME,
                            0);
                    for (int ctr = 0; ctr < Array.getLength(bean); ctr++)
                    {
                        omElement.addChild(
                            getOMElement(
                                definition,
                                schema,
                                currentComponentElement,
                                Array.get(
View Full Code Here

                        if (!CLASS.equals(name))
                        {
                            final Object value = properties.get(name);
                            if (value != null)
                            {
                                omElement.addChild(
                                    getOMElement(
                                        definition,
                                        schema,
                                        currentComponentElement,
                                        value,
View Full Code Here

                    "key", nullNS, key));
            throttle.addChild(policy);
        } else {
            OMNode inlinePolicy = throttleMediator.getInLinePolicy();
            if (inlinePolicy != null) {
                policy.addChild(inlinePolicy);
                throttle.addChild(policy);
            }
        }
        saveTracingState(throttle, throttleMediator);
View Full Code Here

            } else {
                // add Hessian data inside a data handler
                dataHandler = new DataHandler(new SynapseBinaryDataSource(pis, contentType));
            }
            OMText textData = factory.createOMText(dataHandler, true);
            element.addChild(textData);
           
            // indicate that message faults shall be handled as http 200
            messageContext.setProperty(NhttpConstants.FAULTS_AS_HTTP_200, NhttpConstants.TRUE);

        } catch (IOException e) {
View Full Code Here

        }

        // Serialize endpoint elements which are children of the loadbalance element
        if (loadbalanceEndpoint.getChildren() != null) {
            for (Endpoint childEndpoint : loadbalanceEndpoint.getChildren()) {
                loadbalanceElement.addChild(EndpointSerializer.getElementFromEndpoint(childEndpoint));
            }

        } else {
            for (Member member : loadbalanceEndpoint.getMembers()) {
                OMElement memberEle = fac.createOMElement(
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.