axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From veit...@apache.org
Subject svn commit: r740360 - /webservices/axis2/trunk/java/modules/saaj/test/org/apache/axis2/saaj/AttachmentTest.java
Date Tue, 03 Feb 2009 17:49:32 GMT
Author: veithen
Date: Tue Feb  3 17:49:32 2009
New Revision: 740360

URL: http://svn.apache.org/viewvc?rev=740360&view=rev
Log:
AXIS2-4231: In AttachmentTest#testMultipleAttachments, construct DataHandlers from Java objects
instead of (external) URLs. This avoids problems when running the tests on a machine without
Internet access. Note that the way the DataHandlers are created is not relevant for the test
case.

Modified:
    webservices/axis2/trunk/java/modules/saaj/test/org/apache/axis2/saaj/AttachmentTest.java

Modified: webservices/axis2/trunk/java/modules/saaj/test/org/apache/axis2/saaj/AttachmentTest.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/saaj/test/org/apache/axis2/saaj/AttachmentTest.java?rev=740360&r1=740359&r2=740360&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/saaj/test/org/apache/axis2/saaj/AttachmentTest.java
(original)
+++ webservices/axis2/trunk/java/modules/saaj/test/org/apache/axis2/saaj/AttachmentTest.java
Tue Feb  3 17:49:32 2009
@@ -85,16 +85,14 @@
 
         MessageFactory factory = MessageFactory.newInstance();
         SOAPMessage msg = factory.createMessage();
-        URL url1 = new URL("http://www.apache.org/licenses/LICENSE-2.0.html");
-        URL url2 = new URL("http://www.apache.org/licenses/LICENSE-2.0.txt");
 
-        AttachmentPart a1 = msg.createAttachmentPart(new DataHandler(url1));
+        AttachmentPart a1 = msg.createAttachmentPart(new DataHandler("<some_xml/>",
"text/xml"));
         a1.setContentType("text/xml");
         msg.addAttachmentPart(a1);
-        AttachmentPart a2 = msg.createAttachmentPart(new DataHandler(url1));
+        AttachmentPart a2 = msg.createAttachmentPart(new DataHandler("<some_xml/>",
"text/xml"));
         a2.setContentType("text/xml");
         msg.addAttachmentPart(a2);
-        AttachmentPart a3 = msg.createAttachmentPart(new DataHandler(url2));
+        AttachmentPart a3 = msg.createAttachmentPart(new DataHandler("text", "text/plain"));
         a3.setContentType("text/plain");
         msg.addAttachmentPart(a3);
 



Mime
View raw message