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 ro...@apache.org on 2007/06/26 05:55:47 UTC

svn commit: r550672 - in /webservices/axis2/trunk/java/modules/metadata/src/org/apache/axis2/jaxws/description/impl: OperationDescriptionImpl.java ServiceDescriptionImpl.java

Author: rott
Date: Mon Jun 25 20:55:46 2007
New Revision: 550672

URL: http://svn.apache.org/viewvc?view=rev&rev=550672
Log:
OperationDescriptionImpl did not previously have an AxisOperation associated with it.  Constructor now creates AxisOperation.

Modified:
    webservices/axis2/trunk/java/modules/metadata/src/org/apache/axis2/jaxws/description/impl/OperationDescriptionImpl.java
    webservices/axis2/trunk/java/modules/metadata/src/org/apache/axis2/jaxws/description/impl/ServiceDescriptionImpl.java

Modified: webservices/axis2/trunk/java/modules/metadata/src/org/apache/axis2/jaxws/description/impl/OperationDescriptionImpl.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/metadata/src/org/apache/axis2/jaxws/description/impl/OperationDescriptionImpl.java?view=diff&rev=550672&r1=550671&r2=550672
==============================================================================
--- webservices/axis2/trunk/java/modules/metadata/src/org/apache/axis2/jaxws/description/impl/OperationDescriptionImpl.java (original)
+++ webservices/axis2/trunk/java/modules/metadata/src/org/apache/axis2/jaxws/description/impl/OperationDescriptionImpl.java Mon Jun 25 20:55:46 2007
@@ -176,6 +176,11 @@
         // Using a qualified name will cause breakage.
         // Don't do --> this.operationQName = new QName(parent.getTargetNamespace(), getOperationName());
         this.operationQName = new QName("", getOperationName());
+        if (getEndpointInterfaceDescription().getEndpointDescription() != null) {
+            if (!getEndpointInterfaceDescription().getEndpointDescription().getServiceDescription().isServerSide()) {
+                axisOperation = createClientAxisOperation();
+            }
+        }
     }
 
     OperationDescriptionImpl(AxisOperation operation, EndpointInterfaceDescription parent) {
@@ -213,8 +218,44 @@
 }
 
     /**
-     * Create an AxisOperation for this Operation.  Note that the ParameterDescriptions must be
-     * created before calling this method since, for a DOC/LIT/BARE (aka UNWRAPPED) message, the
+     * Create an AxisOperation for this Operation.  Note that the ParameterDescriptions must
+     * be created before calling this method since, for a DOC/LIT/BARE (aka UNWRAPPED) message, the 
+     * ParamaterDescription is used to setup the AxisMessage correctly for use in SOAP Body-based
+     * dispatching on incoming DOC/LIT/BARE messages.
+     */
+    private AxisOperation createClientAxisOperation() {
+        AxisOperation newAxisOperation = null;
+        try {
+            if (isOneWay()) {
+                newAxisOperation =
+                        AxisOperationFactory.getOperationDescription(WSDL2Constants.MEP_URI_OUT_ONLY);
+            } else {
+                newAxisOperation =
+                        AxisOperationFactory.getOperationDescription(WSDL2Constants.MEP_URI_OUT_IN);
+            }
+            //TODO: There are several other MEP's, such as: OUT_ONLY, IN_OPTIONAL_OUT, OUT_IN, OUT_OPTIONAL_IN, ROBUST_OUT_ONLY,
+            //                                              ROBUST_IN_ONLY
+            //      Determine how these MEP's should be handled, if at all
+        } catch (Exception e) {
+            if (log.isDebugEnabled()) {
+                log.debug("Unable to build AxisOperation for OperationDescrition; caught exception.",
+                          e);
+            }
+            // TODO: NLS & RAS
+            throw ExceptionFactory.makeWebServiceException("Caught exception trying to create AxisOperation",
+                                                           e);
+        }
+
+        newAxisOperation.setName(determineOperationQName(seiMethod));
+        
+        getEndpointInterfaceDescriptionImpl().getEndpointDescriptionImpl().getAxisService().addOperation(newAxisOperation);
+        
+        return newAxisOperation;
+    }
+    
+    /**
+     * Create an AxisOperation for this Operation.  Note that the ParameterDescriptions must
+     * be created before calling this method since, for a DOC/LIT/BARE (aka UNWRAPPED) message, the 
      * ParamaterDescription is used to setup the AxisMessage correctly for use in SOAP Body-based
      * dispatching on incoming DOC/LIT/BARE messages.
      */

Modified: webservices/axis2/trunk/java/modules/metadata/src/org/apache/axis2/jaxws/description/impl/ServiceDescriptionImpl.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/metadata/src/org/apache/axis2/jaxws/description/impl/ServiceDescriptionImpl.java?view=diff&rev=550672&r1=550671&r2=550672
==============================================================================
--- webservices/axis2/trunk/java/modules/metadata/src/org/apache/axis2/jaxws/description/impl/ServiceDescriptionImpl.java (original)
+++ webservices/axis2/trunk/java/modules/metadata/src/org/apache/axis2/jaxws/description/impl/ServiceDescriptionImpl.java Mon Jun 25 20:55:46 2007
@@ -135,6 +135,7 @@
      * @param serviceImplClass
      */
     ServiceDescriptionImpl(Class serviceImplClass, AxisService axisService) {
+        isServerSide = true;
         // Create the EndpointDescription hierachy from the service impl annotations; Since the PortQName is null, 
         // it will be set to the annotation value.
         EndpointDescriptionImpl endpointDescription =



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