Examples of FragmentStreamReader


Examples of org.apache.cxf.staxutils.FragmentStreamReader

            Fault fault = new JBIFault(new org.apache.cxf.common.i18n.Message(JBIFault.JBI_FAULT_STRING,
                                                                              (ResourceBundle) null));
           
            if (StaxUtils.toNextElement(reader)) {
                // handling detail
                Element detail = StaxUtils.read(new FragmentStreamReader(reader)).getDocumentElement();
                fault.setDetail(detail);
            }
            message.setContent(Exception.class, fault);
        } catch (XMLStreamException xse) {
            throw new Fault(new org.apache.cxf.common.i18n.Message("STAX_READ_EXC", BUNDLE));
View Full Code Here

Examples of org.apache.cxf.staxutils.FragmentStreamReader

    @Override
    public Object readObject(MessageReader mreader, Context context) throws DatabindingException {
        try {
            XMLStreamReader reader = ((ElementReader)mreader).getXMLStreamReader();
            return StaxUtils.read(builder, new FragmentStreamReader(reader), true);
        } catch (XMLStreamException e) {
            throw new DatabindingException("Could not parse xml.", e);
        }
    }
View Full Code Here

Examples of org.apache.cxf.staxutils.FragmentStreamReader

                                                   mainNode,
                                                   XPathConstants.NODE);

                StaxUtils.readDocElements(bodyNode.getOwnerDocument(),
                                          bodyNode,
                                          new FragmentStreamReader(reader),
                                          false, false);
                fault = (Element)xu.getValue("//s:Fault", bodyNode, XPathConstants.NODE);
            } else {
                fault = StaxUtils.read(new FragmentStreamReader(reader));
            }
            Element el = (Element)xu.getValue("//s:Fault/s:Code/s:Value",
                                      fault,
                                      XPathConstants.NODE);
            if (el != null) {
View Full Code Here

Examples of org.apache.cxf.staxutils.FragmentStreamReader

        if (message != null) {
            message.removeContent(XMLStreamReader.class);
            final InputStream ins = message.getContent(InputStream.class);
            message.removeContent(InputStream.class);
           
            input = new FragmentStreamReader(input, true) {
                boolean closed;
                public boolean hasNext() throws XMLStreamException {
                    boolean b = super.hasNext();
                    if (!b && !closed) {
                        close();
View Full Code Here

Examples of org.apache.servicemix.jbi.jaxp.FragmentStreamReader

            message.setBodyName(childName);
            // Check for fault
            if (childName.equals(new QName(soapUri, SoapMarshaler.FAULT))) {
                message.setFault(readFaultUsingStax(reader));
            } else {
                message.setSource(new StaxSource(new FragmentStreamReader(reader)));
            }
    }
    return message;
  }
View Full Code Here

Examples of org.apache.servicemix.jbi.jaxp.FragmentStreamReader

        return details;
    }
   
    private SoapFault readFaultUsingStax(XMLStreamReader reader) throws SoapFault {
        try {
            FragmentStreamReader rh = new FragmentStreamReader(reader);
            Document doc = (Document) marshaler.getSourceTransformer().toDOMNode(
                    new StaxSource(rh));
            return readFaultUsingDom(doc.getDocumentElement());
        } catch (SoapFault e) {
            throw e;
View Full Code Here

Examples of org.apache.servicemix.jbi.jaxp.FragmentStreamReader

  private void parseHeaders(SoapMessage message, XMLStreamReader reader)
      throws Exception {
    while (reader.nextTag() != XMLStreamConstants.END_ELEMENT) {
      QName hn = reader.getName();
      FragmentStreamReader rh = new FragmentStreamReader(reader);
      Document doc = (Document) marshaler.getSourceTransformer().toDOMNode(
          new StaxSource(rh));
      DocumentFragment df = doc.createDocumentFragment();
      df.appendChild(doc.getDocumentElement());
      message.addHeader(hn, df);
View Full Code Here

Examples of org.apache.servicemix.jbi.jaxp.FragmentStreamReader

            message.setBodyName(childName);
            // Check for fault
            if (childName.equals(new QName(soapUri, SoapMarshaler.FAULT))) {
                message.setFault(readFaultUsingStax(reader));
            } else {
                message.setSource(new StaxSource(new FragmentStreamReader(reader)));
            }
    }
    return message;
  }
View Full Code Here

Examples of org.apache.servicemix.jbi.jaxp.FragmentStreamReader

        return fault;
    }
   
    private SoapFault readFaultUsingStax(XMLStreamReader reader) throws SoapFault {
        try {
            FragmentStreamReader rh = new FragmentStreamReader(reader);
            Document doc = (Document) marshaler.getSourceTransformer().toDOMNode(
                    new StaxSource(rh));
            return readFaultUsingDom(doc.getDocumentElement());
        } catch (SoapFault e) {
            throw e;
View Full Code Here

Examples of org.apache.servicemix.jbi.jaxp.FragmentStreamReader

  private void parseHeaders(SoapMessage message, XMLStreamReader reader)
      throws Exception {
    while (reader.nextTag() != XMLStreamConstants.END_ELEMENT) {
      QName hn = reader.getName();
      FragmentStreamReader rh = new FragmentStreamReader(reader);
      Document doc = (Document) marshaler.getSourceTransformer().toDOMNode(
          new StaxSource(rh));
      DocumentFragment df = doc.createDocumentFragment();
      df.appendChild(doc.getDocumentElement());
      message.addHeader(hn, df);
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.