You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by de...@apache.org on 2007/01/26 07:23:04 UTC

svn commit: r500152 - /webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/deployment/ServiceBuilder.java

Author: deepal
Date: Thu Jan 25 22:23:04 2007
New Revision: 500152

URL: http://svn.apache.org/viewvc?view=rev&rev=500152
Log:
oops we are not throwing any exception when a service is trying to expose a transport which is not available.

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

Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/deployment/ServiceBuilder.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/deployment/ServiceBuilder.java?view=diff&rev=500152&r1=500151&r2=500152
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/deployment/ServiceBuilder.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/deployment/ServiceBuilder.java Thu Jan 25 22:23:04 2007
@@ -66,8 +66,8 @@
         try {
             // Processing service level parameters
             Iterator itr = service_element.getChildrenWithName(new QName(TAG_PARAMETER));
-            processParameters(itr, service, service.getParent());            
-            
+            processParameters(itr, service, service.getParent());
+
             // process service description
             OMElement descriptionElement =
                     service_element.getFirstChildWithName(new QName(TAG_DESCRIPTION));
@@ -92,7 +92,7 @@
                 }
             }
             OMAttribute serviceNameatt = service_element.getAttribute(new QName(ATTRIBUTE_NAME));
-            
+
             // If the service name is explicitly specified in the services.xml
             // then use that as the service name
             if (serviceNameatt != null) {
@@ -104,11 +104,11 @@
                     }
                 }
             }
-            
-            if (service.getParameter("ServiceClass") == null){
+
+            if (service.getParameter("ServiceClass") == null) {
                 log.info("The Service " + service.getName() + " does not specify a Service Class");
             }
-            
+
             // Process WS-Addressing flag attribute
             OMAttribute addressingRequiredatt = service_element.getAttribute(new QName(ATTRIBUTE_WSADDRESSING));
             if (addressingRequiredatt != null) {
@@ -259,7 +259,12 @@
                 ArrayList trs = new ArrayList();
                 while (transport_itr.hasNext()) {
                     OMElement trsEle = (OMElement) transport_itr.next();
-                    trs.add(trsEle.getText());
+                    String tarnsportName = trsEle.getText().trim();
+                    trs.add(tarnsportName);
+                    if (axisConfig.getTransportIn(new QName(tarnsportName)) == null) {
+                        throw new AxisFault("Service is trying to expose in a tarnsport : "
+                                + transports + " and which is not available in Axis2");
+                    }
                 }
                 service.setExposedTransports(trs);
             }



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