You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-commits@axis.apache.org by ve...@apache.org on 2015/08/02 13:31:50 UTC
svn commit: r1693807 - in /axis/axis2/java/core/branches/1_6: ./
modules/addressing/test/org/apache/axis2/handlers/addressing/
modules/clustering/test/org/apache/axis2/clustering/
modules/integration/test/org/apache/axis2/engine/ modules/jaxws-integrat...
Author: veithen
Date: Sun Aug 2 11:31:49 2015
New Revision: 1693807
URL: http://svn.apache.org/r1693807
Log:
Merge r1328733 and r1328921 to the 1.6 branch to improve Axiom compatibility.
Modified:
axis/axis2/java/core/branches/1_6/ (props changed)
axis/axis2/java/core/branches/1_6/modules/addressing/test/org/apache/axis2/handlers/addressing/AddressingOutHandlerTest.java
axis/axis2/java/core/branches/1_6/modules/clustering/test/org/apache/axis2/clustering/ContextReplicationTest.java
axis/axis2/java/core/branches/1_6/modules/integration/test/org/apache/axis2/engine/MessageContextSaveATest.java
axis/axis2/java/core/branches/1_6/modules/integration/test/org/apache/axis2/engine/MessageContextSaveBTest.java
axis/axis2/java/core/branches/1_6/modules/integration/test/org/apache/axis2/engine/MessageContextSaveCTest.java
axis/axis2/java/core/branches/1_6/modules/integration/test/org/apache/axis2/engine/MessageContextSelfManagedDataTest.java
axis/axis2/java/core/branches/1_6/modules/integration/test/org/apache/axis2/engine/OperationContextSaveTest.java
axis/axis2/java/core/branches/1_6/modules/jaxws/ (props changed)
axis/axis2/java/core/branches/1_6/modules/jaxws-integration/test/org/apache/axis2/jaxws/xmlhttp/clientTests/dispatch/datasource/DispatchXMessageDataSourceTests.java
axis/axis2/java/core/branches/1_6/modules/jaxws/src/org/apache/axis2/jaxws/marshaller/impl/alt/Attachment.java
axis/axis2/java/core/branches/1_6/modules/jaxws/src/org/apache/axis2/jaxws/utility/DataSourceFormatter.java
axis/axis2/java/core/branches/1_6/modules/kernel/src/org/apache/axis2/util/WrappedDataHandler.java
axis/axis2/java/core/branches/1_6/modules/kernel/test/org/apache/axis2/util/MessageContextBuilderTest.java
axis/axis2/java/core/branches/1_6/modules/mex/src/org/apache/axis2/mex/util/MexUtil.java
Propchange: axis/axis2/java/core/branches/1_6/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sun Aug 2 11:31:49 2015
@@ -1 +1 @@
-/axis/axis2/java/core/trunk:1068985,1069659,1069898,1070439,1072077,1072271,1072296,1072499,1072510,1075057,1078242,1081563,1081587,1081590,1082316,1082322,1082600,1082702,1082726,1082738,1083180,1083192,1083379,1083381,1083425,1083433,1083446,1084753,1085157,1085173,1085514,1085889,1085927,1085931,1087073,1088239,1088248-1088249,1088251,1088268,1088730,1088904,1089225,1089989,1090429,1090457,1091178,1091191,1094117,1096134,1096136,1096530,1096557,1099385,1099389,1100628,1101037,1103013,1103336,1103606,1103760,1127327,1128580,1128584,1128618,1128645,1130590,1131425,1134438,1134616,1136156,1136159,1136177,1137153,1137159,1138144,1138203,1139448,1139484,1147485,1149224,1149491,1149578,1150055,1153072,1154615,1156305,1156382,1157211,1157265,1157373,1157415,1157424,1157501,1157517,1157522,1157535,1157767,1162649,1163389,1166038,1166040,1166132,1167045,1173869,1174618,1184808,1184810,1184816,1185504,1190469,1190499,1195893,1195972,1195982,1198288,1201467,1201863,1201957,1202867,1203424,1
205716,1205939,1208901,1209034,1213180,1213639,1214118,1220630,1220888,1221716,1222510,1225161,1231465,1231470,1241031,1242238,1242249,1242511,1243469,1243831,1290999,1291158,1294991,1295084,1295479,1296159,1297132,1297344,1297348,1297744,1297765,1298550,1298688,1299356,1299392,1299645,1299667,1300358,1305728,1307410,1326968,1327005,1328228,1329084,1331616,1332362,1332402,1332545,1332587,1337975,1340970,1341090,1341780,1341805,1343353,1343543,1348340,1351218,1352413,1352423,1354438,1354834,1355706,1355710,1356080,1358413,1358494,1358508,1358691,1359499,1359504,1360573,1362377,1364536,1372622,1382245,1383043,1384482,1409145,1409389,1410313,1410499,1410577,1426464,1426467,1426469,1438985,1441907,1442712,1443222,1479068,1479351,1480969,1576937,1577055,1577119,1577125,1577191,1577342-1577345,1577347-1577348,1593690,1593765,1594378,1594701,1601455,1608843,1621171-1621172,1631608,1649688,1677432,1686321,1686538,1686544,1686553,1686630,1686643,1686742,1687894-1687895,1687902,1687961,169314
7
+/axis/axis2/java/core/trunk:1068985,1069659,1069898,1070439,1072077,1072271,1072296,1072499,1072510,1075057,1078242,1081563,1081587,1081590,1082316,1082322,1082600,1082702,1082726,1082738,1083180,1083192,1083379,1083381,1083425,1083433,1083446,1084753,1085157,1085173,1085514,1085889,1085927,1085931,1087073,1088239,1088248-1088249,1088251,1088268,1088730,1088904,1089225,1089989,1090429,1090457,1091178,1091191,1094117,1096134,1096136,1096530,1096557,1099385,1099389,1100628,1101037,1103013,1103336,1103606,1103760,1127327,1128580,1128584,1128618,1128645,1130590,1131425,1134438,1134616,1136156,1136159,1136177,1137153,1137159,1138144,1138203,1139448,1139484,1147485,1149224,1149491,1149578,1150055,1153072,1154615,1156305,1156382,1157211,1157265,1157373,1157415,1157424,1157501,1157517,1157522,1157535,1157767,1162649,1163389,1166038,1166040,1166132,1167045,1173869,1174618,1184808,1184810,1184816,1185504,1190469,1190499,1195893,1195972,1195982,1198288,1201467,1201863,1201957,1202867,1203424,1
205716,1205939,1208901,1209034,1213180,1213639,1214118,1220630,1220888,1221716,1222510,1225161,1231465,1231470,1241031,1242238,1242249,1242511,1243469,1243831,1290999,1291158,1294991,1295084,1295479,1296159,1297132,1297344,1297348,1297744,1297765,1298550,1298688,1299356,1299392,1299645,1299667,1300358,1305728,1307410,1326968,1327005,1328228,1328733,1328921,1329084,1331616,1332362,1332402,1332545,1332587,1337975,1340970,1341090,1341780,1341805,1343353,1343543,1348340,1351218,1352413,1352423,1354438,1354834,1355706,1355710,1356080,1358413,1358494,1358508,1358691,1359499,1359504,1360573,1362377,1364536,1372622,1382245,1383043,1384482,1409145,1409389,1410313,1410499,1410577,1426464,1426467,1426469,1438985,1441907,1442712,1443222,1479068,1479351,1480969,1576937,1577055,1577119,1577125,1577191,1577342-1577345,1577347-1577348,1593690,1593765,1594378,1594701,1601455,1608843,1621171-1621172,1631608,1649688,1677432,1686321,1686538,1686544,1686553,1686630,1686643,1686742,1687894-1687895,168790
2,1687961,1693147
Modified: axis/axis2/java/core/branches/1_6/modules/addressing/test/org/apache/axis2/handlers/addressing/AddressingOutHandlerTest.java
URL: http://svn.apache.org/viewvc/axis/axis2/java/core/branches/1_6/modules/addressing/test/org/apache/axis2/handlers/addressing/AddressingOutHandlerTest.java?rev=1693807&r1=1693806&r2=1693807&view=diff
==============================================================================
--- axis/axis2/java/core/branches/1_6/modules/addressing/test/org/apache/axis2/handlers/addressing/AddressingOutHandlerTest.java (original)
+++ axis/axis2/java/core/branches/1_6/modules/addressing/test/org/apache/axis2/handlers/addressing/AddressingOutHandlerTest.java Sun Aug 2 11:31:49 2015
@@ -23,7 +23,6 @@ import org.apache.axiom.om.OMAbstractFac
import org.apache.axiom.om.OMAttribute;
import org.apache.axiom.om.OMNamespace;
import org.apache.axiom.om.OMXMLParserWrapper;
-import org.apache.axiom.om.impl.OMNamespaceImpl;
import org.apache.axiom.soap.SOAPEnvelope;
import org.apache.axiom.soap.SOAPFactory;
import org.apache.axiom.soap.SOAPHeaderBlock;
@@ -407,9 +406,10 @@ public class AddressingOutHandlerTest ex
// Need to add a SOAP Header to stop this error from XMLComparator:
// "There is no Header element under Envelope"
- SOAPEnvelope envelope = OMAbstractFactory.getSOAP11Factory().getDefaultEnvelope();
+ SOAPFactory factory = OMAbstractFactory.getSOAP11Factory();
+ SOAPEnvelope envelope = factory.getDefaultEnvelope();
SOAPHeaderBlock soapHeaderBlock = envelope.getHeader().addHeaderBlock(
- "testHeader", new OMNamespaceImpl("http://test.com", "test"));
+ "testHeader", factory.createOMNamespace("http://test.com", "test"));
msgCtxt.setEnvelope(envelope);
outHandler.invoke(msgCtxt);
@@ -516,9 +516,10 @@ public class AddressingOutHandlerTest ex
// Need to add a SOAP Header to stop this error from XMLComparator:
// "There is no Header element under Envelope"
- SOAPEnvelope envelope = OMAbstractFactory.getSOAP11Factory().getDefaultEnvelope();
+ SOAPFactory factory = OMAbstractFactory.getSOAP11Factory();
+ SOAPEnvelope envelope = factory.getDefaultEnvelope();
SOAPHeaderBlock soapHeaderBlock = envelope.getHeader().addHeaderBlock(
- "testHeader", new OMNamespaceImpl("http://test.com", "test"));
+ "testHeader", factory.createOMNamespace("http://test.com", "test"));
msgCtxt.setEnvelope(envelope);
outHandler.invoke(msgCtxt);
Modified: axis/axis2/java/core/branches/1_6/modules/clustering/test/org/apache/axis2/clustering/ContextReplicationTest.java
URL: http://svn.apache.org/viewvc/axis/axis2/java/core/branches/1_6/modules/clustering/test/org/apache/axis2/clustering/ContextReplicationTest.java?rev=1693807&r1=1693806&r2=1693807&view=diff
==============================================================================
--- axis/axis2/java/core/branches/1_6/modules/clustering/test/org/apache/axis2/clustering/ContextReplicationTest.java (original)
+++ axis/axis2/java/core/branches/1_6/modules/clustering/test/org/apache/axis2/clustering/ContextReplicationTest.java Sun Aug 2 11:31:49 2015
@@ -20,7 +20,8 @@
package org.apache.axis2.clustering;
import junit.framework.TestCase;
-import org.apache.axiom.om.util.UUIDGenerator;
+
+import org.apache.axiom.util.UIDGenerator;
import org.apache.axis2.AxisFault;
import org.apache.axis2.clustering.management.DefaultNodeManager;
import org.apache.axis2.clustering.management.NodeManager;
@@ -56,7 +57,7 @@ public class ContextReplicationTest exte
private static final Parameter domainParam =
new Parameter(ClusteringConstants.Parameters.DOMAIN,
- "axis2.domain." + UUIDGenerator.getUUID());
+ "axis2.domain." + UIDGenerator.generateUID());
// --------------- Cluster-1 ------------------------------------------------------
private ClusteringAgent clusterManager1;
@@ -361,7 +362,7 @@ public class ContextReplicationTest exte
return;
}
- String sgcID = UUIDGenerator.getUUID();
+ String sgcID = UIDGenerator.generateUID();
ServiceGroupContext serviceGroupContext1 =
configurationContext1.createServiceGroupContext(serviceGroup1);
@@ -389,7 +390,7 @@ public class ContextReplicationTest exte
}
// Add the property
- String sgcID = UUIDGenerator.getUUID();
+ String sgcID = UIDGenerator.generateUID();
ServiceGroupContext serviceGroupContext1 =
configurationContext1.createServiceGroupContext(serviceGroup1);
Modified: axis/axis2/java/core/branches/1_6/modules/integration/test/org/apache/axis2/engine/MessageContextSaveATest.java
URL: http://svn.apache.org/viewvc/axis/axis2/java/core/branches/1_6/modules/integration/test/org/apache/axis2/engine/MessageContextSaveATest.java?rev=1693807&r1=1693806&r2=1693807&view=diff
==============================================================================
--- axis/axis2/java/core/branches/1_6/modules/integration/test/org/apache/axis2/engine/MessageContextSaveATest.java (original)
+++ axis/axis2/java/core/branches/1_6/modules/integration/test/org/apache/axis2/engine/MessageContextSaveATest.java Sun Aug 2 11:31:49 2015
@@ -21,8 +21,8 @@ package org.apache.axis2.engine;
import junit.framework.TestCase;
import org.apache.axiom.om.OMAbstractFactory;
-import org.apache.axiom.om.util.UUIDGenerator;
import org.apache.axiom.soap.SOAPFactory;
+import org.apache.axiom.util.UIDGenerator;
import org.apache.axis2.AxisFault;
import org.apache.axis2.addressing.EndpointReference;
import org.apache.axis2.context.ConfigurationContext;
@@ -279,7 +279,7 @@ public class MessageContextSaveATest ext
mc.setSoapAction(operationName.getLocalPart());
// System.out.flush();
- mc.setMessageID(UUIDGenerator.getUUID());
+ mc.setMessageID(UIDGenerator.generateURNString());
//operationContext.addMessageContext(mc); gets done via the register
axisOperation.registerOperationContext(mc, operationContext);
Modified: axis/axis2/java/core/branches/1_6/modules/integration/test/org/apache/axis2/engine/MessageContextSaveBTest.java
URL: http://svn.apache.org/viewvc/axis/axis2/java/core/branches/1_6/modules/integration/test/org/apache/axis2/engine/MessageContextSaveBTest.java?rev=1693807&r1=1693806&r2=1693807&view=diff
==============================================================================
--- axis/axis2/java/core/branches/1_6/modules/integration/test/org/apache/axis2/engine/MessageContextSaveBTest.java (original)
+++ axis/axis2/java/core/branches/1_6/modules/integration/test/org/apache/axis2/engine/MessageContextSaveBTest.java Sun Aug 2 11:31:49 2015
@@ -21,8 +21,8 @@ package org.apache.axis2.engine;
import junit.framework.TestCase;
import org.apache.axiom.om.OMAbstractFactory;
-import org.apache.axiom.om.util.UUIDGenerator;
import org.apache.axiom.soap.SOAPFactory;
+import org.apache.axiom.util.UIDGenerator;
import org.apache.axis2.AxisFault;
import org.apache.axis2.addressing.EndpointReference;
import org.apache.axis2.context.ConfigurationContext;
@@ -529,7 +529,7 @@ public class MessageContextSaveBTest ext
mc.setSoapAction(action);
// System.out.flush();
- mc.setMessageID(UUIDGenerator.getUUID());
+ mc.setMessageID(UIDGenerator.generateURNString());
axisOperation.registerOperationContext(mc, oc);
mc.setOperationContext(oc);
Modified: axis/axis2/java/core/branches/1_6/modules/integration/test/org/apache/axis2/engine/MessageContextSaveCTest.java
URL: http://svn.apache.org/viewvc/axis/axis2/java/core/branches/1_6/modules/integration/test/org/apache/axis2/engine/MessageContextSaveCTest.java?rev=1693807&r1=1693806&r2=1693807&view=diff
==============================================================================
--- axis/axis2/java/core/branches/1_6/modules/integration/test/org/apache/axis2/engine/MessageContextSaveCTest.java (original)
+++ axis/axis2/java/core/branches/1_6/modules/integration/test/org/apache/axis2/engine/MessageContextSaveCTest.java Sun Aug 2 11:31:49 2015
@@ -21,8 +21,8 @@ package org.apache.axis2.engine;
import junit.framework.TestCase;
import org.apache.axiom.om.OMAbstractFactory;
-import org.apache.axiom.om.util.UUIDGenerator;
import org.apache.axiom.soap.SOAPFactory;
+import org.apache.axiom.util.UIDGenerator;
import org.apache.axis2.AxisFault;
import org.apache.axis2.addressing.EndpointReference;
import org.apache.axis2.context.ConfigurationContext;
@@ -523,7 +523,7 @@ public class MessageContextSaveCTest ext
mc.setSoapAction(action);
// System.out.flush();
- mc.setMessageID(UUIDGenerator.getUUID());
+ mc.setMessageID(UIDGenerator.generateURNString());
axisOperation.registerOperationContext(mc, oc);
mc.setOperationContext(oc);
Modified: axis/axis2/java/core/branches/1_6/modules/integration/test/org/apache/axis2/engine/MessageContextSelfManagedDataTest.java
URL: http://svn.apache.org/viewvc/axis/axis2/java/core/branches/1_6/modules/integration/test/org/apache/axis2/engine/MessageContextSelfManagedDataTest.java?rev=1693807&r1=1693806&r2=1693807&view=diff
==============================================================================
--- axis/axis2/java/core/branches/1_6/modules/integration/test/org/apache/axis2/engine/MessageContextSelfManagedDataTest.java (original)
+++ axis/axis2/java/core/branches/1_6/modules/integration/test/org/apache/axis2/engine/MessageContextSelfManagedDataTest.java Sun Aug 2 11:31:49 2015
@@ -21,8 +21,8 @@ package org.apache.axis2.engine;
import junit.framework.TestCase;
import org.apache.axiom.om.OMAbstractFactory;
-import org.apache.axiom.om.util.UUIDGenerator;
import org.apache.axiom.soap.SOAPFactory;
+import org.apache.axiom.util.UIDGenerator;
import org.apache.axis2.AxisFault;
import org.apache.axis2.addressing.EndpointReference;
import org.apache.axis2.context.ConfigurationContext;
@@ -315,7 +315,7 @@ public class MessageContextSelfManagedDa
axisOperation.getRemainingPhasesInFlow().add(phase3);
- mc.setMessageID(UUIDGenerator.getUUID());
+ mc.setMessageID(UIDGenerator.generateURNString());
//operationContext.addMessageContext(mc); gets done via the register
axisOperation.registerOperationContext(mc, operationContext);
Modified: axis/axis2/java/core/branches/1_6/modules/integration/test/org/apache/axis2/engine/OperationContextSaveTest.java
URL: http://svn.apache.org/viewvc/axis/axis2/java/core/branches/1_6/modules/integration/test/org/apache/axis2/engine/OperationContextSaveTest.java?rev=1693807&r1=1693806&r2=1693807&view=diff
==============================================================================
--- axis/axis2/java/core/branches/1_6/modules/integration/test/org/apache/axis2/engine/OperationContextSaveTest.java (original)
+++ axis/axis2/java/core/branches/1_6/modules/integration/test/org/apache/axis2/engine/OperationContextSaveTest.java Sun Aug 2 11:31:49 2015
@@ -21,8 +21,8 @@ package org.apache.axis2.engine;
import junit.framework.TestCase;
import org.apache.axiom.om.OMAbstractFactory;
-import org.apache.axiom.om.util.UUIDGenerator;
import org.apache.axiom.soap.SOAPFactory;
+import org.apache.axiom.util.UIDGenerator;
import org.apache.axis2.AxisFault;
import org.apache.axis2.addressing.EndpointReference;
import org.apache.axis2.context.ConfigurationContext;
@@ -209,7 +209,7 @@ public class OperationContextSaveTest ex
mc.setSoapAction(operationName.getLocalPart());
System.out.flush();
- mc.setMessageID(UUIDGenerator.getUUID());
+ mc.setMessageID(UIDGenerator.generateURNString());
//operationContext.addMessageContext(mc); gets done via the register
axisOperation.registerOperationContext(mc, operationContext);
Propchange: axis/axis2/java/core/branches/1_6/modules/jaxws/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sun Aug 2 11:31:49 2015
@@ -1 +1 @@
-/axis/axis2/java/core/trunk/modules/jaxws:1068985,1069659,1069898,1070439,1072077,1072271,1072296,1072499,1072510,1075057,1078242,1081563,1081587,1081590,1082316,1082322,1082600,1082702,1082726,1082738,1083180,1083192,1083379,1083381,1083425,1083433,1083446,1084753,1085157,1085173,1085514,1085889,1085927,1085931,1087073,1088239,1088248-1088249,1088251,1088268,1088730,1088904,1089225,1089989,1090429,1090457,1091178,1091191,1094117,1096134,1096136,1096530,1096557,1099385,1099389,1100628,1101037,1103013,1103336,1103606,1103760,1127327,1128580,1128584,1128618,1128645,1130590,1131425,1134438,1134616,1136156,1136159,1136177,1137153,1137159,1138144,1138203,1139448,1139484,1147485,1149224,1149491,1149578,1150055,1153072,1154615,1156305,1156382,1157211,1157265,1157373,1157415,1157424,1157501,1157517,1157522,1157535,1157767,1162649,1163389,1166038,1166040,1166132,1167045,1173869,1174618,1184808,1184810,1184816,1185504,1190469,1190499,1195893,1195972,1195982,1198288,1201467,1201863,1201957,120
2867,1203424,1205716,1205939,1208901,1209034,1213180,1213639,1214118,1220630,1220888,1221716,1222510,1225161,1231465,1231470,1241031,1242238,1242249,1242511,1243469,1243831,1290999,1291158,1294991,1295084,1295479,1296159,1297132,1297344,1297348,1297744,1297765,1298550,1298688,1299356,1299392,1299645,1299667,1300358,1305728,1307410,1326968,1327005,1328228,1329084,1331616,1332362,1332402,1332545,1332587,1337975,1340970,1341090,1341780,1341805,1343353,1343543,1348340,1351218,1352413,1352423,1354438,1354834,1355706,1355710,1356080,1358413,1358494,1358508,1358691,1359499,1359504,1360573,1362377,1364536,1372622,1382245,1383043,1384482,1409145,1409389,1410313,1410499,1410577,1426464,1426467,1426469,1438985,1441907,1442712,1479068,1479351,1480969,1576937,1577055,1577119,1577125,1577191,1577342-1577345,1577347-1577348,1593690,1593765,1594378,1594701,1601455-1601456,1608843,1649688
+/axis/axis2/java/core/trunk/modules/jaxws:1068985,1069659,1069898,1070439,1072077,1072271,1072296,1072499,1072510,1075057,1078242,1081563,1081587,1081590,1082316,1082322,1082600,1082702,1082726,1082738,1083180,1083192,1083379,1083381,1083425,1083433,1083446,1084753,1085157,1085173,1085514,1085889,1085927,1085931,1087073,1088239,1088248-1088249,1088251,1088268,1088730,1088904,1089225,1089989,1090429,1090457,1091178,1091191,1094117,1096134,1096136,1096530,1096557,1099385,1099389,1100628,1101037,1103013,1103336,1103606,1103760,1127327,1128580,1128584,1128618,1128645,1130590,1131425,1134438,1134616,1136156,1136159,1136177,1137153,1137159,1138144,1138203,1139448,1139484,1147485,1149224,1149491,1149578,1150055,1153072,1154615,1156305,1156382,1157211,1157265,1157373,1157415,1157424,1157501,1157517,1157522,1157535,1157767,1162649,1163389,1166038,1166040,1166132,1167045,1173869,1174618,1184808,1184810,1184816,1185504,1190469,1190499,1195893,1195972,1195982,1198288,1201467,1201863,1201957,120
2867,1203424,1205716,1205939,1208901,1209034,1213180,1213639,1214118,1220630,1220888,1221716,1222510,1225161,1231465,1231470,1241031,1242238,1242249,1242511,1243469,1243831,1290999,1291158,1294991,1295084,1295479,1296159,1297132,1297344,1297348,1297744,1297765,1298550,1298688,1299356,1299392,1299645,1299667,1300358,1305728,1307410,1326968,1327005,1328228,1328733,1328921,1329084,1331616,1332362,1332402,1332545,1332587,1337975,1340970,1341090,1341780,1341805,1343353,1343543,1348340,1351218,1352413,1352423,1354438,1354834,1355706,1355710,1356080,1358413,1358494,1358508,1358691,1359499,1359504,1360573,1362377,1364536,1372622,1382245,1383043,1384482,1409145,1409389,1410313,1410499,1410577,1426464,1426467,1426469,1438985,1441907,1442712,1479068,1479351,1480969,1576937,1577055,1577119,1577125,1577191,1577342-1577345,1577347-1577348,1593690,1593765,1594378,1594701,1601455-1601456,1608843,1649688
Modified: axis/axis2/java/core/branches/1_6/modules/jaxws-integration/test/org/apache/axis2/jaxws/xmlhttp/clientTests/dispatch/datasource/DispatchXMessageDataSourceTests.java
URL: http://svn.apache.org/viewvc/axis/axis2/java/core/branches/1_6/modules/jaxws-integration/test/org/apache/axis2/jaxws/xmlhttp/clientTests/dispatch/datasource/DispatchXMessageDataSourceTests.java?rev=1693807&r1=1693806&r2=1693807&view=diff
==============================================================================
--- axis/axis2/java/core/branches/1_6/modules/jaxws-integration/test/org/apache/axis2/jaxws/xmlhttp/clientTests/dispatch/datasource/DispatchXMessageDataSourceTests.java (original)
+++ axis/axis2/java/core/branches/1_6/modules/jaxws-integration/test/org/apache/axis2/jaxws/xmlhttp/clientTests/dispatch/datasource/DispatchXMessageDataSourceTests.java Sun Aug 2 11:31:49 2015
@@ -25,7 +25,7 @@ import org.apache.axis2.jaxws.framework.
import org.apache.axis2.jaxws.provider.DataSourceImpl;
import org.apache.axiom.attachments.utils.IOUtils;
import org.apache.axiom.attachments.impl.BufferUtils;
-import org.apache.axiom.om.util.UUIDGenerator;
+import org.apache.axiom.util.UIDGenerator;
import javax.activation.DataSource;
import javax.activation.FileDataSource;
@@ -121,7 +121,7 @@ public class DispatchXMessageDataSourceT
requestContext.put(MessageContext.OUTBOUND_MESSAGE_ATTACHMENTS,
attachments);
- attachments.put(UUIDGenerator.getUUID(), new DataHandler(attachmentDS));
+ attachments.put(UIDGenerator.generateContentId(), new DataHandler(attachmentDS));
DataSource request = txtDS;
DataSource response = dispatch.invoke(request);
@@ -143,7 +143,7 @@ public class DispatchXMessageDataSourceT
requestContext.put(MessageContext.OUTBOUND_MESSAGE_ATTACHMENTS,
attachments);
- attachments.put(UUIDGenerator.getUUID(), new DataHandler(attachmentDS));
+ attachments.put(UIDGenerator.generateContentId(), new DataHandler(attachmentDS));
DataSource request = imageDS;
DataSource response = dispatch.invoke(request);
@@ -164,8 +164,8 @@ public class DispatchXMessageDataSourceT
requestContext.put(MessageContext.OUTBOUND_MESSAGE_ATTACHMENTS,
attachments);
- attachments.put(UUIDGenerator.getUUID(), new DataHandler(attachmentDS));
- attachments.put(UUIDGenerator.getUUID(), new DataHandler(imageDS));
+ attachments.put(UIDGenerator.generateContentId(), new DataHandler(attachmentDS));
+ attachments.put(UIDGenerator.generateContentId(), new DataHandler(imageDS));
DataSource request = txtDS;
DataSource response = dispatch.invoke(request);
Modified: axis/axis2/java/core/branches/1_6/modules/jaxws/src/org/apache/axis2/jaxws/marshaller/impl/alt/Attachment.java
URL: http://svn.apache.org/viewvc/axis/axis2/java/core/branches/1_6/modules/jaxws/src/org/apache/axis2/jaxws/marshaller/impl/alt/Attachment.java?rev=1693807&r1=1693806&r2=1693807&view=diff
==============================================================================
--- axis/axis2/java/core/branches/1_6/modules/jaxws/src/org/apache/axis2/jaxws/marshaller/impl/alt/Attachment.java (original)
+++ axis/axis2/java/core/branches/1_6/modules/jaxws/src/org/apache/axis2/jaxws/marshaller/impl/alt/Attachment.java Sun Aug 2 11:31:49 2015
@@ -19,7 +19,7 @@
package org.apache.axis2.jaxws.marshaller.impl.alt;
-import org.apache.axiom.om.util.UUIDGenerator;
+import org.apache.axiom.util.UIDGenerator;
import org.apache.axis2.jaxws.ExceptionFactory;
import org.apache.axis2.jaxws.description.AttachmentDescription;
import org.apache.axis2.jaxws.i18n.Messages;
@@ -113,7 +113,7 @@ class Attachment {
*/
public String getContentID() {
if (cid == null) {
- cid = UUIDGenerator.getUUID();
+ cid = UIDGenerator.generateContentId();
// Per spec, use the partName in the content-id
// http://www.ws-i.org/Profiles/AttachmentsProfile-1.0.html#Value-space_of_Content-Id_Header
if (partName != null) {
Modified: axis/axis2/java/core/branches/1_6/modules/jaxws/src/org/apache/axis2/jaxws/utility/DataSourceFormatter.java
URL: http://svn.apache.org/viewvc/axis/axis2/java/core/branches/1_6/modules/jaxws/src/org/apache/axis2/jaxws/utility/DataSourceFormatter.java?rev=1693807&r1=1693806&r2=1693807&view=diff
==============================================================================
--- axis/axis2/java/core/branches/1_6/modules/jaxws/src/org/apache/axis2/jaxws/utility/DataSourceFormatter.java (original)
+++ axis/axis2/java/core/branches/1_6/modules/jaxws/src/org/apache/axis2/jaxws/utility/DataSourceFormatter.java Sun Aug 2 11:31:49 2015
@@ -22,13 +22,14 @@ package org.apache.axis2.jaxws.utility;
import org.apache.axiom.om.OMElement;
import org.apache.axiom.om.OMOutputFormat;
import org.apache.axiom.om.OMSourcedElement;
-import org.apache.axiom.om.impl.MIMEOutputUtils;
+import org.apache.axiom.om.impl.OMMultipartWriter;
import org.apache.axis2.AxisFault;
import org.apache.axis2.jaxws.handler.AttachmentsAdapter;
import org.apache.axis2.jaxws.message.databinding.DataSourceBlock;
import org.apache.axis2.transport.MessageFormatter;
import org.apache.axis2.transport.http.ApplicationXMLFormatter;
import org.apache.axis2.transport.http.util.URLTemplatingUtil;
+import org.apache.axis2.util.WrappedDataHandler;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
@@ -66,12 +67,21 @@ public class DataSourceFormatter impleme
} catch (XMLStreamException e) {
throw AxisFault.makeFault(e);
}
- MIMEOutputUtils.writeDataHandlerWithAttachmentsMessage(
- new DataHandler(busObject),
- contentType,
- outputStream,
- attachments,
- format);
+ OMMultipartWriter mpw = new OMMultipartWriter(outputStream, format);
+ DataHandler rootDataHandler = new DataHandler(busObject);
+ if (!rootDataHandler.getContentType().equals(contentType)) {
+ rootDataHandler = new WrappedDataHandler(rootDataHandler, contentType);
+ }
+ try {
+ mpw.writePart(rootDataHandler, format.getRootContentId());
+ for (String cid : attachments.keySet()) {
+ mpw.writePart(attachments.get(cid), cid);
+ }
+ mpw.complete();
+ outputStream.flush();
+ } catch (IOException ex) {
+ throw AxisFault.makeFault(ex);
+ }
} else {
OMElement omElement = messageContext.getEnvelope().getBody().getFirstElement();
if (omElement != null) {
Modified: axis/axis2/java/core/branches/1_6/modules/kernel/src/org/apache/axis2/util/WrappedDataHandler.java
URL: http://svn.apache.org/viewvc/axis/axis2/java/core/branches/1_6/modules/kernel/src/org/apache/axis2/util/WrappedDataHandler.java?rev=1693807&r1=1693806&r2=1693807&view=diff
==============================================================================
--- axis/axis2/java/core/branches/1_6/modules/kernel/src/org/apache/axis2/util/WrappedDataHandler.java (original)
+++ axis/axis2/java/core/branches/1_6/modules/kernel/src/org/apache/axis2/util/WrappedDataHandler.java Sun Aug 2 11:31:49 2015
@@ -19,17 +19,9 @@
package org.apache.axis2.util;
-import java.awt.datatransfer.DataFlavor;
-import java.awt.datatransfer.UnsupportedFlavorException;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-
-import javax.activation.CommandInfo;
-import javax.activation.CommandMap;
import javax.activation.DataHandler;
-import javax.activation.DataSource;
+import org.apache.axiom.util.activation.DataHandlerWrapper;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
@@ -39,41 +31,11 @@ import org.apache.commons.logging.LogFac
* the DataHandler instance. We'll delegate all method calls except for getContentType()
* to the real DataHandler instance.
*/
-public class WrappedDataHandler extends DataHandler {
+public class WrappedDataHandler extends DataHandlerWrapper {
private static final Log log = LogFactory.getLog(WrappedDataHandler.class);
- DataHandler delegate;
- String contentType;
-
- private static FakeDataSource FAKE_DS = new FakeDataSource();
-
- // This class is simply used as a fake DataSource implementation so that the
- // WrappedDataHandler class can call it's superclass's ctor with a non-null
- // value that implements DataSource. The FakeDataSource instance will never
- // be used, however. It's simply a placeholder.
- private static class FakeDataSource implements DataSource {
-
-
- public String getContentType() {
- return "application/octet-stream";
- }
-
-
- public InputStream getInputStream() throws IOException {
- throw new UnsupportedOperationException();
- }
-
-
- public String getName() {
- return "FakeDataSource";
- }
-
-
- public OutputStream getOutputStream() throws IOException {
- throw new UnsupportedOperationException();
- }
- }
+ private final String contentType;
/**
* Constructs a new instance of the WrappedDataHandler.
@@ -81,134 +43,18 @@ public class WrappedDataHandler extends
* @param _contentType the user-defined contentType associated with the DataHandler instance
*/
public WrappedDataHandler(DataHandler _delegate, String _contentType) {
- super(FAKE_DS);
+ super(_delegate);
- delegate = _delegate;
contentType = _contentType;
if (log.isDebugEnabled()) {
log.debug("Created instance of WrappedDatahandler: " + this.toString() + ", contentType=" + contentType
- + "\nDelegate DataHandler: " + delegate.toString());
+ + "\nDelegate DataHandler: " + _delegate.toString());
}
}
- /* (non-Javadoc)
- * @see javax.activation.DataHandler#getAllCommands()
- */
- @Override
- public CommandInfo[] getAllCommands() {
- return delegate.getAllCommands();
- }
-
- /* (non-Javadoc)
- * @see javax.activation.DataHandler#getBean(javax.activation.CommandInfo)
- */
- @Override
- public Object getBean(CommandInfo paramCommandInfo) {
- return delegate.getBean(paramCommandInfo);
- }
-
- /* (non-Javadoc)
- * @see javax.activation.DataHandler#getCommand(java.lang.String)
- */
- @Override
- public CommandInfo getCommand(String paramString) {
- return delegate.getCommand(paramString);
- }
-
- /* (non-Javadoc)
- * @see javax.activation.DataHandler#getContent()
- */
- @Override
- public Object getContent() throws IOException {
- return delegate.getContent();
- }
-
- /* (non-Javadoc)
- * @see javax.activation.DataHandler#getContentType()
- */
@Override
public String getContentType() {
- return (contentType != null ? contentType : delegate.getContentType());
- }
-
- /* (non-Javadoc)
- * @see javax.activation.DataHandler#getDataSource()
- */
- @Override
- public DataSource getDataSource() {
- return delegate.getDataSource();
- }
-
- /* (non-Javadoc)
- * @see javax.activation.DataHandler#getInputStream()
- */
- @Override
- public InputStream getInputStream() throws IOException {
- return delegate.getInputStream();
- }
-
- /* (non-Javadoc)
- * @see javax.activation.DataHandler#getName()
- */
- @Override
- public String getName() {
- return delegate.getName();
- }
-
- /* (non-Javadoc)
- * @see javax.activation.DataHandler#getOutputStream()
- */
- @Override
- public OutputStream getOutputStream() throws IOException {
- return delegate.getOutputStream();
- }
-
- /* (non-Javadoc)
- * @see javax.activation.DataHandler#getPreferredCommands()
- */
- @Override
- public CommandInfo[] getPreferredCommands() {
- return delegate.getPreferredCommands();
- }
-
- /* (non-Javadoc)
- * @see javax.activation.DataHandler#getTransferData(java.awt.datatransfer.DataFlavor)
- */
- @Override
- public Object getTransferData(DataFlavor paramDataFlavor) throws UnsupportedFlavorException, IOException {
- return delegate.getTransferData(paramDataFlavor);
- }
-
- /* (non-Javadoc)
- * @see javax.activation.DataHandler#getTransferDataFlavors()
- */
- @Override
- public synchronized DataFlavor[] getTransferDataFlavors() {
- return delegate.getTransferDataFlavors();
- }
-
- /* (non-Javadoc)
- * @see javax.activation.DataHandler#isDataFlavorSupported(java.awt.datatransfer.DataFlavor)
- */
- @Override
- public boolean isDataFlavorSupported(DataFlavor paramDataFlavor) {
- return delegate.isDataFlavorSupported(paramDataFlavor);
- }
-
- /* (non-Javadoc)
- * @see javax.activation.DataHandler#setCommandMap(javax.activation.CommandMap)
- */
- @Override
- public synchronized void setCommandMap(CommandMap paramCommandMap) {
- delegate.setCommandMap(paramCommandMap);
- }
-
- /* (non-Javadoc)
- * @see javax.activation.DataHandler#writeTo(java.io.OutputStream)
- */
- @Override
- public void writeTo(OutputStream paramOutputStream) throws IOException {
- delegate.writeTo(paramOutputStream);
+ return (contentType != null ? contentType : super.getContentType());
}
}
Modified: axis/axis2/java/core/branches/1_6/modules/kernel/test/org/apache/axis2/util/MessageContextBuilderTest.java
URL: http://svn.apache.org/viewvc/axis/axis2/java/core/branches/1_6/modules/kernel/test/org/apache/axis2/util/MessageContextBuilderTest.java?rev=1693807&r1=1693806&r2=1693807&view=diff
==============================================================================
--- axis/axis2/java/core/branches/1_6/modules/kernel/test/org/apache/axis2/util/MessageContextBuilderTest.java (original)
+++ axis/axis2/java/core/branches/1_6/modules/kernel/test/org/apache/axis2/util/MessageContextBuilderTest.java Sun Aug 2 11:31:49 2015
@@ -8,8 +8,9 @@ import javax.xml.stream.XMLStreamExcepti
import junit.framework.TestCase;
+import org.apache.axiom.om.OMAbstractFactory;
import org.apache.axiom.om.OMElement;
-import org.apache.axiom.om.impl.OMNamespaceImpl;
+import org.apache.axiom.om.OMNamespace;
import org.apache.axiom.soap.SOAP11Constants;
import org.apache.axiom.soap.SOAP12Constants;
import org.apache.axiom.soap.SOAPConstants;
@@ -27,7 +28,7 @@ import org.apache.axis2.AxisFault;
public class MessageContextBuilderTest extends AbstractTestCase {
- private OMNamespaceImpl nsp = new OMNamespaceImpl(Constants.URI_SOAP11_ENV, "soapenv");
+ private OMNamespace nsp = OMAbstractFactory.getOMFactory().createOMNamespace(Constants.URI_SOAP11_ENV, "soapenv");
public MessageContextBuilderTest(String testName) {
super(testName);
Modified: axis/axis2/java/core/branches/1_6/modules/mex/src/org/apache/axis2/mex/util/MexUtil.java
URL: http://svn.apache.org/viewvc/axis/axis2/java/core/branches/1_6/modules/mex/src/org/apache/axis2/mex/util/MexUtil.java?rev=1693807&r1=1693806&r2=1693807&view=diff
==============================================================================
--- axis/axis2/java/core/branches/1_6/modules/mex/src/org/apache/axis2/mex/util/MexUtil.java (original)
+++ axis/axis2/java/core/branches/1_6/modules/mex/src/org/apache/axis2/mex/util/MexUtil.java Sun Aug 2 11:31:49 2015
@@ -22,7 +22,7 @@ package org.apache.axis2.mex.util;
import org.apache.axiom.om.OMAbstractFactory;
import org.apache.axiom.om.OMElement;
import org.apache.axiom.om.OMFactory;
-import org.apache.axiom.om.impl.OMNamespaceImpl;
+import org.apache.axiom.om.OMNamespace;
import org.apache.axiom.soap.SOAP11Constants;
import org.apache.axiom.soap.SOAP12Constants;
import org.apache.axiom.soap.SOAPEnvelope;
@@ -132,14 +132,14 @@ public class MexUtil {
* @throws AxisFault
*/
- public static OMNamespaceImpl getAddressingNameSpace(OMElement toAddress)
+ public static OMNamespace getAddressingNameSpace(OMElement toAddress)
throws MexException {
OMFactory factory = OMAbstractFactory.getOMFactory();
- OMNamespaceImpl wsa = null;
+ OMNamespace wsa = null;
try {
String prefix = toAddress.getNamespace().getPrefix();
String nsURI = toAddress.getNamespace().getNamespaceURI();
- wsa = (OMNamespaceImpl) factory.createOMNamespace(nsURI, prefix);
+ wsa = factory.createOMNamespace(nsURI, prefix);
} catch (Exception e) {
throw new MexException(e);
}