Examples of OMContainer


Examples of org.apache.axiom.om.OMContainer

      if (lastNode == null) {
          return null;
      } else if (!lastNode.isComplete()) {
          node = createOMText(value, (OMElement) lastNode, textType);
      } else {
          OMContainer parent = lastNode.getParent();
          if (!(parent instanceof OMDocument)) {
              node = createOMText(value, (OMElement) parent, textType);
          }
      }
      return node;
View Full Code Here

Examples of org.apache.axiom.om.OMContainer

      // throw new RuntimeException("insufficient ns?!?");
    }
  }

  public Object parse(OMElement result) throws AxisFault {
    OMContainer parent = result.getParent();
    // find SoapEnvelope in results parents
    while (parent instanceof OMElement && !(parent instanceof SOAPEnvelope)) {
      parent = ((OMElement) parent).getParent();
    }
    if (parent instanceof SOAPEnvelope) {
View Full Code Here

Examples of org.apache.axiom.om.OMContainer

                if (n != null && !"".equals(n.getPrefix())) {
                    namespaceList.add(n);
                }
            }

            OMContainer parent = currentElem.getParent();
            //if the parent is a document element or parent is null ,then return
            if (parent == null || parent instanceof OMDocument) {
                return;
            }
            if (parent instanceof OMElement) {
View Full Code Here

Examples of org.apache.axiom.om.OMContainer

                OMNamespace ns = (OMNamespace) iter.next();
                if (prefix.equals(ns.getPrefix())) {
                    return ns.getNamespaceURI();
                }
            }
            OMContainer parent = currentElem.getParent();
            if (parent != null && parent instanceof OMElement) {
                currentElem = (OMElement) parent;
            } else {
                return null;
            }
View Full Code Here

Examples of org.apache.axiom.om.OMContainer

                        throw new SynapseException(msg, je);
                    }
                }
            }

            OMContainer parent = currentElem.getParent();
            //if the parent is a document element or parent is null ,then return
            if (parent == null || parent instanceof OMDocument) {
                return;
            }
            if (parent instanceof OMElement) {
View Full Code Here

Examples of org.apache.axiom.om.OMContainer

        if (lastNode == null) {
            return null;
        } else if (!lastNode.isComplete()) {
            node = createOMText(value, (OMElement)lastNode, textType);
        } else {
            OMContainer parent = lastNode.getParent();
            if (!(parent instanceof OMDocument)) {
                node = createOMText(value, (OMElement)parent, textType);
            }
        }
        return node;
View Full Code Here

Examples of org.apache.axiom.om.OMContainer

                String prefix = ns.getPrefix();
                String uri = ns.getNamespaceURI();
                if (!namespaces.containsKey(prefix))
                    namespaces.put(prefix, uri);
            }
            OMContainer parent = current.getParent();
            current = (OMElement)((parent != null && parent instanceof OMElement) ? parent : null);
        }
        return Collections.unmodifiableMap(namespaces);
    }
View Full Code Here

Examples of org.apache.axiom.om.OMContainer

            // perform transformation
            transformer.transform(transformSrc, transformTgt);

            StAXOMBuilder builder = new StAXOMBuilder(new ByteArrayInputStream(baosForTarget.toByteArray()));
            OMContainer parent = sourceNode.getParent();
            OMElement result = builder.getDocumentElement();
            log.debug("Transformation result : " + result);

            if (parent instanceof SOAPEnvelope) {
                ((SOAPEnvelope) parent).getBody().getFirstOMChild().detach();
                ((SOAPEnvelope) parent).getBody().setFirstChild(result);
            } else {
                parent.getFirstOMChild().detach();
                parent.addChild(result);
            }

        } catch (MalformedURLException mue) {
            handleException(mue);
        } catch (TransformerConfigurationException tce) {
View Full Code Here

Examples of org.apache.axiom.om.OMContainer

        // invoke transformation, with static enveope
        MessageContext synCtx = TestUtils.getTestContext(SOURCE);
        transformMediator.mediate(synCtx);

        // validate result
        OMContainer body = synCtx.getEnvelope().getBody();
        if (body.getFirstOMChild() instanceof OMElement) {

            OMElement getQuoteElem = (OMElement) body.getFirstOMChild();
            assertTrue("GetQuote".equals(getQuoteElem.getLocalName()));
            assertTrue("http://www.webserviceX.NET/".equals(getQuoteElem.getNamespace().getName()));

            OMElement symbolElem = getQuoteElem.getFirstElement();
            assertTrue("symbol".equals(symbolElem.getLocalName()));
View Full Code Here

Examples of org.apache.axiom.om.OMContainer

        // invoke transformation, with static enveope
        MessageContext synCtx = TestUtils.getTestContext(SOURCE);
        transformMediator.mediate(synCtx);

        // validate result
        OMContainer body = synCtx.getEnvelope().getBody();
        if (body.getFirstOMChild() instanceof OMElement) {

            OMElement getQuoteElem = (OMElement) body.getFirstOMChild();
            assertTrue("GetQuote".equals(getQuoteElem.getLocalName()));
            assertTrue("http://www.webserviceX.NET/".equals(getQuoteElem.getNamespace().getName()));

            OMElement symbolElem = getQuoteElem.getFirstElement();
            assertTrue("symbol".equals(symbolElem.getLocalName()));
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.