Examples of OMSourcedElementImpl


Examples of org.apache.axiom.om.impl.llom.OMSourcedElementImpl

     * @param source
     * @param localName
     * @param ns
     */
    public OMElement createOMElement(OMDataSource source, String localName, OMNamespace ns) {
        return new OMSourcedElementImpl(localName, ns, this, source);
    }
View Full Code Here

Examples of org.apache.axiom.om.impl.llom.OMSourcedElementImpl

     * @param source
     * @param localName
     * @param ns
     */
    public OMElement createOMElement(OMDataSource source, String localName, OMNamespace ns) {
        return new OMSourcedElementImpl(localName, ns, this, source);
    }
View Full Code Here

Examples of org.apache.axiom.om.impl.llom.OMSourcedElementImpl

        if (responseText == null && responseXML != null) {
            // If the response is something like JSON calling toString on it wont work. We need to
            // call toStringWithConsume instead, the following checks are checking for this
            // condition.
            if (responseXML instanceof OMSourcedElementImpl) {
                OMSourcedElementImpl sourcedElement = (OMSourcedElementImpl) responseXML;
                OMDataSource dataSource = sourcedElement.getDataSource();
                if (dataSource != null && dataSource instanceof JSONDataSource) {
                    JSONDataSource jsonDataSource = (JSONDataSource) dataSource;
                    responseText = jsonDataSource.getCompleteJOSNString();
                }
            } else {
View Full Code Here

Examples of org.apache.axiom.om.impl.llom.OMSourcedElementImpl

        }
        return responseText;
    }

    private Scriptable getJSONAsXML() throws CarbonException {
        OMSourcedElementImpl sourcedElement = (OMSourcedElementImpl) responseXML;
        if (sourcedElement.getDataSource() != null) {
            try {
                String jsonString = sourcedElement.toStringWithConsume();
                while (jsonString.indexOf("<?") == 0) {
                    jsonString = jsonString.substring(jsonString.indexOf("?>") + 2);
                }
                Object[] objects = {jsonString};
                return context.newObject(this, "XML", objects);
View Full Code Here

Examples of org.apache.axiom.om.impl.llom.OMSourcedElementImpl

          ds.prefetchData();
      }
     
      String resultWrapper = dataService.getResultWrapperForRequest(requestName);
      String ns = dataService.getNamespaceForRequest(requestName);
      OMElement responseElement = new OMSourcedElementImpl(new QName(ns,
          resultWrapper), OMAbstractFactory.getOMFactory(), ds);
      Query defQuery = dataService.getCallableRequest(
          requestName).getCallQueryGroup().getDefaultCallQuery().getQuery();
      /*
       * Checks if the result has to be pre-built, because in situations like having an
View Full Code Here

Examples of org.apache.axiom.om.impl.llom.OMSourcedElementImpl

        try {
            reader = new InputStreamReader(inputStream, charSetEnc);
        } catch (UnsupportedEncodingException ex) {
            throw new AxisFault("Unsupported encoding: " + charSetEnc, ex);
        }
        return new OMSourcedElementImpl(wrapperQName, factory,
                new WrappedTextNodeOMDataSourceFromReader(wrapperQName, reader));
    }
View Full Code Here

Examples of org.apache.axiom.om.impl.llom.OMSourcedElementImpl

                                     String contentType,
                                     MessageContext msgContext) throws AxisFault {
       
        OMFactory factory = OMAbstractFactory.getOMFactory();
        QName wrapperQName = getWrapperQName(msgContext);
        return new OMSourcedElementImpl(wrapperQName, factory,
                new WrappedTextNodeOMDataSourceFromReader(wrapperQName, reader));
    }
View Full Code Here

Examples of org.apache.axiom.om.impl.llom.OMSourcedElementImpl

                                     MessageContext msgContext) throws AxisFault {
       
        OMFactory factory = OMAbstractFactory.getOMFactory();
        Charset cs = Charset.forName(BuilderUtil.getCharSetEncoding(contentType));
        QName wrapperQName = getWrapperQName(msgContext);
        return new OMSourcedElementImpl(wrapperQName, factory,
                new WrappedTextNodeOMDataSourceFromDataSource(wrapperQName, dataSource, cs));
    }
View Full Code Here

Examples of org.apache.axiom.om.impl.llom.OMSourcedElementImpl

            }
        } catch (IOException e) {
            throw AxisFault.makeFault(e);
        }
        JSONDataSource jsonDataSource = getDataSource(inputStream, prefix, localName);
        return new OMSourcedElementImpl(localName, ns, factory, jsonDataSource);
    }
View Full Code Here

Examples of org.apache.axiom.om.impl.llom.OMSourcedElementImpl

            SOAPFaultDetail detail = factory.createSOAPFaultDetail(soapFault);
            if (!ignoreDetailBlocks) {
                for (int i = 0; i < blocks.length; i++) {
                    // A Block implements OMDataSource.  So create OMSourcedElements
                    // for each of the Blocks.
                    OMSourcedElementImpl element =
                            new OMSourcedElementImpl(blocks[i].getQName(), factory, blocks[i]);
                    detail.addChild(element);
                }
            }
        }
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.