Author: heiko.braun(a)jboss.com
Date: 2007-05-24 07:06:17 -0400 (Thu, 24 May 2007)
New Revision: 3222
Modified:
branches/jbossws-2.0/jbossws-core/src/java/org/jboss/ws/extensions/xop/jaxws/AttachmentMarshallerImpl.java
branches/jbossws-2.0/jbossws-core/src/java/org/jboss/ws/extensions/xop/jaxws/AttachmentUnmarshallerImpl.java
Log:
Update documentation
Modified:
branches/jbossws-2.0/jbossws-core/src/java/org/jboss/ws/extensions/xop/jaxws/AttachmentMarshallerImpl.java
===================================================================
---
branches/jbossws-2.0/jbossws-core/src/java/org/jboss/ws/extensions/xop/jaxws/AttachmentMarshallerImpl.java 2007-05-24
10:26:46 UTC (rev 3221)
+++
branches/jbossws-2.0/jbossws-core/src/java/org/jboss/ws/extensions/xop/jaxws/AttachmentMarshallerImpl.java 2007-05-24
11:06:17 UTC (rev 3222)
@@ -1,3 +1,24 @@
+/*
+ * 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.extensions.xop.jaxws;
import javax.activation.DataHandler;
@@ -13,6 +34,21 @@
import org.jboss.ws.core.soap.attachment.MimeConstants;
import org.jboss.ws.extensions.xop.XOPContext;
+/**
+ * Enable JAXB marshalling to optimize storage of binary data.<br>
+ * This API enables an efficient cooperative creation of optimized binary data formats
between a JAXB marshalling process
+ * and a MIME-based package processor. A JAXB implementation marshals the root body of a
MIME-based package,
+ * delegating the creation of referenceable MIME parts to the MIME-based package
processor
+ * that implements this abstraction.<p>
+ * XOP processing is enabled when <code>isXOPPackage()</code> is true.
+ * See <code>addMtomAttachment(DataHandler, String, String)</code> for
details.
+ * <p>
+ * WS-I Attachment Profile 1.0 is supported by
<code>addSwaRefAttachment(DataHandler)</code>
+ * being called by the marshaller for each JAXB property related to
{http://ws-i.org/profiles/basic/1.1/xsd}swaRef.
+ *
+ * @author <a href="heiko.braun(a)jboss.com">Heiko Braun</a>
+ * @version $Revision: 3220 $
+ */
public class AttachmentMarshallerImpl extends AttachmentMarshaller
{
// provide logging
Modified:
branches/jbossws-2.0/jbossws-core/src/java/org/jboss/ws/extensions/xop/jaxws/AttachmentUnmarshallerImpl.java
===================================================================
---
branches/jbossws-2.0/jbossws-core/src/java/org/jboss/ws/extensions/xop/jaxws/AttachmentUnmarshallerImpl.java 2007-05-24
10:26:46 UTC (rev 3221)
+++
branches/jbossws-2.0/jbossws-core/src/java/org/jboss/ws/extensions/xop/jaxws/AttachmentUnmarshallerImpl.java 2007-05-24
11:06:17 UTC (rev 3222)
@@ -1,20 +1,62 @@
+/*
+ * 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.extensions.xop.jaxws;
-import java.io.ByteArrayOutputStream;
-import java.io.IOException;
+import org.jboss.ws.WSException;
+import org.jboss.ws.core.soap.attachment.ContentHandlerRegistry;
+import org.jboss.ws.extensions.xop.XOPContext;
import javax.activation.DataHandler;
import javax.xml.bind.attachment.AttachmentUnmarshaller;
import javax.xml.soap.AttachmentPart;
import javax.xml.soap.SOAPException;
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
-import org.jboss.ws.WSException;
-import org.jboss.ws.core.soap.attachment.ContentHandlerRegistry;
-import org.jboss.ws.core.soap.MessageContextAssociation;
-import org.jboss.ws.core.soap.SOAPMessageImpl;
-import org.jboss.ws.core.CommonMessageContext;
-import org.jboss.ws.extensions.xop.XOPContext;
-
+/**
+ * <p>Enables JAXB unmarshalling of a root document containing optimized binary
data formats.</p>
+ *
+ * <p>This API enables an efficient cooperative processing of optimized
+ * binary data formats between a JAXB 2.0 implementation and MIME-based package
+ * processor (MTOM/XOP and WS-I AP 1.0). JAXB unmarshals the body of a package,
delegating the
+ * understanding of the packaging format being used to a MIME-based
+ * package processor that implements this abstract class.</p>
+ *
+ * <p>This abstract class identifies if a package requires XOP processing, <a
href="../../../../javax/xml/bind/attachment/AttachmentUnmarshaller.html#isXOPPackage%28%29"><code>isXOPPackage()</code></a>
and provides retrieval of binary content stored as attachments by content-id.</p>
+ *
+ * <h2>Identifying the content-id, cid, to pass to
<code>getAttachment*(String cid)</code></h2>
+ * <ul>
+ * <li>
+ * For XOP processing, the infoset representation of the cid is described in step 2a in
+ * <a
href="http://www.w3.org/TR/2005/REC-xop10-20050125/#interpreting_xop...
3.2 Interpreting XOP Packages</a>
+ * </li>
+ *
+ * <li>
+ * For WS-I AP 1.0, the cid is identified as an element or attribute of type
<code>ref:swaRef </code> specified in
+ * <a
href="http://www.ws-i.org/Profiles/AttachmentsProfile-1.0-2004-08-24...
4.4 Referencing Attachments from the SOAP Envelope</a>
+ * </li>
+ * </ul>
+ * <p>
+ */
public class AttachmentUnmarshallerImpl extends AttachmentUnmarshaller
{