Package com.sun.xml.fastinfoset.dom

Examples of com.sun.xml.fastinfoset.dom.DOMDocumentSerializer


            SOAPMessage soapMessage = (SOAPMessage)resMessage;
            if (soapMessage.getAttachments().hasNext())
               throw new IllegalStateException("Attachments not supported with FastInfoset");

            SOAPEnvelope soapEnv = soapMessage.getSOAPPart().getEnvelope();
            DOMDocumentSerializer serializer = new DOMDocumentSerializer();
            serializer.setOutputStream(output);
            serializer.serialize(soapEnv);
         }
         // JSON support
         else if (epMetaData.isFeatureEnabled(JsonEncodingFeature.class) && resMessage instanceof SOAPMessage)
         {
            SOAPMessage soapMessage = (SOAPMessage)resMessage;
            if (soapMessage.getAttachments().hasNext())
               throw new IllegalStateException("Attachments not supported with JSON");

            SOAPBodyImpl soapBody = (SOAPBodyImpl)soapMessage.getSOAPBody();
            BadgerFishDOMDocumentSerializer serializer = new BadgerFishDOMDocumentSerializer(output);
            serializer.serialize(soapBody.getBodyElement());
         }
         else
         {
            resMessage.writeTo(output);
         }
View Full Code Here


            SOAPMessage soapMessage = (SOAPMessage)resMessage;
            if (soapMessage.getAttachments().hasNext())
               throw new IllegalStateException("Attachments not supported with FastInfoset");

            SOAPEnvelope soapEnv = soapMessage.getSOAPPart().getEnvelope();
            DOMDocumentSerializer serializer = new DOMDocumentSerializer();
            serializer.setOutputStream(output);
            serializer.serialize(soapEnv);
         }
         // JSON support
         else if (epMetaData.isFeatureEnabled(JsonEncodingFeature.class) && resMessage instanceof SOAPMessage)
         {
            SOAPMessage soapMessage = (SOAPMessage)resMessage;
            if (soapMessage.getAttachments().hasNext())
               throw new IllegalStateException("Attachments not supported with JSON");

            SOAPBodyImpl soapBody = (SOAPBodyImpl)soapMessage.getSOAPBody();
            BadgerFishDOMDocumentSerializer serializer = new BadgerFishDOMDocumentSerializer(output);
            serializer.serialize(soapBody.getBodyElement());
         }
         else
         {
            resMessage.writeTo(output);
         }
View Full Code Here

         throw new IllegalStateException("Attachments not supported with FastInfoset");

      try
      {
         SOAPEnvelope soapEnv = soapMessage.getSOAPPart().getEnvelope();
         DOMDocumentSerializer serializer = new DOMDocumentSerializer();
         serializer.setOutputStream(output);
         serializer.serialize(soapEnv);
      }
      catch (SOAPException ex)
      {
         IOException ioex = new IOException("Cannot serialize SOAP Envelope");
         ioex.initCause(ex);
View Full Code Here

            SOAPMessage soapMessage = (SOAPMessage)resMessage;
            if (soapMessage.getAttachments().hasNext())
               throw new IllegalStateException("Attachments not supported with FastInfoset");
           
            SOAPEnvelope soapEnv = soapMessage.getSOAPPart().getEnvelope();
            DOMDocumentSerializer serializer = new DOMDocumentSerializer();
            serializer.setOutputStream(output);
            serializer.serialize(soapEnv);
         }
         // JSON support
         else if (epMetaData.isFeatureEnabled(JsonEncodingFeature.class) && resMessage instanceof SOAPMessage)
         {
            SOAPMessage soapMessage = (SOAPMessage)resMessage;
            if (soapMessage.getAttachments().hasNext())
               throw new IllegalStateException("Attachments not supported with JSON");
           
            SOAPBodyImpl soapBody = (SOAPBodyImpl)soapMessage.getSOAPBody();
            BadgerFishDOMDocumentSerializer serializer = new BadgerFishDOMDocumentSerializer(output);
            serializer.serialize(soapBody.getBodyElement());
         }
         else
         {
            resMessage.writeTo(output);
         }
View Full Code Here

            SOAPMessage soapMessage = (SOAPMessage)resMessage;
            if (soapMessage.getAttachments().hasNext())
               throw new IllegalStateException("Attachments not supported with FastInfoset");

            SOAPEnvelope soapEnv = soapMessage.getSOAPPart().getEnvelope();
            DOMDocumentSerializer serializer = new DOMDocumentSerializer();
            serializer.setOutputStream(output);
            serializer.serialize(soapEnv);
         }
         // JSON support
         else if (epMetaData.isFeatureEnabled(JsonEncodingFeature.class) && resMessage instanceof SOAPMessage)
         {
            SOAPMessage soapMessage = (SOAPMessage)resMessage;
            if (soapMessage.getAttachments().hasNext())
               throw new IllegalStateException("Attachments not supported with JSON");

            SOAPBodyImpl soapBody = (SOAPBodyImpl)soapMessage.getSOAPBody();
            BadgerFishDOMDocumentSerializer serializer = new BadgerFishDOMDocumentSerializer(output);
            serializer.serialize(soapBody.getBodyElement());
         }
         else
         {
            resMessage.writeTo(output);
         }
View Full Code Here

            SOAPMessage soapMessage = (SOAPMessage)resMessage;
            if (soapMessage.getAttachments().hasNext())
               throw new IllegalStateException("Attachments not supported with FastInfoset");

            SOAPEnvelope soapEnv = soapMessage.getSOAPPart().getEnvelope();
            DOMDocumentSerializer serializer = new DOMDocumentSerializer();
            serializer.setOutputStream(output);
            serializer.serialize(soapEnv);
         }
         // JSON support
         else if (epMetaData.isFeatureEnabled(JsonEncodingFeature.class) && resMessage instanceof SOAPMessage)
         {
            SOAPMessage soapMessage = (SOAPMessage)resMessage;
            if (soapMessage.getAttachments().hasNext())
               throw new IllegalStateException("Attachments not supported with JSON");

            SOAPBodyImpl soapBody = (SOAPBodyImpl)soapMessage.getSOAPBody();
            BadgerFishDOMDocumentSerializer serializer = new BadgerFishDOMDocumentSerializer(output);
            serializer.serialize(soapBody.getBodyElement());
         }
         else
         {
            resMessage.writeTo(output);
         }
View Full Code Here

        if (workingDirectory != null) {
            db.setEntityResolver(createRelativePathResolver(workingDirectory));
        }
        Document d = db.parse(document);
       
        DOMDocumentSerializer s = new DOMDocumentSerializer();
        s.setOutputStream(finf);
        s.serialize(d);
    }
View Full Code Here

TOP

Related Classes of com.sun.xml.fastinfoset.dom.DOMDocumentSerializer

Copyright © 2018 www.massapicom. 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.