You are viewing a plain text version of this content. The canonical link for it is here.
Posted to axis-cvs@ws.apache.org by sc...@apache.org on 2006/08/01 01:14:12 UTC

svn commit: r427357 - in /webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws: description/ mdq/ mdq/annotations/collector/ mdq/input/ mdq/output/ spi/

Author: scheu
Date: Mon Jul 31 16:14:11 2006
New Revision: 427357

URL: http://svn.apache.org/viewvc?rev=427357&view=rev
Log:
AXIS2-947
DescriptionFactory: first drop
Contributor: Jeff Barrett

Removed:
    webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/mdq/README.txt
    webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/mdq/annotations/collector/README.txt
    webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/mdq/input/README.txt
    webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/mdq/output/README.txt
Modified:
    webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/description/EndpointDescription.java
    webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/description/EndpointInterfaceDescription.java
    webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/description/OperationDescription.java
    webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/description/ServiceDescription.java
    webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/spi/ServiceDelegate.java

Modified: webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/description/EndpointDescription.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/description/EndpointDescription.java?rev=427357&r1=427356&r2=427357&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/description/EndpointDescription.java (original)
+++ webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/description/EndpointDescription.java Mon Jul 31 16:14:11 2006
@@ -26,9 +26,6 @@
 import javax.xml.namespace.QName;
 
 
-/**
- * 
- */
 /*
 Working-design information.
 
@@ -51,13 +48,15 @@
 
  */
 /*
- * TODO: EndpointDescription should be created AxisService objects and not directly from WSDL
+ * TODO: EndpointDescription should be created via AxisService objects and not directly from WSDL
  * IMPORTANT NOTE: Axis2 currently only supports 1 service and 1 port under that service.  When that is
  * fixed, that will probably have an impact on this class.  In particular, I think this should be created 
  * somehow from an AxisService/AxisPort combination, and not directly from the WSDL.
  */
 public class EndpointDescription {
+    private ServiceDescription parentServiceDescription;
     private QName portQName;
+    private EndpointInterfaceDescription endpointInterfaceDescription;
     // TODO: This needs to be a collection of handler descriptions; use JAX-WS Appendix B Handler Chain Configuration File Schema as a starting point
     private ArrayList<String> handlerList = new ArrayList<String>();
     
@@ -69,13 +68,19 @@
      * @param wsdlPort The WSDL Port tag for this EndpointDescription.
      * @param definition The WSDL Definition target namespace used to create the port QName
      */
-    EndpointDescription(Port wsdlPort, Definition definition) {
+    EndpointDescription(Port wsdlPort, Definition definition, ServiceDescription parent) {
+        parentServiceDescription = parent;
         String localPart = wsdlPort.getName();
         String namespace = definition.getTargetNamespace();
         portQName = new QName(namespace, localPart);
+        endpointInterfaceDescription = new EndpointInterfaceDescription(this);
     }
     public QName getPortQName() {
         return portQName;
+    }
+    
+    public ServiceDescription getServiceDescription() {
+        return parentServiceDescription;
     }
     
     /**

Modified: webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/description/EndpointInterfaceDescription.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/description/EndpointInterfaceDescription.java?rev=427357&r1=427356&r2=427357&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/description/EndpointInterfaceDescription.java (original)
+++ webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/description/EndpointInterfaceDescription.java Mon Jul 31 16:14:11 2006
@@ -18,6 +18,18 @@
 
 package org.apache.axis2.jaxws.description;
 
+import java.util.ArrayList;
+import java.util.Hashtable;
+import java.util.Iterator;
+
+import javax.wsdl.Binding;
+import javax.wsdl.Port;
+import javax.wsdl.PortType;
+import javax.xml.namespace.QName;
+
+import org.apache.axis2.description.AxisOperation;
+import org.apache.axis2.description.AxisService;
+
 /**
  * 
  */
@@ -51,5 +63,21 @@
 
  */
 public class EndpointInterfaceDescription {
+    EndpointDescription parentEndpointDescription;
+    Hashtable<QName, OperationDescription> operationDescriptions = new Hashtable<QName, OperationDescription>();
+    
+    
+    EndpointInterfaceDescription(EndpointDescription parent) {
+        parentEndpointDescription = parent;
+        
+        AxisService axisService = parentEndpointDescription.getServiceDescription().getAxisService();
+        ArrayList publishedOperations = axisService.getPublishedOperations();
+        Iterator operationsIterator = publishedOperations.iterator();
+        while (operationsIterator.hasNext()) {
+            AxisOperation operation = (AxisOperation) operationsIterator.next();
+            operationDescriptions.put(operation.getName(), new OperationDescription(operation, this));
+        }
+        
+    }
 
 }

Modified: webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/description/OperationDescription.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/description/OperationDescription.java?rev=427357&r1=427356&r2=427357&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/description/OperationDescription.java (original)
+++ webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/description/OperationDescription.java Mon Jul 31 16:14:11 2006
@@ -18,6 +18,8 @@
 
 package org.apache.axis2.jaxws.description;
 
+import org.apache.axis2.description.AxisOperation;
+
 /**
  * 
  */
@@ -56,5 +58,19 @@
 
  */
 public class OperationDescription {
-
+    private EndpointInterfaceDescription parentEndpointInterfaceDescription;
+    private AxisOperation axisOperation;
+    
+    OperationDescription(AxisOperation operation, EndpointInterfaceDescription parent) {
+        parentEndpointInterfaceDescription = parent;
+        axisOperation = operation;       
+    }
+
+    public EndpointInterfaceDescription getEndpointInterfaceDescription() {
+        return parentEndpointInterfaceDescription;
+    }
+    
+    public AxisOperation getAxisOperation() {
+        return axisOperation;
+    }
 }

Modified: webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/description/ServiceDescription.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/description/ServiceDescription.java?rev=427357&r1=427356&r2=427357&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/description/ServiceDescription.java (original)
+++ webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/description/ServiceDescription.java Mon Jul 31 16:14:11 2006
@@ -78,7 +78,7 @@
 TBD
 
 Properties available to JAXWS runtime:
-getJAXInterface(QName port) Needed by HandlerResolver
+getEndpointDescription(QName port) Needed by HandlerResolver
 TBD
 
  */
@@ -104,9 +104,9 @@
      * @param serviceQName  The name of the service in the WSDL.  This can not be null since a 
      *   javax.xml.ws.Service can not be created with a null service QName.
      * @param serviceClass  The JAX-WS service class.  This could be an instance of
-     *   javax.xml.ws.Service or a generated service subclass thereof.
+     *   javax.xml.ws.Service or a generated service subclass thereof.  This will not be null.
      */
-    public ServiceDescription(URL wsdlURL, QName serviceQName, Class serviceClass) {
+    ServiceDescription(URL wsdlURL, QName serviceQName, Class serviceClass) {
         if (serviceQName == null) {
         	// TODO NLS
             throw ExceptionFactory.makeWebServiceException("Invalid Service QName; cannot be null");
@@ -222,7 +222,7 @@
             Iterator portIterator = ports.values().iterator();
             while (portIterator.hasNext()) {
                 Port wsdlPort = (Port) portIterator.next();
-                EndpointDescription endpointDescription = new EndpointDescription(wsdlPort, definition);
+                EndpointDescription endpointDescription = new EndpointDescription(wsdlPort, definition, this);
                 QName portQName = endpointDescription.getPortQName();
                 endpointDescriptions.put(portQName, endpointDescription); 
             }

Modified: webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/spi/ServiceDelegate.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/spi/ServiceDelegate.java?rev=427357&r1=427356&r2=427357&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/spi/ServiceDelegate.java (original)
+++ webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/spi/ServiceDelegate.java Mon Jul 31 16:14:11 2006
@@ -48,6 +48,7 @@
 import org.apache.axis2.jaxws.client.factory.ProxyHandlerFactory;
 import org.apache.axis2.jaxws.client.proxy.BaseProxyHandler;
 import org.apache.axis2.jaxws.client.proxy.ProxyDescriptor;
+import org.apache.axis2.jaxws.description.DescriptionFactory;
 import org.apache.axis2.jaxws.description.ServiceDescription;
 import org.apache.axis2.jaxws.handler.PortData;
 import org.apache.axis2.jaxws.handler.PortInfoImpl;
@@ -76,9 +77,10 @@
     		throw ExceptionFactory.makeWebServiceException("Invalid Service QName, Service Name cannot be null or empty");
     	}
 
-        serviceDescription = new ServiceDescription(url, serviceQname, clazz);
+        serviceDescription = DescriptionFactory.createServiceDescription(url, serviceQname, clazz);
         if (isValidWSDLLocation()) {
             if(!isServiceDefined(serviceQname)){
+            	// TODO NLS
                 throw new WebServiceException("Service " + serviceQname + " not defined in WSDL");
             }
             readPorts();
@@ -101,6 +103,7 @@
     	}
     	
     	if(bindingId!=null && !bindingId.equals(SOAPBinding.SOAP11HTTP_BINDING)){
+    		// TODO NLS
     		throw new UnsupportedOperationException("Only SOAP11HTTP_BINDING supported at this time.");
     	}
         
@@ -117,7 +120,7 @@
     		port.setBindingID(bindingId);
     		port.setEndPointAddress(endpointAddress);
     		*/
-    		
+    		// TODO NLS
     		throw new WebServiceException("Port is already added");
     	}
     }
@@ -283,7 +286,6 @@
     }
     
     public void setExecutor(Executor executor) {
-        // TODO Auto-generated method stub
         this.executor = executor;
         if(executor == null){
         	this.executor = getDefaultExecutor();



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