empire-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From doeb...@apache.org
Subject svn commit: r755431 - in /incubator/empire-db/trunk/empire-db-examples/empire-db-example-cxf/src/main/java/org/apache/empire/samples/cxf/wssample: client/ common/ server/
Date Tue, 17 Mar 2009 22:29:05 GMT
Author: doebele
Date: Tue Mar 17 22:29:04 2009
New Revision: 755431

URL: http://svn.apache.org/viewvc?rev=755431&view=rev
Log:
EMPIREDB-36

Added:
    incubator/empire-db/trunk/empire-db-examples/empire-db-example-cxf/src/main/java/org/apache/empire/samples/cxf/wssample/client/EmployeeServiceClient.java
  (contents, props changed)
      - copied, changed from r755409, incubator/empire-db/trunk/empire-db-examples/empire-db-example-cxf/src/main/java/org/apache/empire/samples/cxf/wssample/client/EmployeeManagementProxy.java
    incubator/empire-db/trunk/empire-db-examples/empire-db-example-cxf/src/main/java/org/apache/empire/samples/cxf/wssample/common/EmployeeService.java
  (contents, props changed)
      - copied, changed from r755409, incubator/empire-db/trunk/empire-db-examples/empire-db-example-cxf/src/main/java/org/apache/empire/samples/cxf/wssample/common/EmployeeManagementInterface.java
    incubator/empire-db/trunk/empire-db-examples/empire-db-example-cxf/src/main/java/org/apache/empire/samples/cxf/wssample/server/EmployeeServiceImpl.java
  (contents, props changed)
      - copied, changed from r755409, incubator/empire-db/trunk/empire-db-examples/empire-db-example-cxf/src/main/java/org/apache/empire/samples/cxf/wssample/server/EmployeeManagementService.java
Removed:
    incubator/empire-db/trunk/empire-db-examples/empire-db-example-cxf/src/main/java/org/apache/empire/samples/cxf/wssample/client/EmployeeManagementProxy.java
    incubator/empire-db/trunk/empire-db-examples/empire-db-example-cxf/src/main/java/org/apache/empire/samples/cxf/wssample/common/EmployeeManagementInterface.java
    incubator/empire-db/trunk/empire-db-examples/empire-db-example-cxf/src/main/java/org/apache/empire/samples/cxf/wssample/server/EmployeeManagementService.java
Modified:
    incubator/empire-db/trunk/empire-db-examples/empire-db-example-cxf/src/main/java/org/apache/empire/samples/cxf/wssample/client/ClientGUI.java
    incubator/empire-db/trunk/empire-db-examples/empire-db-example-cxf/src/main/java/org/apache/empire/samples/cxf/wssample/client/RunClient.java
    incubator/empire-db/trunk/empire-db-examples/empire-db-example-cxf/src/main/java/org/apache/empire/samples/cxf/wssample/server/ServerControl.java

Modified: incubator/empire-db/trunk/empire-db-examples/empire-db-example-cxf/src/main/java/org/apache/empire/samples/cxf/wssample/client/ClientGUI.java
URL: http://svn.apache.org/viewvc/incubator/empire-db/trunk/empire-db-examples/empire-db-example-cxf/src/main/java/org/apache/empire/samples/cxf/wssample/client/ClientGUI.java?rev=755431&r1=755430&r2=755431&view=diff
==============================================================================
--- incubator/empire-db/trunk/empire-db-examples/empire-db-example-cxf/src/main/java/org/apache/empire/samples/cxf/wssample/client/ClientGUI.java
(original)
+++ incubator/empire-db/trunk/empire-db-examples/empire-db-example-cxf/src/main/java/org/apache/empire/samples/cxf/wssample/client/ClientGUI.java
Tue Mar 17 22:29:04 2009
@@ -43,7 +43,7 @@
 	private JPanel jContentPane = null;
 	private JButton _btnSearch = null;
 	private JTextField _txtSearchValue = null;
-	private EmployeeManagementProxy proxy = null;
+	private EmployeeServiceClient proxy = null;
 	private JList _searchResult = null;
 	private EmployeeListModel _employeeListModel = null;
 	private ClientGUI me;
@@ -190,7 +190,7 @@
 	 * 
 	 * @param prxy the proxy
 	 */
-	public ClientGUI(EmployeeManagementProxy prxy) {
+	public ClientGUI(EmployeeServiceClient prxy) {
 		super();
 		proxy = prxy;
 		try {

Copied: incubator/empire-db/trunk/empire-db-examples/empire-db-example-cxf/src/main/java/org/apache/empire/samples/cxf/wssample/client/EmployeeServiceClient.java
(from r755409, incubator/empire-db/trunk/empire-db-examples/empire-db-example-cxf/src/main/java/org/apache/empire/samples/cxf/wssample/client/EmployeeManagementProxy.java)
URL: http://svn.apache.org/viewvc/incubator/empire-db/trunk/empire-db-examples/empire-db-example-cxf/src/main/java/org/apache/empire/samples/cxf/wssample/client/EmployeeServiceClient.java?p2=incubator/empire-db/trunk/empire-db-examples/empire-db-example-cxf/src/main/java/org/apache/empire/samples/cxf/wssample/client/EmployeeServiceClient.java&p1=incubator/empire-db/trunk/empire-db-examples/empire-db-example-cxf/src/main/java/org/apache/empire/samples/cxf/wssample/client/EmployeeManagementProxy.java&r1=755409&r2=755431&rev=755431&view=diff
==============================================================================
--- incubator/empire-db/trunk/empire-db-examples/empire-db-example-cxf/src/main/java/org/apache/empire/samples/cxf/wssample/client/EmployeeManagementProxy.java
(original)
+++ incubator/empire-db/trunk/empire-db-examples/empire-db-example-cxf/src/main/java/org/apache/empire/samples/cxf/wssample/client/EmployeeServiceClient.java
Tue Mar 17 22:29:04 2009
@@ -28,50 +28,43 @@
 import org.apache.cxf.jaxws.JaxWsProxyFactoryBean;
 import org.apache.empire.samples.cxf.wssample.common.Department;
 import org.apache.empire.samples.cxf.wssample.common.Employee;
-import org.apache.empire.samples.cxf.wssample.common.EmployeeManagementInterface;
+import org.apache.empire.samples.cxf.wssample.common.EmployeeService;
 
 // The access to WebService.
-public class EmployeeManagementProxy
+public class EmployeeServiceClient
 {
-    private EmployeeManagementInterface proxy = null;
-    private String                      serviceAddress;
+    private EmployeeService service = null;
 
-    public EmployeeManagementProxy(String serviceAddress)
-    {
-        this.serviceAddress = serviceAddress;
-        init();
-    }
-
-    private void init()
+    public EmployeeServiceClient(String serviceAddress)
     {
         JaxWsProxyFactoryBean factory = new JaxWsProxyFactoryBean();
         factory.getInInterceptors().add(new LoggingInInterceptor());
         factory.getOutInterceptors().add(new LoggingOutInterceptor());
-        factory.setServiceClass(EmployeeManagementInterface.class);
+        factory.setServiceClass(EmployeeService.class);
         factory.setAddress(serviceAddress);
-        this.proxy = (EmployeeManagementInterface) factory.create();
+        this.service = (EmployeeService) factory.create();
     }
 
     public Employee createEmmployee()
     {
-        return proxy.createEmmployee();
+        return service.createEmmployee();
     }
 
     public List<Department> getDepartments()
     {
-        return proxy.getDepartments();
+        return service.getDepartments();
     }
 
     public Employee getEmmployee(int id)
     {
-        return proxy.getEmmployee(id);
+        return service.getEmmployee(id);
     }
 
     public boolean saveEmployee(Employee e)
     {
         // Employee is here a INOUT parameter, and therfore has to be placed in a Holder.
         Holder<Employee> holder = new Holder<Employee>(e);
-        boolean retVal = proxy.saveEmmployee(holder);
+        boolean retVal = service.saveEmmployee(holder);
         // In order to retrieve changes made by the webservice we copy the content to our
local variable.
         e.set(holder.value);
         return retVal;
@@ -79,17 +72,12 @@
 
     public boolean deleteEmployee(int id)
     {
-        return proxy.deleteEmmployee(id);
+        return service.deleteEmmployee(id);
     }
 
     public List<Employee> searchEmployee(Integer id, String firstName, String lastName,
Integer department)
     {
-        return proxy.searchEmmployee(id, firstName, lastName, department);
-    }
-
-    public String test()
-    {
-        return proxy.test();
+        return service.searchEmmployee(id, firstName, lastName, department);
     }
 
 }

Propchange: incubator/empire-db/trunk/empire-db-examples/empire-db-example-cxf/src/main/java/org/apache/empire/samples/cxf/wssample/client/EmployeeServiceClient.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: incubator/empire-db/trunk/empire-db-examples/empire-db-example-cxf/src/main/java/org/apache/empire/samples/cxf/wssample/client/RunClient.java
URL: http://svn.apache.org/viewvc/incubator/empire-db/trunk/empire-db-examples/empire-db-example-cxf/src/main/java/org/apache/empire/samples/cxf/wssample/client/RunClient.java?rev=755431&r1=755430&r2=755431&view=diff
==============================================================================
--- incubator/empire-db/trunk/empire-db-examples/empire-db-example-cxf/src/main/java/org/apache/empire/samples/cxf/wssample/client/RunClient.java
(original)
+++ incubator/empire-db/trunk/empire-db-examples/empire-db-example-cxf/src/main/java/org/apache/empire/samples/cxf/wssample/client/RunClient.java
Tue Mar 17 22:29:04 2009
@@ -26,7 +26,7 @@
 public class RunClient {
 
 	public static void main(String[] args) {
-	    final EmployeeManagementProxy proxy = new EmployeeManagementProxy(ServerControl.serviceAddress);
+	    final EmployeeServiceClient proxy = new EmployeeServiceClient(ServerControl.serviceAddress);
 		SwingUtilities.invokeLater(new Runnable()
         {
 			public void run() {

Copied: incubator/empire-db/trunk/empire-db-examples/empire-db-example-cxf/src/main/java/org/apache/empire/samples/cxf/wssample/common/EmployeeService.java
(from r755409, incubator/empire-db/trunk/empire-db-examples/empire-db-example-cxf/src/main/java/org/apache/empire/samples/cxf/wssample/common/EmployeeManagementInterface.java)
URL: http://svn.apache.org/viewvc/incubator/empire-db/trunk/empire-db-examples/empire-db-example-cxf/src/main/java/org/apache/empire/samples/cxf/wssample/common/EmployeeService.java?p2=incubator/empire-db/trunk/empire-db-examples/empire-db-example-cxf/src/main/java/org/apache/empire/samples/cxf/wssample/common/EmployeeService.java&p1=incubator/empire-db/trunk/empire-db-examples/empire-db-example-cxf/src/main/java/org/apache/empire/samples/cxf/wssample/common/EmployeeManagementInterface.java&r1=755409&r2=755431&rev=755431&view=diff
==============================================================================
--- incubator/empire-db/trunk/empire-db-examples/empire-db-example-cxf/src/main/java/org/apache/empire/samples/cxf/wssample/common/EmployeeManagementInterface.java
(original)
+++ incubator/empire-db/trunk/empire-db-examples/empire-db-example-cxf/src/main/java/org/apache/empire/samples/cxf/wssample/common/EmployeeService.java
Tue Mar 17 22:29:04 2009
@@ -31,7 +31,7 @@
 //specifies the the attribute wsdl:portType
 @WebService(name = "employeeManagement")
 
-public interface EmployeeManagementInterface
+public interface EmployeeService
 {
 
     @WebMethod(operationName = "searchEmmployee")
@@ -57,10 +57,6 @@
     @WebResult(name = "deleteResponse")
     public boolean deleteEmmployee(@WebParam(name = "id", mode = Mode.IN) int id);
 
-    @WebMethod(operationName = "test")
-    @WebResult(name = "testResponse")
-    public String test();
-
     @WebMethod(operationName = "getDepartments")
     @WebResult(name = "allDepartments")
     public List<Department> getDepartments();

Propchange: incubator/empire-db/trunk/empire-db-examples/empire-db-example-cxf/src/main/java/org/apache/empire/samples/cxf/wssample/common/EmployeeService.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Copied: incubator/empire-db/trunk/empire-db-examples/empire-db-example-cxf/src/main/java/org/apache/empire/samples/cxf/wssample/server/EmployeeServiceImpl.java
(from r755409, incubator/empire-db/trunk/empire-db-examples/empire-db-example-cxf/src/main/java/org/apache/empire/samples/cxf/wssample/server/EmployeeManagementService.java)
URL: http://svn.apache.org/viewvc/incubator/empire-db/trunk/empire-db-examples/empire-db-example-cxf/src/main/java/org/apache/empire/samples/cxf/wssample/server/EmployeeServiceImpl.java?p2=incubator/empire-db/trunk/empire-db-examples/empire-db-example-cxf/src/main/java/org/apache/empire/samples/cxf/wssample/server/EmployeeServiceImpl.java&p1=incubator/empire-db/trunk/empire-db-examples/empire-db-example-cxf/src/main/java/org/apache/empire/samples/cxf/wssample/server/EmployeeManagementService.java&r1=755409&r2=755431&rev=755431&view=diff
==============================================================================
--- incubator/empire-db/trunk/empire-db-examples/empire-db-example-cxf/src/main/java/org/apache/empire/samples/cxf/wssample/server/EmployeeManagementService.java
(original)
+++ incubator/empire-db/trunk/empire-db-examples/empire-db-example-cxf/src/main/java/org/apache/empire/samples/cxf/wssample/server/EmployeeServiceImpl.java
Tue Mar 17 22:29:04 2009
@@ -20,7 +20,6 @@
 package org.apache.empire.samples.cxf.wssample.server;
 
 import java.sql.Connection;
-import java.util.Date;
 import java.util.List;
 
 import javax.jws.WebService;
@@ -31,16 +30,16 @@
 import org.apache.empire.db.expr.compare.DBCompareExpr;
 import org.apache.empire.samples.cxf.wssample.common.Department;
 import org.apache.empire.samples.cxf.wssample.common.Employee;
-import org.apache.empire.samples.cxf.wssample.common.EmployeeManagementInterface;
+import org.apache.empire.samples.cxf.wssample.common.EmployeeService;
 import org.apache.empire.samples.cxf.wssample.server.db.SampleDB;
 import org.apache.empire.samples.cxf.wssample.server.db.SampleDB.Departments;
 import org.apache.empire.samples.cxf.wssample.server.db.SampleDB.Employees;
 
-@WebService(endpointInterface = "org.apache.empire.samples.cxf.wssample.common.EmployeeManagementInterface",
-            portName = "EmployeeManagementPort",
-            serviceName = "EmployeeManagementService")
+@WebService(endpointInterface = "org.apache.empire.samples.cxf.wssample.common.EmployeeService",
+            portName = "EmployeeServicePort",
+            serviceName = "EmployeeService")
             
-public class EmployeeManagementService implements EmployeeManagementInterface
+public class EmployeeServiceImpl implements EmployeeService
 {
 
     private SampleDB    db    = null;
@@ -48,7 +47,7 @@
     private Employees   T_EMP = null;
     private Connection  conn  = null;
 
-    public EmployeeManagementService(SampleDB db, Connection conn)
+    public EmployeeServiceImpl(SampleDB db, Connection conn)
     {
         this.conn = conn;
         this.db = db;
@@ -113,12 +112,6 @@
         return lst;
     }
 
-    public String test()
-    {
-        String answer = (new Date()).toString() + " SERVER TEST RESPONSE";
-        return answer;
-    }
-
     public List<Department> getDepartments()
     {
         DBCommand cmd = db.createCommand();

Propchange: incubator/empire-db/trunk/empire-db-examples/empire-db-example-cxf/src/main/java/org/apache/empire/samples/cxf/wssample/server/EmployeeServiceImpl.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: incubator/empire-db/trunk/empire-db-examples/empire-db-example-cxf/src/main/java/org/apache/empire/samples/cxf/wssample/server/ServerControl.java
URL: http://svn.apache.org/viewvc/incubator/empire-db/trunk/empire-db-examples/empire-db-example-cxf/src/main/java/org/apache/empire/samples/cxf/wssample/server/ServerControl.java?rev=755431&r1=755430&r2=755431&view=diff
==============================================================================
--- incubator/empire-db/trunk/empire-db-examples/empire-db-example-cxf/src/main/java/org/apache/empire/samples/cxf/wssample/server/ServerControl.java
(original)
+++ incubator/empire-db/trunk/empire-db-examples/empire-db-example-cxf/src/main/java/org/apache/empire/samples/cxf/wssample/server/ServerControl.java
Tue Mar 17 22:29:04 2009
@@ -35,12 +35,12 @@
 import org.apache.empire.db.mysql.DBDatabaseDriverMySQL;
 import org.apache.empire.db.oracle.DBDatabaseDriverOracle;
 import org.apache.empire.db.sqlserver.DBDatabaseDriverMSSQL;
-import org.apache.empire.samples.cxf.wssample.common.EmployeeManagementInterface;
+import org.apache.empire.samples.cxf.wssample.common.EmployeeService;
 import org.apache.empire.samples.cxf.wssample.server.db.SampleDB;
 
 public class ServerControl
 {
-    private static final Log                   log            = LogFactory.getLog(EmployeeManagementService.class);
+    private static final Log                   log            = LogFactory.getLog(EmployeeServiceImpl.class);
     
     public static final String                   serviceName    = "employeeManagement";
     public static final String                   serviceAddress = "http://localhost:8081/"
+ serviceName;
@@ -135,14 +135,14 @@
     private void initWS()
     {
         // create new instance of the service implmentation
-        EmployeeManagementInterface impl = new EmployeeManagementService(db, conn);
+        EmployeeService impl = new EmployeeServiceImpl(db, conn);
 
         // construct/configure factory to create our specific service
         svrFactory = new JaxWsServerFactoryBean();
         //svrFactory.getInInterceptors().add(new LoggingInInterceptor());
         //svrFactory.getOutInterceptors().add(new LoggingOutInterceptor());
         // specify our implementation class
-        svrFactory.setServiceClass(EmployeeManagementInterface.class);
+        svrFactory.setServiceClass(EmployeeService.class);
         // specify the address
         svrFactory.setAddress(serviceAddress);
         // set the instance to be used



Mime
View raw message