[175030] WSDL representing Web service not passed to Axis2 client.
diff --git a/bundles/org.eclipse.jst.ws.axis2.consumption.core/src/org/eclipse/jst/ws/axis2/consumption/core/command/Axis2ClientDefaultingCommand.java b/bundles/org.eclipse.jst.ws.axis2.consumption.core/src/org/eclipse/jst/ws/axis2/consumption/core/command/Axis2ClientDefaultingCommand.java
index 9122ca5..7adfc77 100644
--- a/bundles/org.eclipse.jst.ws.axis2.consumption.core/src/org/eclipse/jst/ws/axis2/consumption/core/command/Axis2ClientDefaultingCommand.java
+++ b/bundles/org.eclipse.jst.ws.axis2.consumption.core/src/org/eclipse/jst/ws/axis2/consumption/core/command/Axis2ClientDefaultingCommand.java
@@ -12,6 +12,7 @@
  * 20070205   168762 sandakith@wso2.com - Lahiru Sandakith, Initial code to introduse the Axis2 
  * 										  runtime to the framework for 168762
  * 20070426   183046 sandakith@wso2.com - Lahiru Sandakith
+ * 20070508   175030 sandakith@wso2.com - Lahiru Sandakith, WSDL not passed to Axis2 client fix
  *******************************************************************************/
 package org.eclipse.jst.ws.axis2.consumption.core.command;
 
@@ -23,7 +24,7 @@
 import org.eclipse.jst.ws.axis2.consumption.core.data.DataModel;
 import org.eclipse.jst.ws.axis2.consumption.core.messages.Axis2ConsumptionUIMessages;
 import org.eclipse.jst.ws.axis2.consumption.core.utils.DefaultCodegenUtil;
-import org.eclipse.jst.ws.axis2.core.context.BUServiceContext;
+import org.eclipse.jst.ws.axis2.core.context.ServiceContext;
 import org.eclipse.jst.ws.axis2.core.utils.FacetContainerUtils;
 import org.eclipse.wst.common.frameworks.datamodel.AbstractDataModelOperation;
 import org.eclipse.wst.ws.internal.wsrt.IWebServiceClient;
@@ -42,12 +43,19 @@
 	public IStatus execute(IProgressMonitor monitor, IAdaptable info)
 			throws ExecutionException {
 		//Default Settings for the Codegeneration
-		model.setWsdlURI((ws.getWebServiceClientInfo().getWsdlURL()!=null)?
-						  ws.getWebServiceClientInfo().getWsdlURL():
-						  FacetContainerUtils.getDeployedWSDLURL(
-								  			model.getWebProjectName().split("Client")[0],
-								  			BUServiceContext.getInstance().getServiceName())
-						);
+		String deployedWSDLURL = FacetContainerUtils.getDeployedWSDLURL(
+	  								model.getWebProjectName().split("Client")[0],
+	  								ServiceContext.getInstance().getServiceName());
+		String wsFrameworkWSDLURL = ws.getWebServiceClientInfo().getWsdlURL();
+ 
+		model.setWsdlURI(
+				((wsFrameworkWSDLURL!=null) || (deployedWSDLURL!=wsFrameworkWSDLURL))?
+						wsFrameworkWSDLURL:
+							deployedWSDLURL
+		);
+		
+		// WSE with Client alone. 
+		ws.getWebServiceClientInfo().setWsdlURL(deployedWSDLURL);
 		
 		model.setDatabindingType(Axis2ConsumptionUIMessages.DATA_BINDING_ADB);
 		model.setASync(false);
diff --git a/bundles/org.eclipse.jst.ws.axis2.core/src/org/eclipse/jst/ws/axis2/core/context/BUServiceContext.java b/bundles/org.eclipse.jst.ws.axis2.core/src/org/eclipse/jst/ws/axis2/core/context/ServiceContext.java
similarity index 79%
rename from bundles/org.eclipse.jst.ws.axis2.core/src/org/eclipse/jst/ws/axis2/core/context/BUServiceContext.java
rename to bundles/org.eclipse.jst.ws.axis2.core/src/org/eclipse/jst/ws/axis2/core/context/ServiceContext.java
index fdd804e..b2b41a8 100644
--- a/bundles/org.eclipse.jst.ws.axis2.core/src/org/eclipse/jst/ws/axis2/core/context/BUServiceContext.java
+++ b/bundles/org.eclipse.jst.ws.axis2.core/src/org/eclipse/jst/ws/axis2/core/context/ServiceContext.java
@@ -12,20 +12,21 @@
  * 20070130   168762 sandakith@wso2.com - Lahiru Sandakith, Initial code to introduse 
  * 											the Axis2 runtime to the framework for 168762
  * 20070502   184302 sandakith@wso2.com - Lahiru Sandakith, Fix copyright for Axis2 plugins
+ * 20070508   175030 sandakith@wso2.com - Lahiru Sandakith, Refactor BuServiceContext 
  *******************************************************************************/
 package org.eclipse.jst.ws.axis2.core.context;
 
-public class BUServiceContext {
+public class ServiceContext {
 	
-	private static BUServiceContext instance;
+	private static ServiceContext instance;
 	private static String serviceName; 
 	
 	//singleton
-	private BUServiceContext(){}
+	private ServiceContext(){}
 	
-	public static BUServiceContext getInstance(){
+	public static ServiceContext getInstance(){
 		if (instance == null) {
-			instance = new BUServiceContext();
+			instance = new ServiceContext();
 		}
 		return instance;
 	}
@@ -35,7 +36,7 @@
 	}
 
 	public void setServiceName(String serviceName) {
-		BUServiceContext.serviceName = serviceName;
+		ServiceContext.serviceName = serviceName;
 	}
 	
 	
diff --git a/bundles/org.eclipse.jst.ws.axis2.creation.core/src/org/eclipse/jst/ws/axis2/creation/core/command/Axis2DefaultingCommand.java b/bundles/org.eclipse.jst.ws.axis2.creation.core/src/org/eclipse/jst/ws/axis2/creation/core/command/Axis2DefaultingCommand.java
index 0b077f7..50f1c80 100644
--- a/bundles/org.eclipse.jst.ws.axis2.creation.core/src/org/eclipse/jst/ws/axis2/creation/core/command/Axis2DefaultingCommand.java
+++ b/bundles/org.eclipse.jst.ws.axis2.creation.core/src/org/eclipse/jst/ws/axis2/creation/core/command/Axis2DefaultingCommand.java
@@ -11,6 +11,7 @@
  * -------- -------- -----------------------------------------------------------
  * 20070206   168762 sandakith@wso2.com - Lahiru Sandakith, Initial code to introduse the Axis2 
  * 										  runtime to the framework for 168762
+ * 20070508   175030 sandakith@wso2.com - Lahiru Sandakith, WSDL not passed to Axis2 client fix
  *******************************************************************************/
 package org.eclipse.jst.ws.axis2.creation.core.command;
 
@@ -24,9 +25,10 @@
 import org.eclipse.core.runtime.IStatus;
 import org.eclipse.core.runtime.Status;
 import org.eclipse.jst.ws.axis2.consumption.core.utils.DefaultCodegenUtil;
-import org.eclipse.jst.ws.axis2.core.context.BUServiceContext;
+import org.eclipse.jst.ws.axis2.core.context.ServiceContext;
 import org.eclipse.jst.ws.axis2.core.plugin.messages.Axis2CoreUIMessages;
 import org.eclipse.jst.ws.axis2.core.utils.Axis2CoreUtils;
+import org.eclipse.jst.ws.axis2.core.utils.FacetContainerUtils;
 import org.eclipse.jst.ws.axis2.creation.core.data.DataModel;
 import org.eclipse.jst.ws.axis2.creation.core.messages.Axis2CreationUIMessages;
 import org.eclipse.jst.ws.axis2.creation.core.utils.CommonUtils;
@@ -75,10 +77,11 @@
 			defaultCodegenUtil.populateModelParamsFromWSDL();
 			model.setServicesXML(true);
 			model.setServerXMLCheck(true);
+			ServiceContext.getInstance().setServiceName(model.getServiceName());
 		}else if (scenario == WebServiceScenario.BOTTOMUP) {
 			model.setServiceClass(ws.getWebServiceInfo().getImplURL());
 			//set the service name inside BUServiceContext for used by client if invoke together
-			BUServiceContext.getInstance().setServiceName(
+			ServiceContext.getInstance().setServiceName(
 					CommonUtils.classNameFromQualifiedName(ws.getWebServiceInfo().getImplURL())
 					);
 			
@@ -86,6 +89,17 @@
 		}else{
 			//never come here
 		}
+		
+		// Fix for the Bugzilla Bug 175030
+		// Axis2: WSDL representing Web service not passed to Axis2 client
+		// After setting the initial wsdlURL return from the framework to the data model,
+		// replace it with the deployed wsdlURL
+		String deployedWSDLURL = FacetContainerUtils.getDeployedWSDLURL(
+					model.getWebProjectName(),
+					ServiceContext.getInstance().getServiceName());
+		ws.getWebServiceInfo().setWsdlURL(deployedWSDLURL);
+		
+		
 		return status;      	
 	}