You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicemix.apache.org by ff...@apache.org on 2008/05/06 15:40:56 UTC

svn commit: r653774 - /servicemix/smx3/branches/servicemix-3.2/deployables/bindingcomponents/servicemix-cxf-bc/src/main/java/org/apache/servicemix/cxfbc/CxfBcConsumer.java

Author: ffang
Date: Tue May  6 06:40:56 2008
New Revision: 653774

URL: http://svn.apache.org/viewvc?rev=653774&view=rev
Log:
[SM-1338]cxf bc consumer should use NormalizedMessage but not NormalizedMessageImpl

Modified:
    servicemix/smx3/branches/servicemix-3.2/deployables/bindingcomponents/servicemix-cxf-bc/src/main/java/org/apache/servicemix/cxfbc/CxfBcConsumer.java

Modified: servicemix/smx3/branches/servicemix-3.2/deployables/bindingcomponents/servicemix-cxf-bc/src/main/java/org/apache/servicemix/cxfbc/CxfBcConsumer.java
URL: http://svn.apache.org/viewvc/servicemix/smx3/branches/servicemix-3.2/deployables/bindingcomponents/servicemix-cxf-bc/src/main/java/org/apache/servicemix/cxfbc/CxfBcConsumer.java?rev=653774&r1=653773&r2=653774&view=diff
==============================================================================
--- servicemix/smx3/branches/servicemix-3.2/deployables/bindingcomponents/servicemix-cxf-bc/src/main/java/org/apache/servicemix/cxfbc/CxfBcConsumer.java (original)
+++ servicemix/smx3/branches/servicemix-3.2/deployables/bindingcomponents/servicemix-cxf-bc/src/main/java/org/apache/servicemix/cxfbc/CxfBcConsumer.java Tue May  6 06:40:56 2008
@@ -21,6 +21,7 @@
 import java.util.List;
 import java.util.Map;
 import java.util.ResourceBundle;
+import java.util.Set;
 import java.util.concurrent.ConcurrentHashMap;
 import java.util.concurrent.CopyOnWriteArrayList;
 
@@ -29,6 +30,7 @@
 import javax.jbi.management.DeploymentException;
 import javax.jbi.messaging.ExchangeStatus;
 import javax.jbi.messaging.MessageExchange;
+import javax.jbi.messaging.NormalizedMessage;
 import javax.wsdl.WSDLException;
 import javax.wsdl.factory.WSDLFactory;
 import javax.wsdl.xml.WSDLReader;
@@ -89,7 +91,6 @@
 import org.apache.servicemix.cxfbc.interceptors.JbiOutWsdl1Interceptor;
 import org.apache.servicemix.cxfbc.interceptors.MtomCheckInterceptor;
 import org.apache.servicemix.jbi.jaxp.SourceTransformer;
-import org.apache.servicemix.jbi.messaging.NormalizedMessageImpl;
 import org.apache.servicemix.soap.util.DomUtil;
 import org.springframework.core.io.Resource;
 
@@ -527,7 +528,8 @@
                         outMessage = endpoint.getBinding().createMessage();
                         ex.setOutMessage(outMessage);
                     }
-                    NormalizedMessageImpl norMessage = (NormalizedMessageImpl) exchange
+                    
+                    NormalizedMessage norMessage = (NormalizedMessage) exchange
                             .getMessage("out");
 
                     if (outMessage instanceof SoapMessage) {
@@ -540,9 +542,11 @@
                     List<Attachment> attachmentList = new ArrayList<Attachment>();
                     outMessage.setContent(Source.class, exchange.getMessage(
                             "out").getContent());
-                    Iterator<String> iter = norMessage.listAttachments();
+                    Set attachmentNames = norMessage.getAttachmentNames();
+                    
+                    Iterator iter = attachmentNames.iterator();
                     while (iter.hasNext()) {
-                        String id = iter.next();
+                        String id = (String)iter.next();
                         DataHandler dh = norMessage.getAttachment(id);
                         attachmentList.add(new AttachmentImpl(id, dh));
                     }