You are viewing a plain text version of this content. The canonical link for it is here.
Posted to sandesha-dev@ws.apache.org by ch...@apache.org on 2006/09/04 13:48:38 UTC

svn commit: r440034 - /webservices/sandesha/trunk/java/samples/src/sandesha2/samples/userguide/MTOMPingClient.java

Author: chamikara
Date: Mon Sep  4 04:48:37 2006
New Revision: 440034

URL: http://svn.apache.org/viewvc?view=rev&rev=440034
Log:
ImageIO is not available in Axis2 anymore.


Modified:
    webservices/sandesha/trunk/java/samples/src/sandesha2/samples/userguide/MTOMPingClient.java

Modified: webservices/sandesha/trunk/java/samples/src/sandesha2/samples/userguide/MTOMPingClient.java
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/java/samples/src/sandesha2/samples/userguide/MTOMPingClient.java?view=diff&rev=440034&r1=440033&r2=440034
==============================================================================
--- webservices/sandesha/trunk/java/samples/src/sandesha2/samples/userguide/MTOMPingClient.java (original)
+++ webservices/sandesha/trunk/java/samples/src/sandesha2/samples/userguide/MTOMPingClient.java Mon Sep  4 04:48:37 2006
@@ -21,6 +21,7 @@
 import java.io.FileInputStream;
 
 import javax.activation.DataHandler;
+import javax.activation.FileDataSource;
 import javax.xml.namespace.QName;
 
 import org.apache.axiom.attachments.utils.ImageDataSource;
@@ -122,12 +123,10 @@
 		OMElement pingElem = fac.createOMElement(MTOMPing, namespace);
 		OMElement attachmentElem = fac.createOMElement("Attachment", namespace);
 		
-	    Image image;
 	    String imageName = "test-resources" + File.separator + "mtom-image.jpg";
-	    ImageDataSource dataSource;
+	    FileDataSource dataSource;
 		try {
-			image = new ImageIO().loadImage(new FileInputStream(imageName));
-			dataSource = new ImageDataSource("test.jpg",image);
+			dataSource = new FileDataSource (new File (imageName));
 		} catch (Exception e) {
 			throw new AxisFault (e);
 		}



---------------------------------------------------------------------
To unsubscribe, e-mail: sandesha-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: sandesha-dev-help@ws.apache.org