axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From thil...@apache.org
Subject svn commit: r209221 - in /webservices/axis/trunk/java/modules/samples/src/sample/mtom: MTOMService.java client/UserInterface.java
Date Tue, 05 Jul 2005 05:19:34 GMT
Author: thilina
Date: Mon Jul  4 22:19:32 2005
New Revision: 209221

URL: http://svn.apache.org/viewcvs?rev=209221&view=rev
Log:
update to samples

Modified:
    webservices/axis/trunk/java/modules/samples/src/sample/mtom/MTOMService.java
    webservices/axis/trunk/java/modules/samples/src/sample/mtom/client/UserInterface.java

Modified: webservices/axis/trunk/java/modules/samples/src/sample/mtom/MTOMService.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/samples/src/sample/mtom/MTOMService.java?rev=209221&r1=209220&r2=209221&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/samples/src/sample/mtom/MTOMService.java (original)
+++ webservices/axis/trunk/java/modules/samples/src/sample/mtom/MTOMService.java Mon Jul 
4 22:19:32 2005
@@ -32,15 +32,17 @@
 public class MTOMService {
 	public OMElement mtomSample(OMElement element) throws Exception {
 		OMElement imageEle = element.getFirstElement();
-		OMElement imageName = (OMElement) imageEle.getNextSibling();
+		System.out.println(imageEle.getLocalName());
+		//OMElement imageName = (OMElement) imageEle.getNextSibling();
+		//System.out.println(imageName.getLocalName());
 		OMText binaryNode = (OMText) imageEle.getFirstChild();
-		String nameNode = imageName.getText();
+		//String nameNode = imageName.getText();
 		//Extracting the data and saving 
 		DataHandler actualDH;
 		actualDH = binaryNode.getDataHandler();
 		Image actualObject = new JDK13IO().loadImage(actualDH.getDataSource()
 				.getInputStream());
-		FileOutputStream imageOutStream = new FileOutputStream(nameNode);
+		FileOutputStream imageOutStream = new FileOutputStream("test.jpg");
 		new JDK13IO().saveImage("image/jpeg", actualObject, imageOutStream);
 		
 		//setting response

Modified: webservices/axis/trunk/java/modules/samples/src/sample/mtom/client/UserInterface.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/samples/src/sample/mtom/client/UserInterface.java?rev=209221&r1=209220&r2=209221&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/samples/src/sample/mtom/client/UserInterface.java
(original)
+++ webservices/axis/trunk/java/modules/samples/src/sample/mtom/client/UserInterface.java
Mon Jul  4 22:19:32 2005
@@ -104,7 +104,7 @@
 
 		if (e.getSource() == browse) {
 
-			int returnVal = jFileChooser.showDialog(this, "OK");
+			int returnVal = jFileChooser.showDialog(this, "Choose the Image to Send");
 
 			if (returnVal == JFileChooser.APPROVE_OPTION) {
 				file = jFileChooser.getSelectedFile();
@@ -148,6 +148,8 @@
 			mtomTest.setTargetEPR(EPRName);
 			OMElement result = (OMElement) mtomTest.testEchoXMLSync(fileName);
 			jTextArea.setText(result.toString());
+			JOptionPane.showMessageDialog(parent, "Sent & saved Image Succesfully",
+					" Success", JOptionPane.PLAIN_MESSAGE);
 		} catch (Exception e) {
 			e.printStackTrace(); //To change body of catch statement use File |
 								 // Settings | File Templates.



Mime
View raw message