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 di...@apache.org on 2005/09/15 21:07:03 UTC

svn commit: r289289 [94/134] - in /webservices/axis2/trunk/java: ./ etc/ modules/addressing/ modules/addressing/src/META-INF/ modules/addressing/src/org/apache/axis2/handlers/addressing/ modules/addressing/test-resources/ modules/addressing/test/org/ap...

Modified: webservices/axis2/trunk/java/modules/samples/src/sample/amazon/amazonSimpleQueueService/ListenersIn.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/samples/src/sample/amazon/amazonSimpleQueueService/ListenersIn.java?rev=289289&r1=289288&r2=289289&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/samples/src/sample/amazon/amazonSimpleQueueService/ListenersIn.java (original)
+++ webservices/axis2/trunk/java/modules/samples/src/sample/amazon/amazonSimpleQueueService/ListenersIn.java Thu Sep 15 11:52:11 2005
@@ -1,61 +1,61 @@
-/*
-* Copyright 2004,2005 The Apache Software Foundation.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-*      http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package sample.amazon.amazonSimpleQueueService;
-
-import sample.amazon.amazonSimpleQueueService.util.RunnableCreateQueue;
-
-import javax.swing.*;
-import java.awt.event.KeyEvent;
-import java.awt.event.KeyListener;
-
-/**
- * Listeners for relevent Components in the IN operation
- *
- * @author Saminda Abeyruwan <sa...@opensource.lk>
- */
-public class ListenersIn implements KeyListener {
-    JTextField createQueue;
-    JTextArea result;
-    JTextField queueCode;
-    JTextField enqueue;
-    RunnableCreateQueue runnable;
-
-    public ListenersIn(JTextField createQueue, JTextField queueCode, JTextField enqueue,
-                       JTextArea result) {
-        this.queueCode = queueCode;
-        this.createQueue = createQueue;
-        this.enqueue = enqueue;
-        this.result = result;
-    }
-
-    public void keyPressed(KeyEvent e) {
-        if (e.getKeyCode() == KeyEvent.VK_ENTER) {
-            runnable =
-                    new RunnableCreateQueue(this.createQueue, this.queueCode, this.enqueue,
-                            this.result);
-            Thread tread = new Thread(runnable);
-            tread.start();
-        }
-    }
-
-    public void keyReleased(KeyEvent e) {
-
-    }
-
-    public void keyTyped(KeyEvent e) {
-
-    }
-}
+/*
+* Copyright 2004,2005 The Apache Software Foundation.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+*      http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package sample.amazon.amazonSimpleQueueService;
+
+import sample.amazon.amazonSimpleQueueService.util.RunnableCreateQueue;
+
+import javax.swing.*;
+import java.awt.event.KeyEvent;
+import java.awt.event.KeyListener;
+
+/**
+ * Listeners for relevent Components in the IN operation
+ *
+ * @author Saminda Abeyruwan <sa...@opensource.lk>
+ */
+public class ListenersIn implements KeyListener {
+    JTextField createQueue;
+    JTextArea result;
+    JTextField queueCode;
+    JTextField enqueue;
+    RunnableCreateQueue runnable;
+
+    public ListenersIn(JTextField createQueue, JTextField queueCode, JTextField enqueue,
+                       JTextArea result) {
+        this.queueCode = queueCode;
+        this.createQueue = createQueue;
+        this.enqueue = enqueue;
+        this.result = result;
+    }
+
+    public void keyPressed(KeyEvent e) {
+        if (e.getKeyCode() == KeyEvent.VK_ENTER) {
+            runnable =
+                    new RunnableCreateQueue(this.createQueue, this.queueCode, this.enqueue,
+                            this.result);
+            Thread tread = new Thread(runnable);
+            tread.start();
+        }
+    }
+
+    public void keyReleased(KeyEvent e) {
+
+    }
+
+    public void keyTyped(KeyEvent e) {
+
+    }
+}

Propchange: webservices/axis2/trunk/java/modules/samples/src/sample/amazon/amazonSimpleQueueService/ListenersIn.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: webservices/axis2/trunk/java/modules/samples/src/sample/amazon/amazonSimpleQueueService/ListenersOut.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/samples/src/sample/amazon/amazonSimpleQueueService/ListenersOut.java?rev=289289&r1=289288&r2=289289&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/samples/src/sample/amazon/amazonSimpleQueueService/ListenersOut.java (original)
+++ webservices/axis2/trunk/java/modules/samples/src/sample/amazon/amazonSimpleQueueService/ListenersOut.java Thu Sep 15 11:52:11 2005
@@ -1,104 +1,104 @@
-/*
-* Copyright 2004,2005 The Apache Software Foundation.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-*      http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package sample.amazon.amazonSimpleQueueService;
-
-import sample.amazon.amazonSimpleQueueService.util.RunnableDeleteQueue;
-import sample.amazon.amazonSimpleQueueService.util.RunnableListMyQueues;
-import sample.amazon.amazonSimpleQueueService.util.RunnableReadQueue;
-
-import javax.swing.*;
-import java.awt.event.*;
-
-/**
- * This will create the OMElement needed to be used in invokeNonBlocking() method
- *
- * @author Saminda Abeyruwan <sa...@opensource.lk>
- */
-public class ListenersOut implements KeyListener,
-        ActionListener,
-        MouseMotionListener {
-    JTextField createQueue;
-    JTextArea result;
-    JTextField queueCode;
-    JTextField read;
-    JButton buttonLoad;
-    JButton buttonDelete;
-    Runnable runableCodeListMyQueues;
-    Runnable runnableCodeDequeue;
-
-    public ListenersOut(JTextField createQueue,
-                        JTextField queueCode,
-                        JTextField read,
-                        JTextArea result,
-                        JButton buttonLoad,
-                        JButton buttonDelete) {
-        this.queueCode = queueCode;
-        this.createQueue = createQueue;
-        this.read = read;
-        this.result = result;
-        this.buttonLoad = buttonLoad;
-        this.buttonDelete = buttonDelete;
-    }
-
-    public void keyPressed(KeyEvent e) {
-        if (e.getKeyCode() == KeyEvent.VK_ENTER) {
-            this.result.setText("");
-            this.createQueue.setEditable(false);
-            this.runableCodeListMyQueues =
-                    new RunnableReadQueue(this.createQueue,
-                            this.queueCode, this.read, this.result);
-            Thread thread = new Thread(this.runableCodeListMyQueues);
-            thread.start();
-        }
-    }
-
-    public void keyReleased(KeyEvent e) {
-        //To change body of implemented methods use File | Settings | File Templates.
-    }
-
-    public void keyTyped(KeyEvent e) {
-        //To change body of implemented methods use File | Settings | File Templates.
-    }
-
-    public void actionPerformed(ActionEvent e) {
-        if (e.getActionCommand().equals("1")) {
-            this.runableCodeListMyQueues =
-                    new RunnableListMyQueues(this.createQueue, this.queueCode, this.read,
-                            this.result, this.buttonLoad);
-            Thread thread1 = new Thread(this.runableCodeListMyQueues);
-            thread1.start();
-            this.createQueue.setEditable(true);
-            this.buttonLoad.setText("Running..");
-        }
-        if (e.getActionCommand().equals("2")) {
-            this.buttonDelete.setText("Running");
-            this.runnableCodeDequeue =
-                    new RunnableDeleteQueue(this.createQueue, this.queueCode, this.read,
-                            this.result, this.buttonDelete);
-            Thread thread2 = new Thread(this.runnableCodeDequeue);
-            thread2.start();
-        }
-    }
-
-    public void mouseDragged(MouseEvent e) {
-        String selectedText = this.result.getSelectedText();
-        this.createQueue.setText(selectedText);
-    }
-
-    public void mouseMoved(MouseEvent e) {
-        //To change body of implemented methods use File | Settings | File Templates.
-    }
-}
+/*
+* Copyright 2004,2005 The Apache Software Foundation.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+*      http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package sample.amazon.amazonSimpleQueueService;
+
+import sample.amazon.amazonSimpleQueueService.util.RunnableDeleteQueue;
+import sample.amazon.amazonSimpleQueueService.util.RunnableListMyQueues;
+import sample.amazon.amazonSimpleQueueService.util.RunnableReadQueue;
+
+import javax.swing.*;
+import java.awt.event.*;
+
+/**
+ * This will create the OMElement needed to be used in invokeNonBlocking() method
+ *
+ * @author Saminda Abeyruwan <sa...@opensource.lk>
+ */
+public class ListenersOut implements KeyListener,
+        ActionListener,
+        MouseMotionListener {
+    JTextField createQueue;
+    JTextArea result;
+    JTextField queueCode;
+    JTextField read;
+    JButton buttonLoad;
+    JButton buttonDelete;
+    Runnable runableCodeListMyQueues;
+    Runnable runnableCodeDequeue;
+
+    public ListenersOut(JTextField createQueue,
+                        JTextField queueCode,
+                        JTextField read,
+                        JTextArea result,
+                        JButton buttonLoad,
+                        JButton buttonDelete) {
+        this.queueCode = queueCode;
+        this.createQueue = createQueue;
+        this.read = read;
+        this.result = result;
+        this.buttonLoad = buttonLoad;
+        this.buttonDelete = buttonDelete;
+    }
+
+    public void keyPressed(KeyEvent e) {
+        if (e.getKeyCode() == KeyEvent.VK_ENTER) {
+            this.result.setText("");
+            this.createQueue.setEditable(false);
+            this.runableCodeListMyQueues =
+                    new RunnableReadQueue(this.createQueue,
+                            this.queueCode, this.read, this.result);
+            Thread thread = new Thread(this.runableCodeListMyQueues);
+            thread.start();
+        }
+    }
+
+    public void keyReleased(KeyEvent e) {
+        //To change body of implemented methods use File | Settings | File Templates.
+    }
+
+    public void keyTyped(KeyEvent e) {
+        //To change body of implemented methods use File | Settings | File Templates.
+    }
+
+    public void actionPerformed(ActionEvent e) {
+        if (e.getActionCommand().equals("1")) {
+            this.runableCodeListMyQueues =
+                    new RunnableListMyQueues(this.createQueue, this.queueCode, this.read,
+                            this.result, this.buttonLoad);
+            Thread thread1 = new Thread(this.runableCodeListMyQueues);
+            thread1.start();
+            this.createQueue.setEditable(true);
+            this.buttonLoad.setText("Running..");
+        }
+        if (e.getActionCommand().equals("2")) {
+            this.buttonDelete.setText("Running");
+            this.runnableCodeDequeue =
+                    new RunnableDeleteQueue(this.createQueue, this.queueCode, this.read,
+                            this.result, this.buttonDelete);
+            Thread thread2 = new Thread(this.runnableCodeDequeue);
+            thread2.start();
+        }
+    }
+
+    public void mouseDragged(MouseEvent e) {
+        String selectedText = this.result.getSelectedText();
+        this.createQueue.setText(selectedText);
+    }
+
+    public void mouseMoved(MouseEvent e) {
+        //To change body of implemented methods use File | Settings | File Templates.
+    }
+}

Propchange: webservices/axis2/trunk/java/modules/samples/src/sample/amazon/amazonSimpleQueueService/ListenersOut.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: webservices/axis2/trunk/java/modules/samples/src/sample/amazon/amazonSimpleQueueService/OMElementCreator.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/samples/src/sample/amazon/amazonSimpleQueueService/OMElementCreator.java?rev=289289&r1=289288&r2=289289&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/samples/src/sample/amazon/amazonSimpleQueueService/OMElementCreator.java (original)
+++ webservices/axis2/trunk/java/modules/samples/src/sample/amazon/amazonSimpleQueueService/OMElementCreator.java Thu Sep 15 11:52:11 2005
@@ -1,138 +1,138 @@
-/*
-* Copyright 2004,2005 The Apache Software Foundation.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-*      http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package sample.amazon.amazonSimpleQueueService;
-
-import org.apache.axis2.om.OMAbstractFactory;
-import org.apache.axis2.om.OMElement;
-import org.apache.axis2.om.OMNamespace;
-import org.apache.axis2.soap.SOAPFactory;
-
-/**
- * This will create the OMElement needed to be used in invokeNonBlocking() method
- * OMElements are created for CreateQueueu, ListMyQueues, Read, and Enqueue operations
- *
- * @author Saminda Abeyruwan <sa...@opensource.lk>
- */
-public class OMElementCreator {
-    public static OMElement creatQueueElement(String createQueueElement,
-                                              String key) {
-        SOAPFactory factory = OMAbstractFactory.getSOAP11Factory();
-        OMNamespace opN = factory.createOMNamespace(
-                "http://webservices.amazon.com/AWSSimpleQueueService/2005-01-01",
-                "nsQ");
-        OMElement createQueue = factory.createOMElement("CreateQueue", opN);
-        OMElement subID = factory.createOMElement("SubscriptionId", opN);
-        OMElement request = factory.createOMElement("Request", opN);
-        OMElement queueName = factory.createOMElement("QueueName", opN);
-        OMElement readLockTimeOutSeconds = factory.createOMElement(
-                "ReadLockTimeoutSeconds", opN);
-        request.addChild(queueName);
-        request.addChild(readLockTimeOutSeconds);
-        subID.addChild(factory.createText(key));
-        queueName.addChild(factory.createText(createQueueElement));
-        readLockTimeOutSeconds.addChild(factory.createText("10"));
-        createQueue.addChild(subID);
-        createQueue.addChild(request);
-        return createQueue;
-    }
-
-    public static OMElement deleteQueueElement(String deleteQueueName,
-                                               String key) {
-        SOAPFactory factory = OMAbstractFactory.getSOAP11Factory();
-        OMNamespace opN = factory.createOMNamespace(
-                "http://webservices.amazon.com/AWSSimpleQueueService/2005-01-01",
-                "nsQ");
-        OMElement enque = factory.createOMElement("DeleteQueue", opN);
-        OMElement subID = factory.createOMElement("SubscriptionId", opN);
-        OMElement request = factory.createOMElement("Request", opN);
-        OMElement queueName = factory.createOMElement("QueueName", opN);
-        //OMElement queueID = factory.createOMElement("QueueId",opN);
-        request.addChild(queueName);
-        //request.addChild(queueID);
-        subID.addChild(factory.createText(key));
-        queueName.addChild(factory.createText(deleteQueueName));
-        //queueID.addChild(factory.createText(queueIden));
-        enque.addChild(subID);
-        enque.addChild(request);
-        return enque;
-    }
-
-    public static OMElement enqueueElement(String queueEntyBody,
-                                           String queueIden,
-                                           String key) {
-        SOAPFactory factory = OMAbstractFactory.getSOAP11Factory();
-        OMNamespace opN = factory.createOMNamespace(
-                "http://webservices.amazon.com/AWSSimpleQueueService/2005-01-01",
-                "nsQ");
-        OMElement enque = factory.createOMElement("Enqueue", opN);
-        OMElement subID = factory.createOMElement("SubscriptionId", opN);
-        OMElement request = factory.createOMElement("Request", opN);
-        //OMElement queueName = factory.createOMElement("QueueName",opN);
-        OMElement queueID = factory.createOMElement("QueueId", opN);
-        OMElement queueEntryBodies = factory.createOMElement(
-                "QueueEntryBodies", opN);
-        OMElement queueEntryBody1 = factory.createOMElement("QueueEntryBody",
-                opN);
-        queueEntryBodies.addChild(queueEntryBody1);
-        //request.addChild(queueName);
-        request.addChild(queueID);
-        request.addChild(queueEntryBodies);
-        subID.addChild(factory.createText(key));
-        //queueName.addChild(factory.createText("Test Queue LSF "));
-        queueID.addChild(factory.createText(queueIden));
-        queueEntryBody1.addChild(factory.createText(queueEntyBody));
-        enque.addChild(subID);
-        enque.addChild(request);
-        return enque;
-    }
-
-    public static OMElement queueListElement(String key) {
-        SOAPFactory factory = OMAbstractFactory.getSOAP11Factory();
-        OMNamespace opN = factory.createOMNamespace(
-                "http://webservices.amazon.com/AWSSimpleQueueService/2005-01-01",
-                "nsQ");
-        OMElement listMyQueues = factory.createOMElement("ListMyQueues", opN);
-        OMElement subID = factory.createOMElement("SubscriptionId", opN);
-        OMElement request = factory.createOMElement("Request", opN);
-        subID.addChild(factory.createText(key));
-        listMyQueues.addChild(subID);
-        listMyQueues.addChild(request);
-        return listMyQueues;
-    }
-
-    public static OMElement read(String requiredQueueName, String key) {
-        SOAPFactory factory = OMAbstractFactory.getSOAP11Factory();
-        OMNamespace opN = factory.createOMNamespace(
-                "http://webservices.amazon.com/AWSSimpleQueueService/2005-01-01",
-                "nsQ");
-        OMElement read = factory.createOMElement("Read", opN);
-        OMElement subID = factory.createOMElement("SubscriptionId", opN);
-        OMElement request = factory.createOMElement("Request", opN);
-        OMElement queueName = factory.createOMElement("QueueName", opN);
-        //OMElement queueID = factory.createOMElement("QueueId",opN);
-        OMElement readCount = factory.createOMElement("ReadCount", opN);
-        request.addChild(queueName);
-        //request.addChild(queueID);
-        request.addChild(readCount);
-        subID.addChild(factory.createText(key));
-        queueName.addChild(factory.createText(requiredQueueName));
-        //queueID.addChild(factory.createText(queueIden));
-        readCount.addChild(factory.createText("25"));
-        read.addChild(subID);
-        read.addChild(request);
-        return read;
-    }
-}
+/*
+* Copyright 2004,2005 The Apache Software Foundation.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+*      http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package sample.amazon.amazonSimpleQueueService;
+
+import org.apache.axis2.om.OMAbstractFactory;
+import org.apache.axis2.om.OMElement;
+import org.apache.axis2.om.OMNamespace;
+import org.apache.axis2.soap.SOAPFactory;
+
+/**
+ * This will create the OMElement needed to be used in invokeNonBlocking() method
+ * OMElements are created for CreateQueueu, ListMyQueues, Read, and Enqueue operations
+ *
+ * @author Saminda Abeyruwan <sa...@opensource.lk>
+ */
+public class OMElementCreator {
+    public static OMElement creatQueueElement(String createQueueElement,
+                                              String key) {
+        SOAPFactory factory = OMAbstractFactory.getSOAP11Factory();
+        OMNamespace opN = factory.createOMNamespace(
+                "http://webservices.amazon.com/AWSSimpleQueueService/2005-01-01",
+                "nsQ");
+        OMElement createQueue = factory.createOMElement("CreateQueue", opN);
+        OMElement subID = factory.createOMElement("SubscriptionId", opN);
+        OMElement request = factory.createOMElement("Request", opN);
+        OMElement queueName = factory.createOMElement("QueueName", opN);
+        OMElement readLockTimeOutSeconds = factory.createOMElement(
+                "ReadLockTimeoutSeconds", opN);
+        request.addChild(queueName);
+        request.addChild(readLockTimeOutSeconds);
+        subID.addChild(factory.createText(key));
+        queueName.addChild(factory.createText(createQueueElement));
+        readLockTimeOutSeconds.addChild(factory.createText("10"));
+        createQueue.addChild(subID);
+        createQueue.addChild(request);
+        return createQueue;
+    }
+
+    public static OMElement deleteQueueElement(String deleteQueueName,
+                                               String key) {
+        SOAPFactory factory = OMAbstractFactory.getSOAP11Factory();
+        OMNamespace opN = factory.createOMNamespace(
+                "http://webservices.amazon.com/AWSSimpleQueueService/2005-01-01",
+                "nsQ");
+        OMElement enque = factory.createOMElement("DeleteQueue", opN);
+        OMElement subID = factory.createOMElement("SubscriptionId", opN);
+        OMElement request = factory.createOMElement("Request", opN);
+        OMElement queueName = factory.createOMElement("QueueName", opN);
+        //OMElement queueID = factory.createOMElement("QueueId",opN);
+        request.addChild(queueName);
+        //request.addChild(queueID);
+        subID.addChild(factory.createText(key));
+        queueName.addChild(factory.createText(deleteQueueName));
+        //queueID.addChild(factory.createText(queueIden));
+        enque.addChild(subID);
+        enque.addChild(request);
+        return enque;
+    }
+
+    public static OMElement enqueueElement(String queueEntyBody,
+                                           String queueIden,
+                                           String key) {
+        SOAPFactory factory = OMAbstractFactory.getSOAP11Factory();
+        OMNamespace opN = factory.createOMNamespace(
+                "http://webservices.amazon.com/AWSSimpleQueueService/2005-01-01",
+                "nsQ");
+        OMElement enque = factory.createOMElement("Enqueue", opN);
+        OMElement subID = factory.createOMElement("SubscriptionId", opN);
+        OMElement request = factory.createOMElement("Request", opN);
+        //OMElement queueName = factory.createOMElement("QueueName",opN);
+        OMElement queueID = factory.createOMElement("QueueId", opN);
+        OMElement queueEntryBodies = factory.createOMElement(
+                "QueueEntryBodies", opN);
+        OMElement queueEntryBody1 = factory.createOMElement("QueueEntryBody",
+                opN);
+        queueEntryBodies.addChild(queueEntryBody1);
+        //request.addChild(queueName);
+        request.addChild(queueID);
+        request.addChild(queueEntryBodies);
+        subID.addChild(factory.createText(key));
+        //queueName.addChild(factory.createText("Test Queue LSF "));
+        queueID.addChild(factory.createText(queueIden));
+        queueEntryBody1.addChild(factory.createText(queueEntyBody));
+        enque.addChild(subID);
+        enque.addChild(request);
+        return enque;
+    }
+
+    public static OMElement queueListElement(String key) {
+        SOAPFactory factory = OMAbstractFactory.getSOAP11Factory();
+        OMNamespace opN = factory.createOMNamespace(
+                "http://webservices.amazon.com/AWSSimpleQueueService/2005-01-01",
+                "nsQ");
+        OMElement listMyQueues = factory.createOMElement("ListMyQueues", opN);
+        OMElement subID = factory.createOMElement("SubscriptionId", opN);
+        OMElement request = factory.createOMElement("Request", opN);
+        subID.addChild(factory.createText(key));
+        listMyQueues.addChild(subID);
+        listMyQueues.addChild(request);
+        return listMyQueues;
+    }
+
+    public static OMElement read(String requiredQueueName, String key) {
+        SOAPFactory factory = OMAbstractFactory.getSOAP11Factory();
+        OMNamespace opN = factory.createOMNamespace(
+                "http://webservices.amazon.com/AWSSimpleQueueService/2005-01-01",
+                "nsQ");
+        OMElement read = factory.createOMElement("Read", opN);
+        OMElement subID = factory.createOMElement("SubscriptionId", opN);
+        OMElement request = factory.createOMElement("Request", opN);
+        OMElement queueName = factory.createOMElement("QueueName", opN);
+        //OMElement queueID = factory.createOMElement("QueueId",opN);
+        OMElement readCount = factory.createOMElement("ReadCount", opN);
+        request.addChild(queueName);
+        //request.addChild(queueID);
+        request.addChild(readCount);
+        subID.addChild(factory.createText(key));
+        queueName.addChild(factory.createText(requiredQueueName));
+        //queueID.addChild(factory.createText(queueIden));
+        readCount.addChild(factory.createText("25"));
+        read.addChild(subID);
+        read.addChild(request);
+        return read;
+    }
+}

Propchange: webservices/axis2/trunk/java/modules/samples/src/sample/amazon/amazonSimpleQueueService/OMElementCreator.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: webservices/axis2/trunk/java/modules/samples/src/sample/amazon/amazonSimpleQueueService/RunGUICQ.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/samples/src/sample/amazon/amazonSimpleQueueService/RunGUICQ.java?rev=289289&r1=289288&r2=289289&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/samples/src/sample/amazon/amazonSimpleQueueService/RunGUICQ.java (original)
+++ webservices/axis2/trunk/java/modules/samples/src/sample/amazon/amazonSimpleQueueService/RunGUICQ.java Thu Sep 15 11:52:11 2005
@@ -1,28 +1,28 @@
-/*
-* Copyright 2004,2005 The Apache Software Foundation.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-*      http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package sample.amazon.amazonSimpleQueueService;
-
-
-/**
- * @author Saminda Abeyruwan <sa...@opensource.lk>
- */
-public class RunGUICQ {
-    public static void main(String[] args) {
-        AmazonSimpleQueueServiceIn queue = new AmazonSimpleQueueServiceIn();
-        queue.show();
-    }
-
-}
+/*
+* Copyright 2004,2005 The Apache Software Foundation.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+*      http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package sample.amazon.amazonSimpleQueueService;
+
+
+/**
+ * @author Saminda Abeyruwan <sa...@opensource.lk>
+ */
+public class RunGUICQ {
+    public static void main(String[] args) {
+        AmazonSimpleQueueServiceIn queue = new AmazonSimpleQueueServiceIn();
+        queue.show();
+    }
+
+}

Propchange: webservices/axis2/trunk/java/modules/samples/src/sample/amazon/amazonSimpleQueueService/RunGUICQ.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: webservices/axis2/trunk/java/modules/samples/src/sample/amazon/amazonSimpleQueueService/RunGUIRQ.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/samples/src/sample/amazon/amazonSimpleQueueService/RunGUIRQ.java?rev=289289&r1=289288&r2=289289&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/samples/src/sample/amazon/amazonSimpleQueueService/RunGUIRQ.java (original)
+++ webservices/axis2/trunk/java/modules/samples/src/sample/amazon/amazonSimpleQueueService/RunGUIRQ.java Thu Sep 15 11:52:11 2005
@@ -1,27 +1,27 @@
-/*
-* Copyright 2004,2005 The Apache Software Foundation.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-*      http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package sample.amazon.amazonSimpleQueueService;
-
-
-/**
- * @author Saminda Abeyruwan <sa...@opensource.lk>
- */
-public class RunGUIRQ {
-    public static void main(String[] args) {
-        AmazonSimpleQueueServiceOut frame = new AmazonSimpleQueueServiceOut();
-        frame.show();
-    }
-}
+/*
+* Copyright 2004,2005 The Apache Software Foundation.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+*      http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package sample.amazon.amazonSimpleQueueService;
+
+
+/**
+ * @author Saminda Abeyruwan <sa...@opensource.lk>
+ */
+public class RunGUIRQ {
+    public static void main(String[] args) {
+        AmazonSimpleQueueServiceOut frame = new AmazonSimpleQueueServiceOut();
+        frame.show();
+    }
+}

Propchange: webservices/axis2/trunk/java/modules/samples/src/sample/amazon/amazonSimpleQueueService/RunGUIRQ.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: webservices/axis2/trunk/java/modules/samples/src/sample/amazon/amazonSimpleQueueService/util/QueueManager.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/samples/src/sample/amazon/amazonSimpleQueueService/util/QueueManager.java?rev=289289&r1=289288&r2=289289&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/samples/src/sample/amazon/amazonSimpleQueueService/util/QueueManager.java (original)
+++ webservices/axis2/trunk/java/modules/samples/src/sample/amazon/amazonSimpleQueueService/util/QueueManager.java Thu Sep 15 11:52:11 2005
@@ -1,48 +1,48 @@
-package sample.amazon.amazonSimpleQueueService.util;
-
-import java.io.InputStream;
-import java.util.Properties;
-
-/*
-* Copyright 2004,2005 The Apache Software Foundation.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-*      http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*
-*
-*/
-
-public class QueueManager {
-    private static String key = null;
-
-    static {
-        Class clazz = Object.class;
-        InputStream stream = clazz.getResourceAsStream(
-                "/sample/amazon/common/conf/key.properties");
-        Properties properties = new Properties();
-        try {
-            properties.load(stream);
-            key = properties.getProperty("key");
-        } catch (Exception e) {
-           // e.printStackTrace();
-        }
-
-    }
-
-    public static String getKey() {
-        return key;
-    }
-
-    public synchronized static void setKey(String tkey) {
-        key = tkey;
-    }
-}
+package sample.amazon.amazonSimpleQueueService.util;
+
+import java.io.InputStream;
+import java.util.Properties;
+
+/*
+* Copyright 2004,2005 The Apache Software Foundation.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+*      http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*
+*
+*/
+
+public class QueueManager {
+    private static String key = null;
+
+    static {
+        Class clazz = Object.class;
+        InputStream stream = clazz.getResourceAsStream(
+                "/sample/amazon/common/conf/key.properties");
+        Properties properties = new Properties();
+        try {
+            properties.load(stream);
+            key = properties.getProperty("key");
+        } catch (Exception e) {
+           // e.printStackTrace();
+        }
+
+    }
+
+    public static String getKey() {
+        return key;
+    }
+
+    public synchronized static void setKey(String tkey) {
+        key = tkey;
+    }
+}

Propchange: webservices/axis2/trunk/java/modules/samples/src/sample/amazon/amazonSimpleQueueService/util/QueueManager.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: webservices/axis2/trunk/java/modules/samples/src/sample/amazon/amazonSimpleQueueService/util/RunnableCreateQueue.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/samples/src/sample/amazon/amazonSimpleQueueService/util/RunnableCreateQueue.java?rev=289289&r1=289288&r2=289289&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/samples/src/sample/amazon/amazonSimpleQueueService/util/RunnableCreateQueue.java (original)
+++ webservices/axis2/trunk/java/modules/samples/src/sample/amazon/amazonSimpleQueueService/util/RunnableCreateQueue.java Thu Sep 15 11:52:11 2005
@@ -1,88 +1,88 @@
-/*
-* Copyright 2004,2005 The Apache Software Foundation.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-*      http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package sample.amazon.amazonSimpleQueueService.util;
-
-import org.apache.axis2.AxisFault;
-import org.apache.axis2.Constants;
-import org.apache.axis2.addressing.EndpointReference;
-import org.apache.axis2.clientapi.Call;
-import org.apache.axis2.clientapi.Callback;
-import org.apache.axis2.om.OMElement;
-import sample.amazon.amazonSimpleQueueService.OMElementCreator;
-
-import javax.swing.*;
-
-/**
- * This will create the Excutable code which runs seperately of GUI interations
- *
- * @author Saminda Abeyruwan <sa...@opensource.lk>
- */
-public class RunnableCreateQueue extends QueueManager implements Runnable {
-    JTextField createQueue;
-    JTextArea result;
-    JTextField queueCode;
-    JTextField enqueue;
-//    private Log log = LogFactory.getLog(getClass());
-
-    public RunnableCreateQueue(JTextField createQueue, JTextField queueCode, JTextField enqueue,
-                               JTextArea result) {
-        this.createQueue = createQueue;
-        this.queueCode = queueCode;
-        this.enqueue = enqueue;
-        this.result = result;
-    }
-
-    public void run() {
-        if (this.createQueue.isEditable()) {
-            OMElement createQueueElement = OMElementCreator.creatQueueElement(
-                    this.createQueue.getText(), getKey());
-            this.axis2EngineRuns("CreateQueue",
-                    createQueueElement,
-                    new SimpleQueueCreateQueueCallbackHandler(this.createQueue, this.queueCode,
-                            this.enqueue, this.result));
-        }
-        if (this.enqueue.isEditable()) {
-            OMElement enqueueElement = OMElementCreator.enqueueElement(
-                    this.enqueue.getText(),
-                    this.queueCode.getText(), getKey());
-            this.axis2EngineRuns("Enqueue",
-                    enqueueElement,
-                    new SimpleQueueEnqueueCallbackHandler(this.createQueue,
-                            this.queueCode,
-                            this.enqueue,
-                            this.result));
-        }
-    }
-
-    private void axis2EngineRuns(String operation, OMElement element,
-                                 Callback specificCallbackObject) {
-        //endpoint uri is hard coded....
-        String url = "http://webservices.amazon.com/onca/soap?Service=AWSSimpleQueueService";
-        try {
-            Call call = new Call();
-            call.setTo(new EndpointReference(url));
-            call.setTransportInfo(Constants.TRANSPORT_HTTP,
-                    Constants.TRANSPORT_HTTP,
-                    false);
-            call.invokeNonBlocking(operation, element, specificCallbackObject);
-        } catch (AxisFault axisFault) {
-//            axisFault.printStackTrace();
-        } catch (Exception e) {
-//            e.printStackTrace();
-        }
-    }
-
-}
+/*
+* Copyright 2004,2005 The Apache Software Foundation.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+*      http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package sample.amazon.amazonSimpleQueueService.util;
+
+import org.apache.axis2.AxisFault;
+import org.apache.axis2.Constants;
+import org.apache.axis2.addressing.EndpointReference;
+import org.apache.axis2.clientapi.Call;
+import org.apache.axis2.clientapi.Callback;
+import org.apache.axis2.om.OMElement;
+import sample.amazon.amazonSimpleQueueService.OMElementCreator;
+
+import javax.swing.*;
+
+/**
+ * This will create the Excutable code which runs seperately of GUI interations
+ *
+ * @author Saminda Abeyruwan <sa...@opensource.lk>
+ */
+public class RunnableCreateQueue extends QueueManager implements Runnable {
+    JTextField createQueue;
+    JTextArea result;
+    JTextField queueCode;
+    JTextField enqueue;
+//    private Log log = LogFactory.getLog(getClass());
+
+    public RunnableCreateQueue(JTextField createQueue, JTextField queueCode, JTextField enqueue,
+                               JTextArea result) {
+        this.createQueue = createQueue;
+        this.queueCode = queueCode;
+        this.enqueue = enqueue;
+        this.result = result;
+    }
+
+    public void run() {
+        if (this.createQueue.isEditable()) {
+            OMElement createQueueElement = OMElementCreator.creatQueueElement(
+                    this.createQueue.getText(), getKey());
+            this.axis2EngineRuns("CreateQueue",
+                    createQueueElement,
+                    new SimpleQueueCreateQueueCallbackHandler(this.createQueue, this.queueCode,
+                            this.enqueue, this.result));
+        }
+        if (this.enqueue.isEditable()) {
+            OMElement enqueueElement = OMElementCreator.enqueueElement(
+                    this.enqueue.getText(),
+                    this.queueCode.getText(), getKey());
+            this.axis2EngineRuns("Enqueue",
+                    enqueueElement,
+                    new SimpleQueueEnqueueCallbackHandler(this.createQueue,
+                            this.queueCode,
+                            this.enqueue,
+                            this.result));
+        }
+    }
+
+    private void axis2EngineRuns(String operation, OMElement element,
+                                 Callback specificCallbackObject) {
+        //endpoint uri is hard coded....
+        String url = "http://webservices.amazon.com/onca/soap?Service=AWSSimpleQueueService";
+        try {
+            Call call = new Call();
+            call.setTo(new EndpointReference(url));
+            call.setTransportInfo(Constants.TRANSPORT_HTTP,
+                    Constants.TRANSPORT_HTTP,
+                    false);
+            call.invokeNonBlocking(operation, element, specificCallbackObject);
+        } catch (AxisFault axisFault) {
+//            axisFault.printStackTrace();
+        } catch (Exception e) {
+//            e.printStackTrace();
+        }
+    }
+
+}

Propchange: webservices/axis2/trunk/java/modules/samples/src/sample/amazon/amazonSimpleQueueService/util/RunnableCreateQueue.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: webservices/axis2/trunk/java/modules/samples/src/sample/amazon/amazonSimpleQueueService/util/RunnableDeleteQueue.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/samples/src/sample/amazon/amazonSimpleQueueService/util/RunnableDeleteQueue.java?rev=289289&r1=289288&r2=289289&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/samples/src/sample/amazon/amazonSimpleQueueService/util/RunnableDeleteQueue.java (original)
+++ webservices/axis2/trunk/java/modules/samples/src/sample/amazon/amazonSimpleQueueService/util/RunnableDeleteQueue.java Thu Sep 15 11:52:11 2005
@@ -1,76 +1,76 @@
-/*
-* Copyright 2004,2005 The Apache Software Foundation.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-*      http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package sample.amazon.amazonSimpleQueueService.util;
-
-import org.apache.axis2.AxisFault;
-import org.apache.axis2.Constants;
-import org.apache.axis2.addressing.EndpointReference;
-import org.apache.axis2.clientapi.Call;
-import org.apache.axis2.clientapi.Callback;
-import org.apache.axis2.om.OMElement;
-import sample.amazon.amazonSimpleQueueService.OMElementCreator;
-
-import javax.swing.*;
-
-/**
- * This will create the Excutable code which runs seperately of GUI interations
- *
- * @author Saminda Abeyruwan <sa...@opensource.lk>
- */
-public class RunnableDeleteQueue extends QueueManager implements Runnable {
-    JTextField createQueue;
-    JTextArea result;
-    JTextField queueCode;
-    JTextField read;
-    JButton button;
-
-    public RunnableDeleteQueue(JTextField createQueue, JTextField queueCode, JTextField read,
-                               JTextArea result, JButton button) {
-        this.createQueue = createQueue;
-        this.queueCode = queueCode;
-        this.read = read;
-        this.result = result;
-        this.button = button;
-    }
-
-    public void run() {
-        OMElement deleteQueueElement = OMElementCreator.deleteQueueElement(
-                this.createQueue.getText(), getKey());
-        this.axis2EngineRuns("DeleteQueue",
-                deleteQueueElement,
-                new SimpleQueueDeleteQueueCallbackHandler(this.result,
-                        this.button));
-    }
-
-    private void axis2EngineRuns(String operation, OMElement element,
-                                 Callback specificCallbackObject) {
-        //endpoint uri is hard coded....
-        String url = "http://webservices.amazon.com/onca/soap?Service=AWSSimpleQueueService";
-        try {
-            Call call = new Call();
-            call.setTo(new EndpointReference(url));
-            call.setTransportInfo(Constants.TRANSPORT_HTTP,
-                    Constants.TRANSPORT_HTTP,
-                    false);
-            call.invokeNonBlocking(operation, element, specificCallbackObject);
-        } catch (AxisFault axisFault) {
-            axisFault.printStackTrace();
-        } catch (Exception e) {
-            e.printStackTrace();
-        }
-    }
-
-}
+/*
+* Copyright 2004,2005 The Apache Software Foundation.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+*      http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package sample.amazon.amazonSimpleQueueService.util;
+
+import org.apache.axis2.AxisFault;
+import org.apache.axis2.Constants;
+import org.apache.axis2.addressing.EndpointReference;
+import org.apache.axis2.clientapi.Call;
+import org.apache.axis2.clientapi.Callback;
+import org.apache.axis2.om.OMElement;
+import sample.amazon.amazonSimpleQueueService.OMElementCreator;
+
+import javax.swing.*;
+
+/**
+ * This will create the Excutable code which runs seperately of GUI interations
+ *
+ * @author Saminda Abeyruwan <sa...@opensource.lk>
+ */
+public class RunnableDeleteQueue extends QueueManager implements Runnable {
+    JTextField createQueue;
+    JTextArea result;
+    JTextField queueCode;
+    JTextField read;
+    JButton button;
+
+    public RunnableDeleteQueue(JTextField createQueue, JTextField queueCode, JTextField read,
+                               JTextArea result, JButton button) {
+        this.createQueue = createQueue;
+        this.queueCode = queueCode;
+        this.read = read;
+        this.result = result;
+        this.button = button;
+    }
+
+    public void run() {
+        OMElement deleteQueueElement = OMElementCreator.deleteQueueElement(
+                this.createQueue.getText(), getKey());
+        this.axis2EngineRuns("DeleteQueue",
+                deleteQueueElement,
+                new SimpleQueueDeleteQueueCallbackHandler(this.result,
+                        this.button));
+    }
+
+    private void axis2EngineRuns(String operation, OMElement element,
+                                 Callback specificCallbackObject) {
+        //endpoint uri is hard coded....
+        String url = "http://webservices.amazon.com/onca/soap?Service=AWSSimpleQueueService";
+        try {
+            Call call = new Call();
+            call.setTo(new EndpointReference(url));
+            call.setTransportInfo(Constants.TRANSPORT_HTTP,
+                    Constants.TRANSPORT_HTTP,
+                    false);
+            call.invokeNonBlocking(operation, element, specificCallbackObject);
+        } catch (AxisFault axisFault) {
+            axisFault.printStackTrace();
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+    }
+
+}

Propchange: webservices/axis2/trunk/java/modules/samples/src/sample/amazon/amazonSimpleQueueService/util/RunnableDeleteQueue.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: webservices/axis2/trunk/java/modules/samples/src/sample/amazon/amazonSimpleQueueService/util/RunnableListMyQueues.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/samples/src/sample/amazon/amazonSimpleQueueService/util/RunnableListMyQueues.java?rev=289289&r1=289288&r2=289289&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/samples/src/sample/amazon/amazonSimpleQueueService/util/RunnableListMyQueues.java (original)
+++ webservices/axis2/trunk/java/modules/samples/src/sample/amazon/amazonSimpleQueueService/util/RunnableListMyQueues.java Thu Sep 15 11:52:11 2005
@@ -1,76 +1,76 @@
-/*
-* Copyright 2004,2005 The Apache Software Foundation.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-*      http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package sample.amazon.amazonSimpleQueueService.util;
-
-import org.apache.axis2.AxisFault;
-import org.apache.axis2.Constants;
-import org.apache.axis2.addressing.EndpointReference;
-import org.apache.axis2.clientapi.Call;
-import org.apache.axis2.clientapi.Callback;
-import org.apache.axis2.om.OMElement;
-import sample.amazon.amazonSimpleQueueService.OMElementCreator;
-
-import javax.swing.*;
-
-/**
- * This will create the Excutable code which runs seperately of GUI interations
- *
- * @author Saminda Abeyruwan <sa...@opensource.lk>
- */
-public class RunnableListMyQueues extends QueueManager implements Runnable {
-    JTextField createQueue;
-    JTextArea result;
-    JTextField queueCode;
-    JTextField read;
-    JButton button;
-
-    public RunnableListMyQueues(JTextField createQueue, JTextField queueCode, JTextField read,
-                                JTextArea result, JButton button) {
-        this.createQueue = createQueue;
-        this.queueCode = queueCode;
-        this.read = read;
-        this.result = result;
-        this.button = button;
-    }
-
-    public void run() {
-        OMElement listMyQueuesElement = OMElementCreator.queueListElement(
-                getKey());
-        this.axis2EngineRuns("ListMyQueues",
-                listMyQueuesElement,
-                new SimpleQueueListMyQueuesCallbackHandler(this.createQueue, this.queueCode,
-                        this.read, this.result, this.button));
-    }
-
-    private void axis2EngineRuns(String operation, OMElement element,
-                                 Callback specificCallbackObject) {
-        //endpoint uri is hard coded....
-        String url = "http://webservices.amazon.com/onca/soap?Service=AWSSimpleQueueService";
-        try {
-            Call call = new Call();
-            call.setTo(new EndpointReference(url));
-            call.setTransportInfo(Constants.TRANSPORT_HTTP,
-                    Constants.TRANSPORT_HTTP,
-                    false);
-            call.invokeNonBlocking(operation, element, specificCallbackObject);
-        } catch (AxisFault axisFault) {
-            axisFault.printStackTrace();
-        } catch (Exception e) {
-            e.printStackTrace();
-        }
-    }
-
-}
+/*
+* Copyright 2004,2005 The Apache Software Foundation.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+*      http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package sample.amazon.amazonSimpleQueueService.util;
+
+import org.apache.axis2.AxisFault;
+import org.apache.axis2.Constants;
+import org.apache.axis2.addressing.EndpointReference;
+import org.apache.axis2.clientapi.Call;
+import org.apache.axis2.clientapi.Callback;
+import org.apache.axis2.om.OMElement;
+import sample.amazon.amazonSimpleQueueService.OMElementCreator;
+
+import javax.swing.*;
+
+/**
+ * This will create the Excutable code which runs seperately of GUI interations
+ *
+ * @author Saminda Abeyruwan <sa...@opensource.lk>
+ */
+public class RunnableListMyQueues extends QueueManager implements Runnable {
+    JTextField createQueue;
+    JTextArea result;
+    JTextField queueCode;
+    JTextField read;
+    JButton button;
+
+    public RunnableListMyQueues(JTextField createQueue, JTextField queueCode, JTextField read,
+                                JTextArea result, JButton button) {
+        this.createQueue = createQueue;
+        this.queueCode = queueCode;
+        this.read = read;
+        this.result = result;
+        this.button = button;
+    }
+
+    public void run() {
+        OMElement listMyQueuesElement = OMElementCreator.queueListElement(
+                getKey());
+        this.axis2EngineRuns("ListMyQueues",
+                listMyQueuesElement,
+                new SimpleQueueListMyQueuesCallbackHandler(this.createQueue, this.queueCode,
+                        this.read, this.result, this.button));
+    }
+
+    private void axis2EngineRuns(String operation, OMElement element,
+                                 Callback specificCallbackObject) {
+        //endpoint uri is hard coded....
+        String url = "http://webservices.amazon.com/onca/soap?Service=AWSSimpleQueueService";
+        try {
+            Call call = new Call();
+            call.setTo(new EndpointReference(url));
+            call.setTransportInfo(Constants.TRANSPORT_HTTP,
+                    Constants.TRANSPORT_HTTP,
+                    false);
+            call.invokeNonBlocking(operation, element, specificCallbackObject);
+        } catch (AxisFault axisFault) {
+            axisFault.printStackTrace();
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+    }
+
+}

Propchange: webservices/axis2/trunk/java/modules/samples/src/sample/amazon/amazonSimpleQueueService/util/RunnableListMyQueues.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: webservices/axis2/trunk/java/modules/samples/src/sample/amazon/amazonSimpleQueueService/util/RunnableReadQueue.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/samples/src/sample/amazon/amazonSimpleQueueService/util/RunnableReadQueue.java?rev=289289&r1=289288&r2=289289&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/samples/src/sample/amazon/amazonSimpleQueueService/util/RunnableReadQueue.java (original)
+++ webservices/axis2/trunk/java/modules/samples/src/sample/amazon/amazonSimpleQueueService/util/RunnableReadQueue.java Thu Sep 15 11:52:11 2005
@@ -1,74 +1,74 @@
-/*
-* Copyright 2004,2005 The Apache Software Foundation.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-*      http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package sample.amazon.amazonSimpleQueueService.util;
-
-import org.apache.axis2.AxisFault;
-import org.apache.axis2.Constants;
-import org.apache.axis2.addressing.EndpointReference;
-import org.apache.axis2.clientapi.Call;
-import org.apache.axis2.clientapi.Callback;
-import org.apache.axis2.om.OMElement;
-import sample.amazon.amazonSimpleQueueService.OMElementCreator;
-
-import javax.swing.*;
-
-/**
- * This will create the Excutable code which runs seperately of GUI interations
- *
- * @author Saminda Abeyruwan <sa...@opensource.lk>
- */
-public class RunnableReadQueue extends QueueManager implements Runnable {
-    JTextField createQueue;
-    JTextArea result;
-    JTextField queueCode;
-    JTextField read;
-
-    public RunnableReadQueue(JTextField createQueue, JTextField queueCode, JTextField read,
-                             JTextArea result) {
-        this.createQueue = createQueue;
-        this.queueCode = queueCode;
-        this.read = read;
-        this.result = result;
-    }
-
-    public void run() {
-        OMElement readQueueElement = OMElementCreator.read(
-                this.createQueue.getText(), getKey());
-        this.axis2EngineRuns("Read",
-                readQueueElement,
-                new SimpleQueueReadCallbackHandler(this.queueCode,
-                        this.result));
-    }
-
-    private void axis2EngineRuns(String operation, OMElement element,
-                                 Callback specificCallbackObject) {
-        //endpoint uri is hard coded....
-        String url = "http://webservices.amazon.com/onca/soap?Service=AWSSimpleQueueService";
-        try {
-            Call call = new Call();
-            call.setTo(new EndpointReference(url));
-            call.setTransportInfo(Constants.TRANSPORT_HTTP,
-                    Constants.TRANSPORT_HTTP,
-                    false);
-            call.invokeNonBlocking(operation, element, specificCallbackObject);
-        } catch (AxisFault axisFault) {
-            axisFault.printStackTrace();
-        } catch (Exception e) {
-            e.printStackTrace();
-        }
-    }
-
-}
+/*
+* Copyright 2004,2005 The Apache Software Foundation.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+*      http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package sample.amazon.amazonSimpleQueueService.util;
+
+import org.apache.axis2.AxisFault;
+import org.apache.axis2.Constants;
+import org.apache.axis2.addressing.EndpointReference;
+import org.apache.axis2.clientapi.Call;
+import org.apache.axis2.clientapi.Callback;
+import org.apache.axis2.om.OMElement;
+import sample.amazon.amazonSimpleQueueService.OMElementCreator;
+
+import javax.swing.*;
+
+/**
+ * This will create the Excutable code which runs seperately of GUI interations
+ *
+ * @author Saminda Abeyruwan <sa...@opensource.lk>
+ */
+public class RunnableReadQueue extends QueueManager implements Runnable {
+    JTextField createQueue;
+    JTextArea result;
+    JTextField queueCode;
+    JTextField read;
+
+    public RunnableReadQueue(JTextField createQueue, JTextField queueCode, JTextField read,
+                             JTextArea result) {
+        this.createQueue = createQueue;
+        this.queueCode = queueCode;
+        this.read = read;
+        this.result = result;
+    }
+
+    public void run() {
+        OMElement readQueueElement = OMElementCreator.read(
+                this.createQueue.getText(), getKey());
+        this.axis2EngineRuns("Read",
+                readQueueElement,
+                new SimpleQueueReadCallbackHandler(this.queueCode,
+                        this.result));
+    }
+
+    private void axis2EngineRuns(String operation, OMElement element,
+                                 Callback specificCallbackObject) {
+        //endpoint uri is hard coded....
+        String url = "http://webservices.amazon.com/onca/soap?Service=AWSSimpleQueueService";
+        try {
+            Call call = new Call();
+            call.setTo(new EndpointReference(url));
+            call.setTransportInfo(Constants.TRANSPORT_HTTP,
+                    Constants.TRANSPORT_HTTP,
+                    false);
+            call.invokeNonBlocking(operation, element, specificCallbackObject);
+        } catch (AxisFault axisFault) {
+            axisFault.printStackTrace();
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+    }
+
+}

Propchange: webservices/axis2/trunk/java/modules/samples/src/sample/amazon/amazonSimpleQueueService/util/RunnableReadQueue.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: webservices/axis2/trunk/java/modules/samples/src/sample/amazon/amazonSimpleQueueService/util/SimpleQueueCreateQueueCallbackHandler.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/samples/src/sample/amazon/amazonSimpleQueueService/util/SimpleQueueCreateQueueCallbackHandler.java?rev=289289&r1=289288&r2=289289&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/samples/src/sample/amazon/amazonSimpleQueueService/util/SimpleQueueCreateQueueCallbackHandler.java (original)
+++ webservices/axis2/trunk/java/modules/samples/src/sample/amazon/amazonSimpleQueueService/util/SimpleQueueCreateQueueCallbackHandler.java Thu Sep 15 11:52:11 2005
@@ -1,106 +1,106 @@
-/*
-* Copyright 2004,2005 The Apache Software Foundation.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-*      http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package sample.amazon.amazonSimpleQueueService.util;
-
-import org.apache.axis2.clientapi.AsyncResult;
-import org.apache.axis2.clientapi.Callback;
-import org.apache.axis2.om.OMElement;
-import org.apache.axis2.om.OMNode;
-import org.apache.axis2.soap.SOAPBody;
-
-import javax.swing.*;
-import java.util.Iterator;
-
-/**
- * Callback class which deals with the outcome of the operation
- *
- * @author Saminda Abeyruwan <sa...@opensource.lk>
- */
-public class SimpleQueueCreateQueueCallbackHandler extends Callback {
-    private static String returnString = "";
-    private JTextField createQueue;
-    private JTextArea result;
-    private JTextField queueCode;
-    private JTextField enqueue;
-
-    public SimpleQueueCreateQueueCallbackHandler() {
-    }//defaultConstructor
-
-    public SimpleQueueCreateQueueCallbackHandler(JTextField createQueue,
-                                                 JTextField queueCode,
-                                                 JTextField enqueue,
-                                                 JTextArea result) {
-        super();
-        this.createQueue = createQueue;
-        this.queueCode = queueCode;
-        this.enqueue = enqueue;
-        this.result = result;
-    }
-
-    public void onComplete(AsyncResult result) {
-        SOAPBody body = result.getResponseEnvelope().getBody();
-        getResults(body);
-    }
-
-    public void reportError(Exception e) {
-
-    }
-
-    private boolean getResults(OMElement element) {
-        Iterator iterator = element.getChildren();
-        while (iterator.hasNext()) {
-            OMNode omNode = (OMNode) iterator.next();
-            if (omNode.getType() == OMNode.ELEMENT_NODE) {
-                OMElement omElement = (OMElement) omNode;
-                if ((omElement.getLocalName().equals("Status"))
-                        || (omElement.getLocalName().equals("QueueId"))) {
-                    this.getText(omElement);
-                } else {
-                    getResults(omElement);
-                }
-            }
-        }
-        return false;
-    }
-
-    public static String getReturnString() {
-        return returnString;
-    }
-
-    private void getText(OMElement element) {
-        if (element.getLocalName().equals("Status")) {
-            this.result.setText(element.getText() + ".......");
-            if (element.getText().equals("Success")) {
-                this.enqueue.setEditable(true);
-                returnString = returnString +
-                        "Successfully Added the new Queue.." +
-                        "[" + this.createQueue.getText() + "]" + "\n";
-                this.result.setText(returnString);
-            }
-            if (element.getText().equals("Warnings")) {
-                this.enqueue.setEditable(true);
-                this.createQueue.setEditable(false);
-                returnString = returnString + "Enque the existing queue.." +
-                        "[" + this.createQueue.getText() + "]" +
-                        "..Allow Enquring data";
-                this.result.setText(returnString);
-            }
-        }
-        if (element.getLocalName().equals("QueueId")) {
-            this.queueCode.setText(element.getText());
-        }
-    }
+/*
+* Copyright 2004,2005 The Apache Software Foundation.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+*      http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package sample.amazon.amazonSimpleQueueService.util;
+
+import org.apache.axis2.clientapi.AsyncResult;
+import org.apache.axis2.clientapi.Callback;
+import org.apache.axis2.om.OMElement;
+import org.apache.axis2.om.OMNode;
+import org.apache.axis2.soap.SOAPBody;
+
+import javax.swing.*;
+import java.util.Iterator;
+
+/**
+ * Callback class which deals with the outcome of the operation
+ *
+ * @author Saminda Abeyruwan <sa...@opensource.lk>
+ */
+public class SimpleQueueCreateQueueCallbackHandler extends Callback {
+    private static String returnString = "";
+    private JTextField createQueue;
+    private JTextArea result;
+    private JTextField queueCode;
+    private JTextField enqueue;
+
+    public SimpleQueueCreateQueueCallbackHandler() {
+    }//defaultConstructor
+
+    public SimpleQueueCreateQueueCallbackHandler(JTextField createQueue,
+                                                 JTextField queueCode,
+                                                 JTextField enqueue,
+                                                 JTextArea result) {
+        super();
+        this.createQueue = createQueue;
+        this.queueCode = queueCode;
+        this.enqueue = enqueue;
+        this.result = result;
+    }
+
+    public void onComplete(AsyncResult result) {
+        SOAPBody body = result.getResponseEnvelope().getBody();
+        getResults(body);
+    }
+
+    public void reportError(Exception e) {
+
+    }
+
+    private boolean getResults(OMElement element) {
+        Iterator iterator = element.getChildren();
+        while (iterator.hasNext()) {
+            OMNode omNode = (OMNode) iterator.next();
+            if (omNode.getType() == OMNode.ELEMENT_NODE) {
+                OMElement omElement = (OMElement) omNode;
+                if ((omElement.getLocalName().equals("Status"))
+                        || (omElement.getLocalName().equals("QueueId"))) {
+                    this.getText(omElement);
+                } else {
+                    getResults(omElement);
+                }
+            }
+        }
+        return false;
+    }
+
+    public static String getReturnString() {
+        return returnString;
+    }
+
+    private void getText(OMElement element) {
+        if (element.getLocalName().equals("Status")) {
+            this.result.setText(element.getText() + ".......");
+            if (element.getText().equals("Success")) {
+                this.enqueue.setEditable(true);
+                returnString = returnString +
+                        "Successfully Added the new Queue.." +
+                        "[" + this.createQueue.getText() + "]" + "\n";
+                this.result.setText(returnString);
+            }
+            if (element.getText().equals("Warnings")) {
+                this.enqueue.setEditable(true);
+                this.createQueue.setEditable(false);
+                returnString = returnString + "Enque the existing queue.." +
+                        "[" + this.createQueue.getText() + "]" +
+                        "..Allow Enquring data";
+                this.result.setText(returnString);
+            }
+        }
+        if (element.getLocalName().equals("QueueId")) {
+            this.queueCode.setText(element.getText());
+        }
+    }
 }

Propchange: webservices/axis2/trunk/java/modules/samples/src/sample/amazon/amazonSimpleQueueService/util/SimpleQueueCreateQueueCallbackHandler.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: webservices/axis2/trunk/java/modules/samples/src/sample/amazon/amazonSimpleQueueService/util/SimpleQueueDeleteQueueCallbackHandler.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/samples/src/sample/amazon/amazonSimpleQueueService/util/SimpleQueueDeleteQueueCallbackHandler.java?rev=289289&r1=289288&r2=289289&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/samples/src/sample/amazon/amazonSimpleQueueService/util/SimpleQueueDeleteQueueCallbackHandler.java (original)
+++ webservices/axis2/trunk/java/modules/samples/src/sample/amazon/amazonSimpleQueueService/util/SimpleQueueDeleteQueueCallbackHandler.java Thu Sep 15 11:52:11 2005
@@ -1,81 +1,81 @@
-/*
-* Copyright 2004,2005 The Apache Software Foundation.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-*      http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package sample.amazon.amazonSimpleQueueService.util;
-
-import org.apache.axis2.clientapi.AsyncResult;
-import org.apache.axis2.clientapi.Callback;
-import org.apache.axis2.om.OMElement;
-import org.apache.axis2.om.OMNode;
-import org.apache.axis2.soap.SOAPBody;
-
-import javax.swing.*;
-import java.util.Iterator;
-
-/**
- * Callback class which deals with the outcome of the operation
- *
- * @author Saminda Abeyruwan <sa...@opensource.lk>
- */
-public class SimpleQueueDeleteQueueCallbackHandler extends Callback {
-    private String returnString = "";
-    JTextArea results;
-    JButton button;
-
-    public SimpleQueueDeleteQueueCallbackHandler() {
-    }//defalut handler
-
-    public SimpleQueueDeleteQueueCallbackHandler(JTextArea results,
-                                                 JButton button) {
-        super();
-        this.results = results;
-        this.button = button;
-    }
-
-    public void onComplete(AsyncResult result) {
-        SOAPBody body = result.getResponseEnvelope().getBody();
-        this.getQueueDeleteStatus(body);
-        this.button.setText("Delete Queue");
-    }
-
-    public void reportError(Exception e) {
-
-    }
-
-    private void getQueueDeleteStatus(OMElement element) {
-        Iterator iterator = element.getChildren();
-        while (iterator.hasNext()) {
-            OMNode omNode = (OMNode) iterator.next();
-            if (omNode.getType() == OMNode.ELEMENT_NODE) {
-                OMElement omElement = (OMElement) omNode;
-                if (omElement.getLocalName().equals("Status")) {
-                    this.readTheQueue(omElement);
-                } else {
-                    getQueueDeleteStatus(omElement);
-                }
-            }
-        }
-    }
-
-    private void readTheQueue(OMElement element) {
-        if (element.getText().equals("Errors")) {
-            returnString += "Queue can't be deleted, it has to be dequeued first" +
-                    "\n";
-        } else {
-            returnString += "Queue is deleted" + "\n";
-        }
-        this.results.setText(returnString + "\n");
-    }
-}
+/*
+* Copyright 2004,2005 The Apache Software Foundation.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+*      http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package sample.amazon.amazonSimpleQueueService.util;
+
+import org.apache.axis2.clientapi.AsyncResult;
+import org.apache.axis2.clientapi.Callback;
+import org.apache.axis2.om.OMElement;
+import org.apache.axis2.om.OMNode;
+import org.apache.axis2.soap.SOAPBody;
+
+import javax.swing.*;
+import java.util.Iterator;
+
+/**
+ * Callback class which deals with the outcome of the operation
+ *
+ * @author Saminda Abeyruwan <sa...@opensource.lk>
+ */
+public class SimpleQueueDeleteQueueCallbackHandler extends Callback {
+    private String returnString = "";
+    JTextArea results;
+    JButton button;
+
+    public SimpleQueueDeleteQueueCallbackHandler() {
+    }//defalut handler
+
+    public SimpleQueueDeleteQueueCallbackHandler(JTextArea results,
+                                                 JButton button) {
+        super();
+        this.results = results;
+        this.button = button;
+    }
+
+    public void onComplete(AsyncResult result) {
+        SOAPBody body = result.getResponseEnvelope().getBody();
+        this.getQueueDeleteStatus(body);
+        this.button.setText("Delete Queue");
+    }
+
+    public void reportError(Exception e) {
+
+    }
+
+    private void getQueueDeleteStatus(OMElement element) {
+        Iterator iterator = element.getChildren();
+        while (iterator.hasNext()) {
+            OMNode omNode = (OMNode) iterator.next();
+            if (omNode.getType() == OMNode.ELEMENT_NODE) {
+                OMElement omElement = (OMElement) omNode;
+                if (omElement.getLocalName().equals("Status")) {
+                    this.readTheQueue(omElement);
+                } else {
+                    getQueueDeleteStatus(omElement);
+                }
+            }
+        }
+    }
+
+    private void readTheQueue(OMElement element) {
+        if (element.getText().equals("Errors")) {
+            returnString += "Queue can't be deleted, it has to be dequeued first" +
+                    "\n";
+        } else {
+            returnString += "Queue is deleted" + "\n";
+        }
+        this.results.setText(returnString + "\n");
+    }
+}

Propchange: webservices/axis2/trunk/java/modules/samples/src/sample/amazon/amazonSimpleQueueService/util/SimpleQueueDeleteQueueCallbackHandler.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: webservices/axis2/trunk/java/modules/samples/src/sample/amazon/amazonSimpleQueueService/util/SimpleQueueEnqueueCallbackHandler.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/samples/src/sample/amazon/amazonSimpleQueueService/util/SimpleQueueEnqueueCallbackHandler.java?rev=289289&r1=289288&r2=289289&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/samples/src/sample/amazon/amazonSimpleQueueService/util/SimpleQueueEnqueueCallbackHandler.java (original)
+++ webservices/axis2/trunk/java/modules/samples/src/sample/amazon/amazonSimpleQueueService/util/SimpleQueueEnqueueCallbackHandler.java Thu Sep 15 11:52:11 2005
@@ -1,96 +1,96 @@
-/*
-* Copyright 2004,2005 The Apache Software Foundation.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-*      http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package sample.amazon.amazonSimpleQueueService.util;
-
-import org.apache.axis2.clientapi.AsyncResult;
-import org.apache.axis2.clientapi.Callback;
-import org.apache.axis2.om.OMElement;
-import org.apache.axis2.om.OMNode;
-import org.apache.axis2.soap.SOAPBody;
-
-import javax.swing.*;
-import java.util.Iterator;
-
-/**
- * Callback class which deals with the outcome of the operation
- *
- * @author Saminda Abeyruwan <sa...@opensource.lk>
- */
-public class SimpleQueueEnqueueCallbackHandler extends Callback {
-    private static String returnString = "";
-    private JTextField createQueue;
-    private JTextArea result;
-    private JTextField queueCode;
-    private JTextField enqueue;
-
-    public SimpleQueueEnqueueCallbackHandler() {
-    }//defaultConstructor
-
-    public SimpleQueueEnqueueCallbackHandler(JTextField createQueue,
-                                             JTextField queueCode,
-                                             JTextField enqueue,
-                                             JTextArea result) {
-        super();
-        this.createQueue = createQueue;
-        this.queueCode = queueCode;
-        this.enqueue = enqueue;
-        this.result = result;
-    }
-
-    public void onComplete(AsyncResult result) {
-        SOAPBody body = result.getResponseEnvelope().getBody();
-        getResults(body);
-    }
-
-    public void reportError(Exception e) {
-
-    }
-
-    private boolean getResults(OMElement element) {
-        Iterator iterator = element.getChildren();
-        while (iterator.hasNext()) {
-            OMNode omNode = (OMNode) iterator.next();
-            if (omNode.getType() == OMNode.ELEMENT_NODE) {
-                OMElement omElement = (OMElement) omNode;
-                if (omElement.getLocalName().equals("Status")) {
-                    this.getText(omElement);
-                } else {
-                    getResults(omElement);
-                }
-            }
-        }
-        return false;
-    }
-
-    public static String getReturnString() {
-        return returnString;
-    }
-
-    private void getText(OMElement element) {
-        if (element.getLocalName().equals("Status")) {
-            this.result.setText(element.getText() + ".......");
-            if (element.getText().equals("Success")) {
-                returnString = returnString + "Successfully Enqueued.." +
-                        "[" + this.enqueue.getText() + "]" + "..Queue.." + "["
-                        + this.createQueue.getText()
-                        + "]"
-                        + "\n";
-                this.result.setText(returnString);
-                this.enqueue.setText("");
-            }
-        }
-    }
-}
+/*
+* Copyright 2004,2005 The Apache Software Foundation.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+*      http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package sample.amazon.amazonSimpleQueueService.util;
+
+import org.apache.axis2.clientapi.AsyncResult;
+import org.apache.axis2.clientapi.Callback;
+import org.apache.axis2.om.OMElement;
+import org.apache.axis2.om.OMNode;
+import org.apache.axis2.soap.SOAPBody;
+
+import javax.swing.*;
+import java.util.Iterator;
+
+/**
+ * Callback class which deals with the outcome of the operation
+ *
+ * @author Saminda Abeyruwan <sa...@opensource.lk>
+ */
+public class SimpleQueueEnqueueCallbackHandler extends Callback {
+    private static String returnString = "";
+    private JTextField createQueue;
+    private JTextArea result;
+    private JTextField queueCode;
+    private JTextField enqueue;
+
+    public SimpleQueueEnqueueCallbackHandler() {
+    }//defaultConstructor
+
+    public SimpleQueueEnqueueCallbackHandler(JTextField createQueue,
+                                             JTextField queueCode,
+                                             JTextField enqueue,
+                                             JTextArea result) {
+        super();
+        this.createQueue = createQueue;
+        this.queueCode = queueCode;
+        this.enqueue = enqueue;
+        this.result = result;
+    }
+
+    public void onComplete(AsyncResult result) {
+        SOAPBody body = result.getResponseEnvelope().getBody();
+        getResults(body);
+    }
+
+    public void reportError(Exception e) {
+
+    }
+
+    private boolean getResults(OMElement element) {
+        Iterator iterator = element.getChildren();
+        while (iterator.hasNext()) {
+            OMNode omNode = (OMNode) iterator.next();
+            if (omNode.getType() == OMNode.ELEMENT_NODE) {
+                OMElement omElement = (OMElement) omNode;
+                if (omElement.getLocalName().equals("Status")) {
+                    this.getText(omElement);
+                } else {
+                    getResults(omElement);
+                }
+            }
+        }
+        return false;
+    }
+
+    public static String getReturnString() {
+        return returnString;
+    }
+
+    private void getText(OMElement element) {
+        if (element.getLocalName().equals("Status")) {
+            this.result.setText(element.getText() + ".......");
+            if (element.getText().equals("Success")) {
+                returnString = returnString + "Successfully Enqueued.." +
+                        "[" + this.enqueue.getText() + "]" + "..Queue.." + "["
+                        + this.createQueue.getText()
+                        + "]"
+                        + "\n";
+                this.result.setText(returnString);
+                this.enqueue.setText("");
+            }
+        }
+    }
+}

Propchange: webservices/axis2/trunk/java/modules/samples/src/sample/amazon/amazonSimpleQueueService/util/SimpleQueueEnqueueCallbackHandler.java
------------------------------------------------------------------------------
    svn:eol-style = native