cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From m...@apache.org
Subject svn commit: r470735 - /incubator/cxf/trunk/distribution/src/main/release/samples/soap12/src/demo/hw/client/Get.java
Date Fri, 03 Nov 2006 09:29:04 GMT
Author: mmao
Date: Fri Nov  3 01:29:03 2006
New Revision: 470735

URL: http://svn.apache.org/viewvc?view=rev&rev=470735
Log:
* Update the soap12 demo to show the new feature of HTTP GET 

Modified:
    incubator/cxf/trunk/distribution/src/main/release/samples/soap12/src/demo/hw/client/Get.java

Modified: incubator/cxf/trunk/distribution/src/main/release/samples/soap12/src/demo/hw/client/Get.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/distribution/src/main/release/samples/soap12/src/demo/hw/client/Get.java?view=diff&rev=470735&r1=470734&r2=470735
==============================================================================
--- incubator/cxf/trunk/distribution/src/main/release/samples/soap12/src/demo/hw/client/Get.java
(original)
+++ incubator/cxf/trunk/distribution/src/main/release/samples/soap12/src/demo/hw/client/Get.java
Fri Nov  3 01:29:03 2006
@@ -17,7 +17,7 @@
  * under the License.
  */
 
-package org.apache.cxf.systest.soap12;
+package demo.hw.client;
 
 import java.io.ByteArrayOutputStream;
 import java.io.InputStream;
@@ -49,9 +49,26 @@
         StreamSource source = new StreamSource(in);
         printSource(source);
 
+        // Sent HTTP GET request to invoke greetMe FAULT
+        target = "http://localhost:9000/SoapContext/SoapPort/greetMe/me/CXF";
+        url = new URL(target);
+        httpConnection = (HttpURLConnection) url.openConnection();
+        httpConnection.connect();
+        System.out.println("Invoking server through HTTP GET to invoke greetMe");
+
+        try {
+            in = httpConnection.getInputStream();
+            source = new StreamSource(in);
+            printSource(source);
+        } catch (Exception e) {
+            System.err.println("GreetMe Fault: " + e.getMessage());
+        }
+        InputStream err = httpConnection.getErrorStream();
+        source = new StreamSource(err);
+        printSource(source);
 
         // Sent HTTP GET request to invoke greetMe
-        target = "http://localhost:9000/SoapContext/SoapPort/greetMe/me/CXF";
+        target = "http://localhost:9000/SoapContext/SoapPort/greetMe/requestType/CXF";
         url = new URL(target);
         httpConnection = (HttpURLConnection) url.openConnection();
         httpConnection.connect();
@@ -73,7 +90,7 @@
         } catch (Exception e) {
             System.out.println("PingMe fault raised");
         }
-        InputStream err = httpConnection.getErrorStream();
+        err = httpConnection.getErrorStream();
         source = new StreamSource(err);
         printSource(source);
     }



Mime
View raw message