axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nand...@apache.org
Subject svn commit: r679429 - in /webservices/axis2/branches/java/1_4/modules/kernel/src/org/apache/axis2: deployment/util/Utils.java description/AxisService.java
Date Thu, 24 Jul 2008 14:41:59 GMT
Author: nandana
Date: Thu Jul 24 07:41:59 2008
New Revision: 679429

URL: http://svn.apache.org/viewvc?rev=679429&view=rev
Log:
AXIS2-3942 adding the binding operation for module operations

Modified:
    webservices/axis2/branches/java/1_4/modules/kernel/src/org/apache/axis2/deployment/util/Utils.java
    webservices/axis2/branches/java/1_4/modules/kernel/src/org/apache/axis2/description/AxisService.java

Modified: webservices/axis2/branches/java/1_4/modules/kernel/src/org/apache/axis2/deployment/util/Utils.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/1_4/modules/kernel/src/org/apache/axis2/deployment/util/Utils.java?rev=679429&r1=679428&r2=679429&view=diff
==============================================================================
--- webservices/axis2/branches/java/1_4/modules/kernel/src/org/apache/axis2/deployment/util/Utils.java
(original)
+++ webservices/axis2/branches/java/1_4/modules/kernel/src/org/apache/axis2/deployment/util/Utils.java
Thu Jul 24 07:41:59 2008
@@ -1609,6 +1609,43 @@
 	        service.setEpMap(map);
 	}
 	
+	public static void addModuleBindingOperation(AxisService service, AxisOperation operation)
{
+            ArrayList bindings = new ArrayList();
+            Map endpointsMap = service.getEndpoints();
+	        
+            for (Iterator iterator = endpointsMap.values().iterator(); iterator.hasNext();)
{
+                AxisEndpoint endpoint = (AxisEndpoint) iterator.next();
+                AxisBinding binding = endpoint.getBinding();
+	        AxisBindingOperation bindingOperation = new AxisBindingOperation();
+	        bindingOperation.setName(operation.getName());
+	        bindingOperation.setAxisOperation(operation);
+	    
+	        if (!bindings.contains(binding.getName())) {
+	            if (isSoap11Binding(binding)) {
+	                String soapAction = operation.getSoapAction();
+	                if (soapAction != null) {
+	                        bindingOperation.setProperty(WSDL2Constants.ATTR_WSOAP_ACTION, soapAction);
+	                }            
+	            } else if (isSoap12Binding(binding)) {
+	                String soapAction = operation.getSoapAction();
+	                if (soapAction != null) {
+	                    bindingOperation.setProperty(WSDL2Constants.ATTR_WSOAP_ACTION, soapAction);
+	                }
+	        
+	            } else if (isHttpBinding(binding)) {
+	                String serviceName = service.getName();
+	                String name = serviceName + "HttpBinding";
+	                String httpLocation = serviceName + "/" + operation.getName().getLocalPart();
+	                bindingOperation.setProperty(WSDL2Constants.ATTR_WHTTP_LOCATION, httpLocation);
+	            }
+	        }
+	    
+	        binding.addChild(bindingOperation.getName(), bindingOperation);
+	        populateBindingOperation(service, binding, bindingOperation);
+	        
+            }
+	}
+	
 	public static boolean isSoap11Binding(AxisBinding binding) {
 	    String type = binding.getType();
 	    if (Java2WSDLConstants.TRANSPORT_URI.equals(type)

Modified: webservices/axis2/branches/java/1_4/modules/kernel/src/org/apache/axis2/description/AxisService.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/1_4/modules/kernel/src/org/apache/axis2/description/AxisService.java?rev=679429&r1=679428&r2=679429&view=diff
==============================================================================
--- webservices/axis2/branches/java/1_4/modules/kernel/src/org/apache/axis2/description/AxisService.java
(original)
+++ webservices/axis2/branches/java/1_4/modules/kernel/src/org/apache/axis2/description/AxisService.java
Thu Jul 24 07:41:59 2008
@@ -604,6 +604,7 @@
 				phaseResolver.engageModuleToOperation(axisOperation, module);
 
 				this.addOperation(axisOperation);
+				Utils.addModuleBindingOperation(this, axisOperation);
 			}
 		}
 	}



Mime
View raw message