axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dee...@apache.org
Subject svn commit: r417708 - /webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/ServiceBuilder.java
Date Wed, 28 Jun 2006 09:55:11 GMT
Author: deepal
Date: Wed Jun 28 02:55:10 2006
New Revision: 417708

URL: http://svn.apache.org/viewvc?rev=417708&view=rev
Log:
fixing http://issues.apache.org/jira/browse/AXIS2-856
so if the service uses RawXMLMessageReceiver then it will not generate wsdl 

Modified:
    webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/ServiceBuilder.java

Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/ServiceBuilder.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/ServiceBuilder.java?rev=417708&r1=417707&r2=417708&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/ServiceBuilder.java
(original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/ServiceBuilder.java
Wed Jun 28 02:55:10 2006
@@ -90,11 +90,11 @@
 
             // Process WS-Addressing flag attribute
             OMAttribute addressingRequiredatt = service_element.getAttribute(new QName(ATTRIBUTE_WSADDRESSING));
-            if(addressingRequiredatt!=null){
-            	String addressingRequiredString = addressingRequiredatt.getAttributeValue();
-            	service.setWSAddressingFlag(addressingRequiredString);
+            if (addressingRequiredatt != null) {
+                String addressingRequiredString = addressingRequiredatt.getAttributeValue();
+                service.setWSAddressingFlag(addressingRequiredString);
             }
-            
+
             //Setting service tratget namespace if any
             OMAttribute targetNameSpace = service_element.
                     getAttribute(new QName(TARGET_NAME_SPACE));
@@ -217,7 +217,9 @@
             if (!service.isWsdlfound()) {
                 //trying to generate WSDL for the service using JAM  and Java refelection
                 try {
-                    Utils.fillAxisService(service, axisConfig, excludeops);
+                    if (generateWsdl(service)) {
+                        Utils.fillAxisService(service, axisConfig, excludeops);
+                    }
                 } catch (Exception e) {
                     /**
                      * I have log here if some error occours , since service impl
@@ -255,6 +257,30 @@
                             DeploymentErrorMsgs.OPERATION_PROCESS_ERROR, axisFault.getMessage()));
         }
         return service;
+    }
+
+
+    private boolean generateWsdl(AxisService axisService) {
+        Iterator operatins = axisService.getOperations();
+        if (operatins.hasNext()) {
+            while (operatins.hasNext()) {
+                AxisOperation axisOperation = (AxisOperation) operatins
+                        .next();
+                if (axisOperation.getMessageReceiver() == null) {
+                    continue;
+                }
+                String messageReceiverClass = axisOperation
+                        .getMessageReceiver().getClass().getName();
+                if (!("org.apache.axis2.rpc.receivers.RPCMessageReceiver"
+                        .equals(messageReceiverClass)
+                        || "org.apache.axis2.rpc.receivers.RPCInOnlyMessageReceiver"
+                        .equals(messageReceiverClass) || "org.apache.axis2.rpc.receivers.RPCInOutAsyncMessageReceiver"
+                        .equals(messageReceiverClass))) {
+                    return false;
+                }
+            }
+        }
+        return true;
     }
 
     /**



---------------------------------------------------------------------
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