Examples of XOPObject


Examples of org.jboss.xb.binding.sunday.xop.XOPObject

      byte[] data = SimpleTypeBindings.unmarshalBase64(base64);

      MimeUtils.ByteArrayConverter converter = MimeUtils.getConverterForContentType(contentType);
      Object converted = converter.readFrom(new ByteArrayInputStream(data));

      XOPObject xopObject = new XOPObject(converted);
      xopObject.setContentType(contentType);

      XOPMarshaller xopMarshaller = new XOPMarshallerImpl();
      String cid = xopMarshaller.addMtomAttachment(xopObject, xopElement.getNamespaceURI(), xopElement.getLocalName());

      // remove base64 node with the xop:Include element
View Full Code Here

Examples of org.jboss.xb.binding.sunday.xop.XOPObject

      NamespaceRegistry nsRegistry = serContext.getNamespaceRegistry();

      if (XOPContext.isXOPMessage())
      {
         XOPMarshaller xopMarshaller = new XOPMarshallerImpl();
         XOPObject xopObject = new XOPObject(value);
         xopObject.setContentType("application/octet-stream");
         String cid = xopMarshaller.addMtomAttachment(xopObject, xmlName.getNamespaceURI(), xmlType.getLocalPart());
         String xopInclude = "<xop:Include xmlns:xop='http://www.w3.org/2004/08/xop/include' href='" + cid + "'/>";
         xmlFragment = wrapValueStr(xmlName, xopInclude, nsRegistry, null, attributes, false);
      }
      else
View Full Code Here

Examples of org.jboss.xb.binding.sunday.xop.XOPObject

         AttachmentPart part = XOPContext.getAttachmentByCID(cid);
         DataHandler dataHandler = part.getDataHandler();
         String contentType = dataHandler.getContentType();

         // Wrapping the DataHandler shields XB from the JAF dependency
         XOPObject xopObject = new XOPObject(dataHandler);
         xopObject.setContentType(contentType);

         return xopObject;
      }
      catch(SOAPException e)
      {
View Full Code Here

Examples of org.jboss.xb.binding.sunday.xop.XOPObject

      NamespaceRegistry nsRegistry = serContext.getNamespaceRegistry();

      if (XOPContext.isXOPMessage())
      {
         XOPMarshaller xopMarshaller = new XOPMarshallerImpl();
         XOPObject xopObject = new XOPObject(value);
         xopObject.setContentType("application/octet-stream");
         String cid = xopMarshaller.addMtomAttachment(xopObject, xmlName.getNamespaceURI(), xmlType.getLocalPart());
         String xopInclude = "<xop:Include xmlns:xop='http://www.w3.org/2004/08/xop/include' href='" + cid + "'/>";
         xmlFragment = wrapValueStr(xmlName, xopInclude, nsRegistry, null, attributes, false);
      }
      else
View Full Code Here

Examples of org.jboss.xb.binding.sunday.xop.XOPObject

      byte[] data = SimpleTypeBindings.unmarshalBase64(base64);

      MimeUtils.ByteArrayConverter converter = MimeUtils.getConverterForContentType(contentType);
      Object converted = converter.readFrom(new ByteArrayInputStream(data));

      XOPObject xopObject = new XOPObject(converted);
      xopObject.setContentType(contentType);

      XOPMarshaller xopMarshaller = new XOPMarshallerImpl();
      String cid = xopMarshaller.addMtomAttachment(xopObject, xopElement.getNamespaceURI(), xopElement.getLocalName());

      // remove base64 node with the xop:Include element
View Full Code Here

Examples of org.jboss.xb.binding.sunday.xop.XOPObject

         if(xopMarshaller.isXOPPackage())
         {
            // XOPMarshaller callback will create the attachment part
            Object o = stack.peek();
            String cid = xopMarshaller.addMtomAttachment(new XOPObject(o), elementNs, elementLocal);

            // Create the xopInclude element from CID and exit
            AttributesImpl attrs = null;
            String prefix = getPrefix(elementNs);
            boolean genPrefix = prefix == null && elementNs != null && elementNs.length() > 0;
View Full Code Here

Examples of org.jboss.xb.binding.sunday.xop.XOPObject

         if(xopMarshaller.isXOPPackage())
         {
            // XOPMarshaller callback will create the attachment part
            Object o = stack.peek();
            String cid = xopMarshaller.addMtomAttachment(new XOPObject(o), elementNs, elementLocal);

            // Create the xopInclude element from CID and exit
            AttributesImpl attrs = null;
            String prefix = getPrefix(elementNs);
            boolean genPrefix = prefix == null && elementNs != null && elementNs.length() > 0;
View Full Code Here

Examples of org.jboss.xb.binding.sunday.xop.XOPObject

         if(xopMarshaller.isXOPPackage())
         {
            // XOPMarshaller callback will create the attachment part
            Object o = stack.peek();
            String cid = xopMarshaller.addMtomAttachment(new XOPObject(o), elementNs, elementLocal);

            // Create the xopInclude element from CID and exit
            AttributesImpl attrs = null;
            String prefix = getPrefix(elementNs);
            boolean genPrefix = prefix == null && elementNs != null && elementNs.length() > 0;
View Full Code Here

Examples of org.jboss.xb.binding.sunday.xop.XOPObject

      byte[] data = SimpleTypeBindings.unmarshalBase64(base64);

      MimeUtils.ByteArrayConverter converter = MimeUtils.getConverterForContentType(contentType);
      Object converted = converter.readFrom(new ByteArrayInputStream(data));

      XOPObject xopObject = new XOPObject(converted);
      xopObject.setContentType(contentType);

      XOPMarshaller xopMarshaller = new XOPMarshallerImpl();
      String cid = xopMarshaller.addMtomAttachment(xopObject, xopElement.getNamespaceURI(), xopElement.getLocalName());

      // remove base64 node with the xop:Include element
View Full Code Here

Examples of org.jboss.xb.binding.sunday.xop.XOPObject

         AttachmentPart part = XOPContext.getAttachmentByCID(cid);
         DataHandler dataHandler = part.getDataHandler();
         String contentType = dataHandler.getContentType();

         // Wrapping the DataHandler shields XB from the JAF dependency
         XOPObject xopObject = new XOPObject(dataHandler);
         xopObject.setContentType(contentType);

         return xopObject;
      }
      catch(SOAPException e)
      {
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.