[jboss-svn-commits] JBL Code SVN: r38126 - labs/jbossesb/branches/JBESB_4_11_CP/product/rosetta/src/org/jboss/internal/soa/esb/webservice.
jboss-svn-commits at lists.jboss.org
jboss-svn-commits at lists.jboss.org
Tue Jun 19 17:21:13 EDT 2012
Author: tcunning
Date: 2012-06-19 17:21:12 -0400 (Tue, 19 Jun 2012)
New Revision: 38126
Modified:
labs/jbossesb/branches/JBESB_4_11_CP/product/rosetta/src/org/jboss/internal/soa/esb/webservice/BaseWebService.java
Log:
JBESB-3813
Add attachments to message from SOAP message.
Modified: labs/jbossesb/branches/JBESB_4_11_CP/product/rosetta/src/org/jboss/internal/soa/esb/webservice/BaseWebService.java
===================================================================
--- labs/jbossesb/branches/JBESB_4_11_CP/product/rosetta/src/org/jboss/internal/soa/esb/webservice/BaseWebService.java 2012-06-18 06:10:45 UTC (rev 38125)
+++ labs/jbossesb/branches/JBESB_4_11_CP/product/rosetta/src/org/jboss/internal/soa/esb/webservice/BaseWebService.java 2012-06-19 21:21:12 UTC (rev 38126)
@@ -32,6 +32,7 @@
import javax.xml.namespace.QName;
import javax.xml.parsers.ParserConfigurationException;
+import javax.xml.soap.AttachmentPart;
import javax.xml.soap.Detail;
import javax.xml.soap.Node;
import javax.xml.soap.SOAPBody;
@@ -167,6 +168,17 @@
}
}
+ // Copy the attachments
+ Iterator it = request.getAttachments();
+ while (it.hasNext()) {
+ AttachmentPart ap = (AttachmentPart) it.next();
+ if (ap.getContentId() != null) {
+ esbReq.getAttachment().put(ap.getContentId(), ap.getContent());
+ } else {
+ esbReq.getAttachment().addItem(ap.getContent());
+ }
+ }
+
if (!found)
{
throw new SOAPException("Could not find SOAPElement in SOAPBody") ;
More information about the jboss-svn-commits
mailing list