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 sa...@apache.org on 2007/04/06 06:59:32 UTC

svn commit: r526055 - /webservices/axis2/branches/java/1_2/xdocs/@axis2_version_dir@/migration.html

Author: sandakith
Date: Thu Apr  5 21:59:31 2007
New Revision: 526055

URL: http://svn.apache.org/viewvc?view=rev&rev=526055
Log:
doc fix for AXIS2-2307

Modified:
    webservices/axis2/branches/java/1_2/xdocs/@axis2_version_dir@/migration.html

Modified: webservices/axis2/branches/java/1_2/xdocs/@axis2_version_dir@/migration.html
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/1_2/xdocs/%40axis2_version_dir%40/migration.html?view=diff&rev=526055&r1=526054&r2=526055
==============================================================================
--- webservices/axis2/branches/java/1_2/xdocs/@axis2_version_dir@/migration.html (original)
+++ webservices/axis2/branches/java/1_2/xdocs/@axis2_version_dir@/migration.html Thu Apr  5 21:59:31 2007
@@ -66,22 +66,27 @@
 <p>Let's look at a simple example of echoing at client API.</p>
 
 <p><b>Axis 1.x</b></p>
-<pre>import ...
+<pre>
+import org.apache.axis.client.Call;
+import org.apache.axis.client.Service;
+import javax.xml.namespace.QName;
+   
 public class TestClient {
-        public static void main(String [] args) {
-                try {
-                        String endpoint = ... ;
-                        Service axisService = new Service();
-                        Call call = (Call) axisService.createCall();
-                        call.setTargetEndpointAddress( new java.net.URL(endpoint) );
-                        call.setOperationName(new QName("http://soapinterop.org/", echoString"));
-                        String ret = (String) call.invoke( new Object[] { "Hello!" } );
-                        System.out.println("Sent 'Hello!', got '" + ret + "'");
-                } catch (Exception e) {
-                        System.err.println(e.toString());
-                }
-        }
-}</pre>
+  public static void main(String [] args) {
+    try {
+      String endpoint ="http://ws.apache.org:5049/axis/services/echo";
+      Service  service = new Service();
+      Call     call    = (Call) service.createCall();
+      call.setTargetEndpointAddress( new java.net.URL(endpoint) );
+      call.setOperationName(new QName("http://soapinterop.org/", echoString"));
+      String ret = (String) call.invoke( new Object[] { "Hello!" } );
+      System.out.println("Sent 'Hello!', got '" + ret + "'");
+    } catch (Exception e) {
+       System.err.println(e.toString());
+    }
+  }
+}
+</pre>
 
 <p><b>Axis 2</b></p>
 <pre>
@@ -101,8 +106,9 @@
 	public static void main(String[] args) {
 		try {
 			OMFactory fac = OMAbstractFactory.getOMFactory();
-			OMNamespace omNs = fac.createOMNamespace("schema namespace", "ns1");
-			OMElement payload = fac.createOMElement("echo", omNs);
+			OMNamespace ns = fac.createOMNamespace("http://soapinterop.org/", "ns1");
+			OMElement payload = fac.createOMElement("echoString", ns);
+			payload.setText("Hello!");
 			Options options = new Options();
 			ServiceClient client = new ServiceClient();
 			options.setTo(targetEPR);



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