Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
View | Details | Raw Unified | Return to bug 89924
Collapse All | Expand All

(-)src/org/eclipse/jst/ws/internal/axis/consumption/ui/command/DefaultsForClientJavaWSDLCommand.java (-18 / +48 lines)
Lines 15-20 Link Here
15
import org.eclipse.core.resources.IProject;
15
import org.eclipse.core.resources.IProject;
16
import org.eclipse.core.resources.IResource;
16
import org.eclipse.core.resources.IResource;
17
import org.eclipse.core.runtime.IPath;
17
import org.eclipse.core.runtime.IPath;
18
import org.eclipse.jdt.core.IJavaProject;
19
import org.eclipse.jdt.core.JavaCore;
18
import org.eclipse.jst.ws.internal.axis.consumption.core.common.JavaWSDLParameter;
20
import org.eclipse.jst.ws.internal.axis.consumption.core.common.JavaWSDLParameter;
19
import org.eclipse.jst.ws.internal.axis.consumption.ui.util.PlatformUtils;
21
import org.eclipse.jst.ws.internal.axis.consumption.ui.util.PlatformUtils;
20
import org.eclipse.jst.ws.internal.common.ResourceUtils;
22
import org.eclipse.jst.ws.internal.common.ResourceUtils;
Lines 23-28 Link Here
23
import org.eclipse.wst.command.internal.provisional.env.core.common.MessageUtils;
25
import org.eclipse.wst.command.internal.provisional.env.core.common.MessageUtils;
24
import org.eclipse.wst.command.internal.provisional.env.core.common.SimpleStatus;
26
import org.eclipse.wst.command.internal.provisional.env.core.common.SimpleStatus;
25
import org.eclipse.wst.command.internal.provisional.env.core.common.Status;
27
import org.eclipse.wst.command.internal.provisional.env.core.common.Status;
28
import org.eclipse.wst.common.componentcore.ModuleCoreNature;
26
import org.eclipse.wst.ws.internal.datamodel.Model;
29
import org.eclipse.wst.ws.internal.datamodel.Model;
27
30
28
31
Lines 78-101 Link Here
78
		javaWSDLParam_.setMetaInfOnly(false);
81
		javaWSDLParam_.setMetaInfOnly(false);
79
		javaWSDLParam_.setServerSide(JavaWSDLParameter.SERVER_SIDE_NONE);
82
		javaWSDLParam_.setServerSide(JavaWSDLParameter.SERVER_SIDE_NONE);
80
		
83
		
81
		IPath webModuleServerRoot = ResourceUtils.getJavaSourceLocation(proxyProject_, moduleName_ );
84
	    ModuleCoreNature mn = ModuleCoreNature.getModuleCoreNature(proxyProject_);
82
		//String output = PlatformUtils.getPlatformURL(webModuleServerRoot);
85
	    if (mn!=null)
83
		String output =	ResourceUtils.findResource(webModuleServerRoot).getLocation().toString();
86
	    {
84
//		String output = ResourceUtils.getWorkspaceRoot().getFolder(webModuleServerRoot).getLocation().toString();
87
			IPath webModuleServerRoot = ResourceUtils.getJavaSourceLocation(proxyProject_, moduleName_ );
85
		javaWSDLParam_.setJavaOutput(output);
88
			//String output = PlatformUtils.getPlatformURL(webModuleServerRoot);
86
89
			String output =	ResourceUtils.findResource(webModuleServerRoot).getLocation().toString();
87
90
//			String output = ResourceUtils.getWorkspaceRoot().getFolder(webModuleServerRoot).getLocation().toString();
88
		IFolder webModuleContainer = ResourceUtils.getWebComponentServerRoot(proxyProject_, moduleName_);
91
			javaWSDLParam_.setJavaOutput(output);
89
		if (webModuleContainer !=null)
92
90
		{
93
91
		  IPath webModulePath = webModuleContainer.getFullPath();
94
			IFolder webModuleContainer = ResourceUtils.getWebComponentServerRoot(proxyProject_, moduleName_);
92
		  //output =  PlatformUtils.getPlatformURL(webModulePath);
95
			if (webModuleContainer !=null)
93
		  IResource res = ResourceUtils.findResource(webModulePath);
96
			{
94
		  if (res!=null){
97
			  IPath webModulePath = webModuleContainer.getFullPath();
95
			  output = res.getLocation().toString();
98
			  //output =  PlatformUtils.getPlatformURL(webModulePath);
96
		  } 
99
			  IResource res = ResourceUtils.findResource(webModulePath);
97
		  javaWSDLParam_.setOutput(output);
100
			  if (res!=null){
98
		}
101
				  output = res.getLocation().toString();
102
			  } 
103
			  javaWSDLParam_.setOutput(output);
104
			}	
105
	    }
106
	    else
107
	    {
108
	    	//Check if it's a plain old Java project
109
	    	IJavaProject javaProject = null;
110
	  
111
	 		 javaProject = JavaCore.create(proxyProject_);    
112
	 		 if (javaProject != null)
113
	 		 {
114
	 			IPath webModuleServerRoot = ResourceUtils.getJavaSourceLocation(proxyProject_);
115
				String output =	ResourceUtils.findResource(webModuleServerRoot).getLocation().toString();
116
				javaWSDLParam_.setJavaOutput(output);
117
				javaWSDLParam_.setOutput(output);
118
	 		 }
119
	 		 else
120
	 		 {
121
	 			 //Not familiar with this kind of project
122
	 	 		 status = new SimpleStatus("", msgUtils_.getMessage("MSG_WARN_NO_JAVA_NATURE"), Status.ERROR);	
123
	 	 		 environment.getStatusHandler().reportError(status);
124
	 	 		 return status;
125
	 			 
126
	 		 }
127
	    }
128
99
129
100
130
101
		if (WSDLServicePathname_ == null) {
131
		if (WSDLServicePathname_ == null) {
(-)src/org/eclipse/jst/ws/internal/axis/consumption/ui/task/CopyAxisJarCommand.java (-1 / +175 lines)
Lines 11-34 Link Here
11
package org.eclipse.jst.ws.internal.axis.consumption.ui.task;
11
package org.eclipse.jst.ws.internal.axis.consumption.ui.task;
12
12
13
13
14
import java.io.File;
15
import java.io.IOException;
16
import java.net.MalformedURLException;
17
import java.net.URL;
18
14
import org.eclipse.core.resources.IFile;
19
import org.eclipse.core.resources.IFile;
15
import org.eclipse.core.resources.IProject;
20
import org.eclipse.core.resources.IProject;
21
import org.eclipse.core.runtime.CoreException;
16
import org.eclipse.core.runtime.IPath;
22
import org.eclipse.core.runtime.IPath;
17
import org.eclipse.core.runtime.IPluginDescriptor;
23
import org.eclipse.core.runtime.IPluginDescriptor;
18
import org.eclipse.core.runtime.IPluginRegistry;
24
import org.eclipse.core.runtime.IPluginRegistry;
25
import org.eclipse.core.runtime.IProgressMonitor;
26
import org.eclipse.core.runtime.IStatus;
19
import org.eclipse.core.runtime.Path;
27
import org.eclipse.core.runtime.Path;
20
import org.eclipse.core.runtime.Platform;
28
import org.eclipse.core.runtime.Platform;
21
import org.eclipse.core.runtime.Plugin;
29
import org.eclipse.core.runtime.Plugin;
30
import org.eclipse.jdt.core.IClasspathEntry;
31
import org.eclipse.jdt.core.IJavaProject;
32
import org.eclipse.jdt.core.JavaCore;
33
import org.eclipse.jdt.core.JavaModelException;
34
import org.eclipse.jst.ws.internal.axis.consumption.ui.plugin.WebServiceAxisConsumptionUIPlugin;
22
import org.eclipse.jst.ws.internal.common.J2EEUtils;
35
import org.eclipse.jst.ws.internal.common.J2EEUtils;
23
import org.eclipse.jst.ws.internal.common.ResourceUtils;
36
import org.eclipse.jst.ws.internal.common.ResourceUtils;
24
import org.eclipse.wst.command.internal.env.common.FileResourceUtils;
37
import org.eclipse.wst.command.internal.env.common.FileResourceUtils;
38
import org.eclipse.wst.command.internal.env.ui.eclipse.EclipseProgressMonitor;
25
import org.eclipse.wst.command.internal.provisional.env.core.SimpleCommand;
39
import org.eclipse.wst.command.internal.provisional.env.core.SimpleCommand;
26
import org.eclipse.wst.command.internal.provisional.env.core.common.Environment;
40
import org.eclipse.wst.command.internal.provisional.env.core.common.Environment;
27
import org.eclipse.wst.command.internal.provisional.env.core.common.MessageUtils;
41
import org.eclipse.wst.command.internal.provisional.env.core.common.MessageUtils;
42
import org.eclipse.wst.command.internal.provisional.env.core.common.ProgressMonitor;
28
import org.eclipse.wst.command.internal.provisional.env.core.common.SimpleStatus;
43
import org.eclipse.wst.command.internal.provisional.env.core.common.SimpleStatus;
29
import org.eclipse.wst.command.internal.provisional.env.core.common.Status;
44
import org.eclipse.wst.command.internal.provisional.env.core.common.Status;
45
import org.eclipse.wst.command.internal.provisional.env.core.common.StatusException;
30
import org.eclipse.wst.command.internal.provisional.env.core.context.ResourceContext;
46
import org.eclipse.wst.command.internal.provisional.env.core.context.ResourceContext;
31
import org.eclipse.wst.command.internal.provisional.env.core.context.TransientResourceContext;
47
import org.eclipse.wst.command.internal.provisional.env.core.context.TransientResourceContext;
48
import org.eclipse.wst.common.componentcore.ModuleCoreNature;
32
49
33
50
34
public class CopyAxisJarCommand extends SimpleCommand {
51
public class CopyAxisJarCommand extends SimpleCommand {
Lines 44-49 Link Here
44
	  "saaj.jar",
61
	  "saaj.jar",
45
	  "wsdl4j-1.5.1.jar"
62
	  "wsdl4j-1.5.1.jar"
46
  };
63
  };
64
  public static String PATH_TO_JARS_IN_PLUGIN = "lib/";
47
65
48
  private String DESCRIPTION = "TASK_DESC_COPY_JARS_TO_PROJECT";
66
  private String DESCRIPTION = "TASK_DESC_COPY_JARS_TO_PROJECT";
49
  private String LABEL = "TASK_LABEL_COPY_JARS_TO_PROJECT";
67
  private String LABEL = "TASK_LABEL_COPY_JARS_TO_PROJECT";
Lines 73-79 Link Here
73
  public Status execute(Environment env) {
91
  public Status execute(Environment env) {
74
    Status status = new SimpleStatus("");
92
    Status status = new SimpleStatus("");
75
    env.getProgressMonitor().report(msgUtils_.getMessage("PROGRESS_INFO_COPY_AXIS_CFG"));
93
    env.getProgressMonitor().report(msgUtils_.getMessage("PROGRESS_INFO_COPY_AXIS_CFG"));
76
    copyAxisJarsToProject(project, status, env);
94
    
95
    ModuleCoreNature mn = ModuleCoreNature.getModuleCoreNature(project);
96
    if (mn!=null)
97
    {
98
    	copyAxisJarsToProject(project, status, env);	
99
    }
100
    else
101
    {
102
    	//Check if it's a plain old Java project
103
    	IJavaProject javaProject = null;
104
  
105
 		 javaProject = JavaCore.create(project);    
106
 		 if (javaProject != null)
107
 		 {
108
 			status = addAxisJarsToBuildPath(project, env);
109
 			if (status.getSeverity()==Status.ERROR)
110
 			{
111
 				env.getStatusHandler().reportError(status);
112
 				return status;
113
 			}
114
 		 }
115
 		 else
116
 		 {
117
 		   status = new SimpleStatus("", msgUtils_.getMessage("MSG_WARN_NO_JAVA_NATURE"), Status.ERROR);	
118
 		   env.getStatusHandler().reportError(status);
119
 		   return status;
120
 		 }
121
122
    }
123
    
77
    return status;
124
    return status;
78
125
79
  }
126
  }
Lines 127-132 Link Here
127
    }
174
    }
128
  }
175
  }
129
176
177
  public Status addAxisJarsToBuildPath(IProject p, Environment env)
178
  {
179
	  for (int i=0; i<JARLIST.length; i++)
180
	  {
181
		  StringBuffer sb = new StringBuffer();
182
		  sb.append(PATH_TO_JARS_IN_PLUGIN);
183
		  sb.append(JARLIST[i]);
184
		  String jarName = sb.toString();
185
		  Status status = AddJar(p, AXIS_RUNTIME_PLUGIN_ID, jarName, env);
186
		  if (status.getSeverity()==Status.ERROR)
187
		  {			  
188
			  return status;
189
		  }
190
	  }
191
	  return new SimpleStatus("");
192
  }
193
  
194
	private Status AddJar(IProject webProject, String pluginId, String jarName, Environment env)  {
195
		
196
		   Status status = new SimpleStatus("");
197
		   //
198
		   // Get the current classpath.
199
		   //
200
		   IJavaProject javaProject_ = null;
201
		   IClasspathEntry[] oldClasspath = null;
202
    	   javaProject_ = JavaCore.create(webProject); 
203
    	   try
204
    	   {
205
		   oldClasspath = javaProject_.getRawClasspath();
206
    	   }
207
    	   catch(JavaModelException jme)
208
    	   {
209
    		   status = new SimpleStatus("", msgUtils_.getMessage("MSG_ERROR_BAD_BUILDPATH"), Status.ERROR, jme);
210
    		   //env.getStatusHandler().reportError(status);
211
    		   return status;
212
    	   }
213
214
215
		   boolean found = false;
216
		   for (int i=0; i<oldClasspath.length; i++)
217
		   {
218
			 found = found || oldClasspath[i].getPath().toString().toLowerCase().endsWith(jarName.toLowerCase());
219
		   }
220
221
		   if (found) 
222
		   {
223
			 return status;
224
		   }
225
226
		   IClasspathEntry[] newClasspath = new IClasspathEntry[oldClasspath.length + 1];
227
		   int i=0;
228
		   while (i<oldClasspath.length)
229
		   {
230
			 newClasspath[i] = oldClasspath[i];
231
			 i++;
232
		   }
233
234
		   try
235
		   {
236
237
			   newClasspath[i++] = JavaCore.newLibraryEntry(getTheJarPath(pluginId,jarName), null, null);
238
239
		   }
240
		   catch (CoreException e)
241
		   {
242
			 status = new SimpleStatus("", msgUtils_.getMessage("MSG_ERROR_BAD_BUILDPATH"), Status.ERROR, e);
243
			 return status;
244
		   }
245
246
		   //
247
		   // Then update the project classpath.
248
		   //
249
		   try
250
		   {
251
		   	 ProgressMonitor monitor = env.getProgressMonitor();
252
		   	 IProgressMonitor eclipseMonitor = null;
253
		   	 if (monitor instanceof EclipseProgressMonitor)
254
		   	 {
255
		   	 	eclipseMonitor = ((EclipseProgressMonitor)monitor).getMonitor();
256
		   	 }
257
			 javaProject_.setRawClasspath(newClasspath,eclipseMonitor);
258
		   }
259
		   catch (JavaModelException e)
260
		   {
261
			 status = new SimpleStatus("", msgUtils_.getMessage("MSG_ERROR_BAD_BUILDPATH"), Status.ERROR, e);
262
			 return status;
263
		   }
264
		   
265
		   return status;
266
		 }
267
268
		//
269
		// Returns the local native pathname of the jar.
270
		//
271
		private IPath getTheJarPath(String pluginId, String theJar)
272
			throws CoreException {
273
			try {
274
				if (pluginId != null) {
275
					IPluginRegistry pluginRegistry = Platform.getPluginRegistry();
276
					IPluginDescriptor pluginDescriptor =
277
						pluginRegistry.getPluginDescriptor(pluginId);
278
					URL localURL =
279
						Platform.asLocalURL(
280
							new URL(pluginDescriptor.getInstallURL(), theJar));
281
					return new Path(localURL.getFile());
282
				} else {
283
					return new Path(theJar);
284
				}
285
			} catch (MalformedURLException e) {
286
				throw new CoreException(
287
					new org.eclipse.core.runtime.Status(
288
						IStatus.WARNING,
289
						WebServiceAxisConsumptionUIPlugin.ID,
290
						0,
291
						msgUtils_.getMessage("MSG_BAD_AXIS_JAR_URL"),
292
						e));
293
			} catch (IOException e) {
294
				throw new CoreException(
295
					new org.eclipse.core.runtime.Status(
296
						IStatus.WARNING,
297
						WebServiceAxisConsumptionUIPlugin.ID,
298
						0,
299
						msgUtils_.getMessage("MSG_BAD_AXIS_JAR_URL"),
300
						e));
301
			}
302
		}  
303
  
130
  public void setProject(IProject project) {
304
  public void setProject(IProject project) {
131
    this.project = project;
305
    this.project = project;
132
  }
306
  }
(-)src/org/eclipse/jst/ws/internal/axis/consumption/ui/task/Stub2BeanCommand.java (+27 lines)
Lines 28-39 Link Here
28
28
29
import org.eclipse.core.resources.IProject;
29
import org.eclipse.core.resources.IProject;
30
import org.eclipse.core.runtime.CoreException;
30
import org.eclipse.core.runtime.CoreException;
31
import org.eclipse.jdt.core.IJavaProject;
32
import org.eclipse.jdt.core.JavaCore;
31
import org.eclipse.jst.ws.internal.axis.consumption.core.common.JavaWSDLParameter;
33
import org.eclipse.jst.ws.internal.axis.consumption.core.common.JavaWSDLParameter;
32
import org.eclipse.jst.ws.internal.axis.consumption.ui.util.WSDLUtils;
34
import org.eclipse.jst.ws.internal.axis.consumption.ui.util.WSDLUtils;
35
import org.eclipse.jst.ws.internal.common.ResourceUtils;
33
import org.eclipse.wst.command.internal.provisional.env.core.SimpleCommand;
36
import org.eclipse.wst.command.internal.provisional.env.core.SimpleCommand;
34
import org.eclipse.wst.command.internal.provisional.env.core.common.Environment;
37
import org.eclipse.wst.command.internal.provisional.env.core.common.Environment;
38
import org.eclipse.wst.command.internal.provisional.env.core.common.MessageUtils;
35
import org.eclipse.wst.command.internal.provisional.env.core.common.SimpleStatus;
39
import org.eclipse.wst.command.internal.provisional.env.core.common.SimpleStatus;
36
import org.eclipse.wst.command.internal.provisional.env.core.common.Status;
40
import org.eclipse.wst.command.internal.provisional.env.core.common.Status;
41
import org.eclipse.wst.common.componentcore.ModuleCoreNature;
37
import org.eclipse.wst.ws.internal.parser.wsil.WebServicesParser;
42
import org.eclipse.wst.ws.internal.parser.wsil.WebServicesParser;
38
43
39
44
Lines 48-58 Link Here
48
  private String module_ = "";
53
  private String module_ = "";
49
  
54
  
50
  private IProject clientProject_;
55
  private IProject clientProject_;
56
  
57
  private MessageUtils msgUtils_;
51
58
52
  public Stub2BeanCommand()
59
  public Stub2BeanCommand()
53
  {
60
  {
54
    super("org.eclipse.jst.ws.was.creation.ui.task.Stub2BeanCommand", "org.eclipse.jst.ws.was.creation.ui.task.Stub2BeanCommand");
61
    super("org.eclipse.jst.ws.was.creation.ui.task.Stub2BeanCommand", "org.eclipse.jst.ws.was.creation.ui.task.Stub2BeanCommand");
55
    portTypes_ = new Vector();
62
    portTypes_ = new Vector();
63
    String pluginId = "org.eclipse.jst.ws.axis.consumption.ui";
64
    msgUtils_ = new MessageUtils(pluginId + ".plugin", this);    
56
    //setRunInWorkspaceModifyOperation(false);
65
    //setRunInWorkspaceModifyOperation(false);
57
  }
66
  }
58
  
67
  
Lines 60-65 Link Here
60
	  super("org.eclipse.jst.ws.was.creation.ui.task.Stub2BeanCommand", "org.eclipse.jst.ws.was.creation.ui.task.Stub2BeanCommand");
69
	  super("org.eclipse.jst.ws.was.creation.ui.task.Stub2BeanCommand", "org.eclipse.jst.ws.was.creation.ui.task.Stub2BeanCommand");
61
	  portTypes_ = new Vector();	  
70
	  portTypes_ = new Vector();	  
62
	  module_ = moduleName;
71
	  module_ = moduleName;
72
	  String pluginId = "org.eclipse.jst.ws.axis.consumption.ui";
73
	  msgUtils_ = new MessageUtils(pluginId + ".plugin", this);	  
63
  }
74
  }
64
75
65
  /**
76
  /**
Lines 87-92 Link Here
87
        }
98
        }
88
      }
99
      }
89
    }
100
    }
101
    
102
    //Ensure the client project is either a flexible project or a Java project
103
    ModuleCoreNature mn = ModuleCoreNature.getModuleCoreNature(clientProject_);
104
    if (mn==null)
105
    {
106
        // Check if it's a plain old Java project
107
    	IJavaProject javaProject = null;    	  
108
		javaProject = JavaCore.create(clientProject_);    
109
		if (javaProject == null)
110
		{
111
	 		   Status status = new SimpleStatus("", msgUtils_.getMessage("MSG_WARN_NO_JAVA_NATURE"), Status.ERROR);	
112
	 		   env.getStatusHandler().reportError(status);
113
	 		   return status;
114
		}    	
115
    }
116
    
90
    Map pkg2nsMapping = javaWSDLParam_.getMappings();
117
    Map pkg2nsMapping = javaWSDLParam_.getMappings();
91
    Map services = def.getServices();
118
    Map services = def.getServices();
92
    for (Iterator it = services.values().iterator(); it.hasNext();)
119
    for (Iterator it = services.values().iterator(); it.hasNext();)
(-)src/org/eclipse/jst/ws/internal/axis/consumption/ui/task/Stub2BeanInfo.java (-3 / +32 lines)
Lines 26-31 Link Here
26
import org.eclipse.core.runtime.CoreException;
26
import org.eclipse.core.runtime.CoreException;
27
import org.eclipse.core.runtime.IPath;
27
import org.eclipse.core.runtime.IPath;
28
import org.eclipse.core.runtime.Path;
28
import org.eclipse.core.runtime.Path;
29
import org.eclipse.jdt.core.IJavaProject;
30
import org.eclipse.jdt.core.JavaCore;
29
import org.eclipse.jem.internal.plugin.JavaEMFNature;
31
import org.eclipse.jem.internal.plugin.JavaEMFNature;
30
import org.eclipse.jem.java.JavaClass;
32
import org.eclipse.jem.java.JavaClass;
31
import org.eclipse.jem.java.JavaHelpers;
33
import org.eclipse.jem.java.JavaHelpers;
Lines 39-44 Link Here
39
import org.eclipse.wst.command.internal.env.common.FileResourceUtils;
41
import org.eclipse.wst.command.internal.env.common.FileResourceUtils;
40
import org.eclipse.wst.command.internal.provisional.env.core.common.ProgressMonitor;
42
import org.eclipse.wst.command.internal.provisional.env.core.common.ProgressMonitor;
41
import org.eclipse.wst.command.internal.provisional.env.core.common.StatusHandler;
43
import org.eclipse.wst.command.internal.provisional.env.core.common.StatusHandler;
44
import org.eclipse.wst.common.componentcore.ModuleCoreNature;
42
45
43
public class Stub2BeanInfo
46
public class Stub2BeanInfo
44
{
47
{
Lines 216-224 Link Here
216
219
217
    JavaEMFNature javaMOF = (JavaEMFNature)JavaEMFNature.createRuntime(clientProject_);
220
    JavaEMFNature javaMOF = (JavaEMFNature)JavaEMFNature.createRuntime(clientProject_);
218
    ByteArrayInputStream bais = new ByteArrayInputStream(bytes);
221
    ByteArrayInputStream bais = new ByteArrayInputStream(bytes);
219
    IPath sourceFolderPath = ResourceUtils.getJavaSourceLocation(clientProject_, moduleName_);
222
    IPath sourceFolderPath = null;
220
    IFolder sourceFolder = (IFolder)ResourceUtils.findResource(sourceFolderPath);
223
    IPath filePath = null;
221
    IPath filePath = sourceFolder.getFile(new Path(sb.toString())).getFullPath();
224
    ModuleCoreNature mn = ModuleCoreNature.getModuleCoreNature(clientProject_);
225
    if (mn!=null)
226
    {
227
    	sourceFolderPath = ResourceUtils.getJavaSourceLocation(clientProject_, moduleName_);
228
        IFolder sourceFolder = (IFolder)ResourceUtils.findResource(sourceFolderPath);
229
        filePath = sourceFolder.getFile(new Path(sb.toString())).getFullPath();    	
230
    }
231
    else
232
    {
233
        // It's a plain old Java project
234
    	IJavaProject javaProject = null;    	  
235
		javaProject = JavaCore.create(clientProject_);
236
237
		sourceFolderPath = ResourceUtils.getJavaSourceLocation(clientProject_);
238
		IResource sourceFolderResource = ResourceUtils.findResource(sourceFolderPath);
239
		if (sourceFolderResource instanceof IFolder) 
240
		{
241
				IFolder sourceFolder = (IFolder) sourceFolderResource;
242
				filePath = sourceFolder.getFile(new Path(sb.toString())).getFullPath();
243
		} else 
244
		{
245
			// The source must be going directly in the project
246
			filePath = clientProject_.getFile(new Path(sb.toString())).getFullPath();
247
		}
248
		
249
    }
250
222
    FileResourceUtils.createFile(WebServicePlugin.getInstance().getResourceContext(), filePath, bais, progressMonitor, statusMonitor);
251
    FileResourceUtils.createFile(WebServicePlugin.getInstance().getResourceContext(), filePath, bais, progressMonitor, statusMonitor);
223
  }
252
  }
224
253
(-)src/org/eclipse/jst/ws/internal/axis/consumption/ui/wsrt/AxisWebServiceClient.java (+21 lines)
Lines 6-11 Link Here
6
import org.eclipse.jst.ws.internal.axis.consumption.ui.command.AxisClientDefaultingCommand;
6
import org.eclipse.jst.ws.internal.axis.consumption.ui.command.AxisClientDefaultingCommand;
7
import org.eclipse.jst.ws.internal.axis.consumption.ui.command.AxisClientInputCommand;
7
import org.eclipse.jst.ws.internal.axis.consumption.ui.command.AxisClientInputCommand;
8
import org.eclipse.jst.ws.internal.axis.consumption.ui.command.AxisClientOutputCommand;
8
import org.eclipse.jst.ws.internal.axis.consumption.ui.command.AxisClientOutputCommand;
9
import org.eclipse.jst.ws.internal.axis.consumption.ui.command.CopyClientWSDLCommand;
9
import org.eclipse.jst.ws.internal.axis.consumption.ui.command.DefaultsForClientJavaWSDLCommand;
10
import org.eclipse.jst.ws.internal.axis.consumption.ui.command.DefaultsForClientJavaWSDLCommand;
10
import org.eclipse.jst.ws.internal.axis.consumption.ui.task.CopyAxisJarCommand;
11
import org.eclipse.jst.ws.internal.axis.consumption.ui.task.CopyAxisJarCommand;
11
import org.eclipse.jst.ws.internal.axis.consumption.ui.task.DefaultsForHTTPBasicAuthCommand;
12
import org.eclipse.jst.ws.internal.axis.consumption.ui.task.DefaultsForHTTPBasicAuthCommand;
Lines 63-69 Link Here
63
		commands.add(new WSDL2JavaCommand());
64
		commands.add(new WSDL2JavaCommand());
64
		commands.add(new RefreshProjectCommand());
65
		commands.add(new RefreshProjectCommand());
65
		commands.add(new Stub2BeanCommand(module));
66
		commands.add(new Stub2BeanCommand(module));
67
		//TODO
68
		//This should be uncommented once patches the outputWSDLFilename attribute gets put on
69
		//WebServiceClientInfo
70
		/*
71
		String outputWSDLFileName = getWebServiceClientInfo().getOutputWSDLFilename(); 
72
		if (outputWSDLFileName != null && outputWSDLFileName.length()>0)
73
		{
74
			CopyClientWSDLCommand copyCommand = new CopyClientWSDLCommand();
75
		    copyCommand.setClientWSDLPathName(getWebServiceClientInfo().getOutputWSDLFilename());
76
		    commands.add(copyCommand);
77
		}
78
		*/
66
		commands.add(new AxisClientOutputCommand(this,ctx,module));
79
		commands.add(new AxisClientOutputCommand(this,ctx,module));
80
		
67
		commands.add(new BuildProjectCommand());
81
		commands.add(new BuildProjectCommand());
68
		return new SimpleCommandFactory(commands);
82
		return new SimpleCommandFactory(commands);
69
	}
83
	}
Lines 149-153 Link Here
149
		registry.addMapping(AxisClientDefaultingCommand.class, "GenerateProxy", AxisClientCommandsFragment.class);
163
		registry.addMapping(AxisClientDefaultingCommand.class, "GenerateProxy", AxisClientCommandsFragment.class);
150
//		registry.addMapping(AxisClientDefaultingCommand.class, "GenerateProxy", ClientExtensionOutputCommand.class);
164
//		registry.addMapping(AxisClientDefaultingCommand.class, "GenerateProxy", ClientExtensionOutputCommand.class);
151
//		registry.addMapping(AxisClientDefaultingCommand.class, "SetEndpointMethod", ClientExtensionOutputCommand.class);
165
//		registry.addMapping(AxisClientDefaultingCommand.class, "SetEndpointMethod", ClientExtensionOutputCommand.class);
166
		
167
		
168
        //TODO
169
		//These two data mappings should be uncommented once patches the outputWSDLFilename attribute gets put on
170
		//WebServiceClientInfo		
171
		//registry.addMapping(AxisClientDefaultingCommand.class, "WsdlURL", CopyClientWSDLCommand.class, "WsdlURL", null); //OK
172
		//registry.addMapping(AxisClientDefaultingCommand.class, "WebServicesParser", CopyClientWSDLCommand.class, "WsParser", null);
152
	}
173
	}
153
}
174
}

Return to bug 89924