You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by ve...@apache.org on 2009/02/03 18:49:32 UTC

svn commit: r740360 - /webservices/axis2/trunk/java/modules/saaj/test/org/apache/axis2/saaj/AttachmentTest.java

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);