axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sa...@apache.org
Subject svn commit: r469124 [1/2] - in /webservices/axis2/branches/java/1_1/modules/samples/pojo/src/sample/addressbook: adbclient/ rpcclient/ stub/
Date Mon, 30 Oct 2006 11:27:53 GMT
Author: sanka
Date: Mon Oct 30 03:27:49 2006
New Revision: 469124

URL: http://svn.apache.org/viewvc?view=rev&rev=469124
Log:
Added RPCClient and the ADBClient for the POJO sample


Added:
    webservices/axis2/branches/java/1_1/modules/samples/pojo/src/sample/addressbook/adbclient/AddressBookADBClient.java
    webservices/axis2/branches/java/1_1/modules/samples/pojo/src/sample/addressbook/stub/AddressBookServiceCallbackHandler.java
    webservices/axis2/branches/java/1_1/modules/samples/pojo/src/sample/addressbook/stub/AddressBookServiceStub.java
Modified:
    webservices/axis2/branches/java/1_1/modules/samples/pojo/src/sample/addressbook/rpcclient/AddressBookClient.java

Added: webservices/axis2/branches/java/1_1/modules/samples/pojo/src/sample/addressbook/adbclient/AddressBookADBClient.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/1_1/modules/samples/pojo/src/sample/addressbook/adbclient/AddressBookADBClient.java?view=auto&rev=469124
==============================================================================
--- webservices/axis2/branches/java/1_1/modules/samples/pojo/src/sample/addressbook/adbclient/AddressBookADBClient.java
(added)
+++ webservices/axis2/branches/java/1_1/modules/samples/pojo/src/sample/addressbook/adbclient/AddressBookADBClient.java
Mon Oct 30 03:27:49 2006
@@ -0,0 +1,72 @@
+/*
+ * Copyright 2001-2004 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.addressbook.adbclient;
+
+import sample.addressbook.stub.AddressBookServiceStub;
+import sample.addressbook.stub.AddressBookServiceStub.AddEntry;
+import sample.addressbook.stub.AddressBookServiceStub.Entry;
+import sample.addressbook.stub.AddressBookServiceStub.FindEntry;
+import sample.addressbook.stub.AddressBookServiceStub.FindEntryResponse;
+
+
+public class AddressBookADBClient {
+
+    private static String URL = "http://127.0.0.1:6060/axis2/services/AddressBookService";
+
+    public static void main(String[] args) {
+
+        try {
+            AddressBookServiceStub stub;
+
+            if (args != null && args.length != 0) {
+                stub = new AddressBookServiceStub(args[0]);
+                
+            } else {
+                stub = new AddressBookServiceStub(URL);
+            }
+            
+            AddEntry addEntry = new AddEntry();
+            Entry entry = new Entry();
+            
+            entry.setName("Abby Cadabby");
+            entry.setStreet("Sesame Street");
+            entry.setCity("Sesame City");
+            entry.setState("Sesame State");
+            entry.setPostalCode("11111");
+            
+            addEntry.setEntry(entry);
+            stub.addEntry(addEntry);
+            
+            FindEntry findEntry = new FindEntry();
+            
+            findEntry.setName("Abby Cadabby");
+            
+            FindEntryResponse response = stub.findEntry(findEntry);
+            Entry responseEntry = response.get_return();
+            
+            System.out.println("Name   :" + responseEntry.getName());
+            System.out.println("Street :" + responseEntry.getStreet());
+            System.out.println("City   :" + responseEntry.getCity());
+            System.out.println("State  :" + responseEntry.getState());
+            System.out.println("Postal Code :" + responseEntry.getPostalCode());
+
+        } catch (Exception ex) {
+            ex.printStackTrace();
+
+        }
+    }
+
+}

Modified: webservices/axis2/branches/java/1_1/modules/samples/pojo/src/sample/addressbook/rpcclient/AddressBookClient.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/1_1/modules/samples/pojo/src/sample/addressbook/rpcclient/AddressBookClient.java?view=diff&rev=469124&r1=469123&r2=469124
==============================================================================
--- webservices/axis2/branches/java/1_1/modules/samples/pojo/src/sample/addressbook/rpcclient/AddressBookClient.java
(original)
+++ webservices/axis2/branches/java/1_1/modules/samples/pojo/src/sample/addressbook/rpcclient/AddressBookClient.java
Mon Oct 30 03:27:49 2006
@@ -35,7 +35,7 @@
         Options options = serviceClient.getOptions();
 
         EndpointReference targetEPR = new EndpointReference(
-                "http://127.0.0.1:8080/axis2/services/AdressBookService");
+                "http://127.0.0.1:8080/axis2/services/AddressBookService");
         options.setTo(targetEPR);
 
         // /////////////////////////////////////////////////////////////////////
@@ -45,7 +45,7 @@
          */
 
         // QName of the target method 
-        QName opAddEntry = new QName("http://address_book_service/xsd", "addEntry");
+        QName opAddEntry = new QName("http://service.addressbook.sample/xsd", "addEntry");
 
         /*
          * Constructing a new Entry
@@ -74,7 +74,7 @@
          */
         
         // QName of the method to invoke 
-        QName opFindEntry = new QName("http://address_book_service/xsd", "findEntry");
+        QName opFindEntry = new QName("http://service.addressbook.sample/xsd", "findEntry");
 
         //
         String name = "Abby Cadabby";

Added: webservices/axis2/branches/java/1_1/modules/samples/pojo/src/sample/addressbook/stub/AddressBookServiceCallbackHandler.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/1_1/modules/samples/pojo/src/sample/addressbook/stub/AddressBookServiceCallbackHandler.java?view=auto&rev=469124
==============================================================================
--- webservices/axis2/branches/java/1_1/modules/samples/pojo/src/sample/addressbook/stub/AddressBookServiceCallbackHandler.java
(added)
+++ webservices/axis2/branches/java/1_1/modules/samples/pojo/src/sample/addressbook/stub/AddressBookServiceCallbackHandler.java
Mon Oct 30 03:27:49 2006
@@ -0,0 +1,79 @@
+
+    /**
+     * AddressBookServiceCallbackHandler.java
+     *
+     * This file was auto-generated from WSDL
+     * by the Apache Axis2 version: #axisVersion# #today#
+     */
+    package sample.addressbook.stub;
+
+    /**
+     *  AddressBookServiceCallbackHandler Callback class, Users can extend this class and
implement
+     *  their own receiveResult and receiveError methods.
+     */
+    public abstract class AddressBookServiceCallbackHandler{
+
+
+
+    protected Object clientData;
+
+    /**
+    * User can pass in any object that needs to be accessed once the NonBlocking
+    * Web service call is finished and appropriate method of this CallBack is called.
+    * @param clientData Object mechanism by which the user can pass in user data
+    * that will be avilable at the time this callback is called.
+    */
+    public AddressBookServiceCallbackHandler(Object clientData){
+        this.clientData = clientData;
+    }
+
+    /**
+    * Please use this constructor if you don't want to set any clientData
+    */
+    public AddressBookServiceCallbackHandler(){
+        this.clientData = null;
+    }
+
+    /**
+     * Get the client data
+     */
+
+     public Object getClientData() {
+        return clientData;
+     }
+
+        
+           /**
+            * auto generated Axis2 call back method for addEntry method
+            *
+            */
+           public void receiveResultaddEntry(
+                    ) {
+           }
+
+          /**
+           * auto generated Axis2 Error handler
+           *
+           */
+            public void receiveErroraddEntry(java.lang.Exception e) {
+            }
+                
+           /**
+            * auto generated Axis2 call back method for findEntry method
+            *
+            */
+           public void receiveResultfindEntry(
+                    sample.addressbook.stub.AddressBookServiceStub.FindEntryResponse param3)
{
+           }
+
+          /**
+           * auto generated Axis2 Error handler
+           *
+           */
+            public void receiveErrorfindEntry(java.lang.Exception e) {
+            }
+                
+
+
+    }
+    
\ No newline at end of file



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


Mime
View raw message