Examples of BufferedStreamResult


Examples of org.jboss.ws.core.binding.BufferedStreamResult

         marshaller.setProperty(Marshaller.JAXB_FRAGMENT, true);
         marshaller.setAttachmentMarshaller(new AttachmentMarshallerImpl());

         // It's safe to pass a stream result, because the SCE will always be in XML_VALID state afterwards.
         // This state can safely be written to an outstream. See XMLFragment and XMLContent as well.
         result = new BufferedStreamResult();
         marshaller.marshal(new JAXBElement(xmlName, expectedType, value), result);

         if (log.isDebugEnabled()) log.debug("serialized: " + result);
      }
      catch (Exception ex)
View Full Code Here

Examples of org.jboss.ws.core.binding.BufferedStreamResult

         marshaller.setProperty(Marshaller.JAXB_FRAGMENT, true);
         marshaller.setAttachmentMarshaller(new AttachmentMarshallerImpl());

         // It's safe to pass a stream result, because the SCE will always be in XML_VALID state afterwards.
         // This state can safely be written to an outstream. See XMLFragment and XMLContent as well.
         result = new BufferedStreamResult();
         marshaller.marshal(new JAXBElement(xmlName, expectedType, value), result);

         if (log.isDebugEnabled()) log.debug("serialized: " + result);
      }
      catch (Exception ex)
View Full Code Here

Examples of org.jboss.ws.core.binding.BufferedStreamResult

      {
         valueStr = SimpleTypeBindings.marshal(xmlType.getLocalPart(), value, nsRegistry);
      }

      String xmlFragment = wrapValueStr(xmlName, valueStr, nsRegistry, null, attributes, true);
      return new BufferedStreamResult(xmlFragment);
   }
View Full Code Here

Examples of org.jboss.ws.core.binding.BufferedStreamResult

         throw new IllegalArgumentException("SOAPElement value cannot be null");
      if ((value instanceof SOAPElement) == false)
         throw new IllegalArgumentException("Value is not a SOAPElement: " + value.getClass().getName());

      String xmlFragment = DOMWriter.printNode((SOAPElement)value, false);
      return new BufferedStreamResult(xmlFragment);
   }
View Full Code Here

Examples of org.jboss.ws.core.binding.BufferedStreamResult

         StringWriter strwr = new StringWriter();
         delegate.marshal(value, strwr);
         String xmlFragment = strwr.toString();

         log.debug("serialized: " + xmlFragment);
         return new BufferedStreamResult(xmlFragment);
      }
      catch (RuntimeException rte)
      {
         throw rte;
      }
View Full Code Here

Examples of org.jboss.ws.core.binding.BufferedStreamResult

         serializeArrayComponents(compXmlName, compXmlType, serContext, objArr);
         buffer.append("</" + nodeName + ">");
         String xmlFragment = buffer.toString();
        
         log.debug("serialized: " + xmlFragment);
         return new BufferedStreamResult(xmlFragment);
      }
      catch (RuntimeException e)
      {
         throw e;
      }
View Full Code Here

Examples of org.jboss.ws.core.binding.BufferedStreamResult

         }
         else if (jaxbContext != null)
         {
            Marshaller marshaller = jaxbContext.createMarshaller();
            marshaller.setProperty(Marshaller.JAXB_FRAGMENT, true);
            BufferedStreamResult result = new BufferedStreamResult();
            marshaller.marshal(obj, result);

            reqMsg = new HTTPMessageImpl(result);
         }
      }
View Full Code Here

Examples of org.jboss.ws.core.binding.BufferedStreamResult

         DOMResult domResult = (DOMResult)result;
         source = new DOMSource(domResult.getNode());
      }
      else if (result instanceof BufferedStreamResult)
      {
         BufferedStreamResult br = (BufferedStreamResult)result;
         ByteArrayOutputStream baos = (ByteArrayOutputStream)br.getOutputStream();
         source = new BufferedStreamSource(baos.toByteArray());
      }
      else
      {
         throw new IllegalArgumentException("Unsupported result type: " + result);
View Full Code Here

Examples of org.jboss.ws.core.binding.BufferedStreamResult

      String valueStr = SimpleTypeBindings.marshalDateTime((Calendar)value);

      NamespaceRegistry nsRegistry = serContext.getNamespaceRegistry();
      String xmlFragment = wrapValueStr(xmlName, valueStr, nsRegistry, null, attributes, true);
      return new BufferedStreamResult(xmlFragment);
   }
View Full Code Here

Examples of org.jboss.ws.core.binding.BufferedStreamResult

      value = JavaUtils.getPrimitiveValueArray(value);
      String valueStr = SimpleTypeBindings.marshalHexBinary((byte[])value);

      NamespaceRegistry nsRegistry = serContext.getNamespaceRegistry();
      String xmlFragment = wrapValueStr(xmlName, valueStr, nsRegistry, null, attributes, true);
      return new BufferedStreamResult(xmlFragment);
   }
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.