[jboss-svn-commits] JBossWS SVN: r874 - trunk/src/main/java/org/jboss/ws/binding

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Thu Aug 31 11:31:24 EDT 2006


Author: heiko.braun at jboss.com
Date: 2006-08-31 11:31:21 -0400 (Thu, 31 Aug 2006)
New Revision: 874

Removed:
   trunk/src/main/java/org/jboss/ws/binding/AttachmentMarshallerImpl.java
   trunk/src/main/java/org/jboss/ws/binding/AttachmentMarshallerSupport.java
   trunk/src/main/java/org/jboss/ws/binding/AttachmentUnmarshallerImpl.java
Log:
deprectated

Deleted: trunk/src/main/java/org/jboss/ws/binding/AttachmentMarshallerImpl.java
===================================================================
--- trunk/src/main/java/org/jboss/ws/binding/AttachmentMarshallerImpl.java	2006-08-31 15:27:00 UTC (rev 873)
+++ trunk/src/main/java/org/jboss/ws/binding/AttachmentMarshallerImpl.java	2006-08-31 15:31:21 UTC (rev 874)
@@ -1,105 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.ws.binding;
-
-// $Id: $
-
-import javax.activation.DataHandler;
-import javax.xml.bind.attachment.AttachmentMarshaller;
-import javax.xml.namespace.QName;
-import javax.xml.soap.AttachmentPart;
-
-import org.jboss.logging.Logger;
-import org.jboss.util.NotImplementedException;
-import org.jboss.ws.Constants;
-import org.jboss.ws.jaxrpc.handler.SOAPMessageContextJAXRPC;
-import org.jboss.ws.soap.MessageContextAssociation;
-import org.jboss.ws.soap.SOAPMessageImpl;
-import org.jboss.ws.soap.attachment.MimeConstants;
-import org.jboss.xb.binding.NamespaceRegistry;
-
-/**
- * The AttachmentMarshaller allows callbacks from the binding layer towards the
- * soap processing components in order to optimize binary processing.
- *
- * @see AttachmentUnmarshallerImpl
- * @see org.jboss.ws.jbossxb.JBossXBSerializer
- * @see org.jboss.ws.jaxrpc.encoding.SimpleSerializer
- *
- * @author Heiko Braun <heiko.braun at jboss.com>
- * @since May 9, 2006
- */
-public class AttachmentMarshallerImpl extends AttachmentMarshaller
-{
-   private static final Logger log = Logger.getLogger(AttachmentMarshallerImpl.class);
-
-   public AttachmentMarshallerImpl()
-   {
-   }
-
-   public boolean isXOPPackage()
-   {
-      return AttachmentMarshallerSupport.isXOPPackage();
-   }
-
-   public String addMtomAttachment(DataHandler dataHandler, String elementNamespace, String elementName)
-   {
-
-      QName xmlName = new QName(elementNamespace, elementName);
-      log.debug("serialize: [xmlName=" + xmlName + "]");
-
-      SOAPMessageContextJAXRPC msgContext = (SOAPMessageContextJAXRPC)MessageContextAssociation.peekMessageContext();
-      SOAPMessageImpl soapMessage = (SOAPMessageImpl)msgContext.getMessage();
-      SerializationContext serContext = msgContext.getSerializationContext();
-      NamespaceRegistry nsRegistry = serContext.getNamespaceRegistry();
-
-      // Add the xop:Include element
-      StringBuilder xopInclude = new StringBuilder("<" + Constants.PREFIX_XOP + ":Include ");
-      xopInclude.append("xmlns:" + Constants.PREFIX_XOP + "='" + Constants.NS_XOP + "' ");
-      String cid = soapMessage.getCidGenerator().generateFromName(xmlName.getLocalPart());
-
-      // RFC2392 requires the 'cid:' prefix to be added to the XML element
-      xopInclude.append("href='cid:" + cid + "'/>");
-
-      AttachmentPart xopPart = soapMessage.createAttachmentPart(dataHandler);
-      xopPart.addMimeHeader(MimeConstants.CONTENT_ID, '<' + cid + '>'); // RFC2392 requirement
-      soapMessage.addAttachmentPart(xopPart);
-
-      return xopInclude.toString();
-
-   }
-
-   public String addMtomAttachment(byte[] data, String elementNamespace, String elementName)
-   {
-      throw new NotImplementedException();
-   }
-
-   public String addSwaRefAttachment(DataHandler dataHandler)
-   {
-      throw new NotImplementedException();
-   }
-
-   public String addMtomAttachment(byte[] arg0, int arg1, int arg2, String arg3, String arg4, String arg5)
-   {
-      throw new NotImplementedException();
-   }
-}

Deleted: trunk/src/main/java/org/jboss/ws/binding/AttachmentMarshallerSupport.java
===================================================================
--- trunk/src/main/java/org/jboss/ws/binding/AttachmentMarshallerSupport.java	2006-08-31 15:27:00 UTC (rev 873)
+++ trunk/src/main/java/org/jboss/ws/binding/AttachmentMarshallerSupport.java	2006-08-31 15:31:21 UTC (rev 874)
@@ -1,43 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2005, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-*/
-package org.jboss.ws.binding;
-
-import org.jboss.ws.common.SOAPMessageContextBase;
-import org.jboss.ws.soap.MessageContextAssociation;
-import org.jboss.ws.soap.SOAPMessageImpl;
-
-/**
- * @author Heiko Braun <heiko.braun at jboss.com>
- * @since May 10, 2006
- */
-public class AttachmentMarshallerSupport {
-
-   public static boolean isXOPPackage() {
-      boolean isXOP = false;
-      SOAPMessageContextBase msgContext = MessageContextAssociation.peekMessageContext();
-      if(msgContext!=null) {
-         SOAPMessageImpl soapMessage = (SOAPMessageImpl)msgContext.getMessage();
-         isXOP = (soapMessage != null && soapMessage.isXOPMessage());
-      }
-      return isXOP;
-   }
-}

Deleted: trunk/src/main/java/org/jboss/ws/binding/AttachmentUnmarshallerImpl.java
===================================================================
--- trunk/src/main/java/org/jboss/ws/binding/AttachmentUnmarshallerImpl.java	2006-08-31 15:27:00 UTC (rev 873)
+++ trunk/src/main/java/org/jboss/ws/binding/AttachmentUnmarshallerImpl.java	2006-08-31 15:31:21 UTC (rev 874)
@@ -1,95 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.ws.binding;
-
-// $Id: $
-
-import javax.activation.DataHandler;
-import javax.xml.bind.attachment.AttachmentUnmarshaller;
-import javax.xml.soap.AttachmentPart;
-import javax.xml.soap.SOAPException;
-
-import org.jboss.logging.Logger;
-import org.jboss.util.NotImplementedException;
-import org.jboss.ws.WSException;
-import org.jboss.ws.common.SOAPMessageContextBase;
-import org.jboss.ws.soap.MessageContextAssociation;
-import org.jboss.ws.soap.SOAPMessageImpl;
-
-/**
- * The AttachmentUnmarshaller allows callbacks from the binding layer towards the
- * soap processing components in order to optimize binary processing.
- *
- * @see AttachmentMarshallerImpl
- * @see org.jboss.ws.jbossxb.JBossXBDeserializer
- * @see org.jboss.ws.jaxrpc.encoding.SimpleDeserializer
- *
- * @author Heiko Braun <heiko.braun at jboss.com>
- * @since May 9, 2006
- */
-public class AttachmentUnmarshallerImpl extends AttachmentUnmarshaller
-{
-
-   private static final Logger log = Logger.getLogger(AttachmentUnmarshallerImpl.class);
-
-   public AttachmentUnmarshallerImpl()
-   {
-   }
-
-   public boolean isXOPPackage()
-   {
-      return AttachmentMarshallerSupport.isXOPPackage();
-   }
-
-   public DataHandler getAttachmentAsDataHandler(String cid)
-   {
-
-      try
-      {
-         SOAPMessageContextBase msgContext = MessageContextAssociation.peekMessageContext();
-         SOAPMessageImpl soapMessage = (SOAPMessageImpl)msgContext.getMessage();
-
-         // RFC2392 requires the 'cid:' part to be stripped from the cid
-         if (cid.startsWith("cid:"))
-            cid = cid.substring(4);
-         
-         cid = '<' + cid + '>'; // RFC2392 requirement
-
-         AttachmentPart part = soapMessage.getAttachmentByContentId(cid);
-         if (part == null)
-            throw new WSException("Cannot find attachment part for: " + cid);
-
-         DataHandler dataHandler = part.getDataHandler();
-         return dataHandler;
-      }
-      catch (SOAPException ex)
-      {
-         throw new WSException(ex);
-      }
-
-   }
-
-   public byte[] getAttachmentAsByteArray(String cid)
-   {
-      throw new NotImplementedException();
-   }
-}




More information about the jboss-svn-commits mailing list