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 115144
Collapse All | Expand All

(-)src/org/eclipse/jst/ws/internal/axis/consumption/ui/command/DefaultsForClientJavaWSDLCommand.java (-80 / +109 lines)
Lines 1-16 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2003, 2004 IBM Corporation and others.
2
 * Copyright (c) 2003, 2006 IBM Corporation and others.
3
 * All rights reserved. This program and the accompanying materials
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
5
 * which accompanies this distribution, and is available at
6
 * http://www.eclipse.org/legal/epl-v10.html
6
 * http://www.eclipse.org/legal/epl-v10.html
7
 * 
7
 *
8
 * Contributors:
8
 * Contributors:
9
 *     IBM Corporation - initial API and implementation
9
 * IBM Corporation - initial API and implementation
10
 * yyyymmdd bug      Email and other contact information
11
 * -------- -------- -----------------------------------------------------------
12
 * 20060216   115144 pmoogk@ca.ibm.com - Peter Moogk
10
 *******************************************************************************/
13
 *******************************************************************************/
11
package org.eclipse.jst.ws.internal.axis.consumption.ui.command;
14
package org.eclipse.jst.ws.internal.axis.consumption.ui.command;
12
15
13
14
import org.eclipse.core.resources.IFolder;
16
import org.eclipse.core.resources.IFolder;
15
import org.eclipse.core.resources.IProject;
17
import org.eclipse.core.resources.IProject;
16
import org.eclipse.core.resources.IResource;
18
import org.eclipse.core.resources.IResource;
Lines 18-23 Link Here
18
import org.eclipse.core.runtime.IPath;
20
import org.eclipse.core.runtime.IPath;
19
import org.eclipse.core.runtime.IProgressMonitor;
21
import org.eclipse.core.runtime.IProgressMonitor;
20
import org.eclipse.core.runtime.IStatus;
22
import org.eclipse.core.runtime.IStatus;
23
import org.eclipse.core.runtime.Path;
21
import org.eclipse.core.runtime.Status;
24
import org.eclipse.core.runtime.Status;
22
import org.eclipse.jdt.core.IJavaProject;
25
import org.eclipse.jdt.core.IJavaProject;
23
import org.eclipse.jdt.core.JavaCore;
26
import org.eclipse.jdt.core.JavaCore;
Lines 31-157 Link Here
31
import org.eclipse.wst.common.environment.IEnvironment;
34
import org.eclipse.wst.common.environment.IEnvironment;
32
import org.eclipse.wst.common.frameworks.datamodel.AbstractDataModelOperation;
35
import org.eclipse.wst.common.frameworks.datamodel.AbstractDataModelOperation;
33
36
37
public class DefaultsForClientJavaWSDLCommand extends AbstractDataModelOperation
38
{
39
	private JavaWSDLParameter	javaWSDLParam_;
40
	private IProject					proxyProject_;
41
	private String						WSDLServiceURL_;
42
	private String						WSDLServicePathname_;
43
	private String						outputFolder_;
34
44
35
public class DefaultsForClientJavaWSDLCommand extends AbstractDataModelOperation {
45
	public DefaultsForClientJavaWSDLCommand()
36
46
	{
37
	private JavaWSDLParameter javaWSDLParam_;
38
	private IProject proxyProject_;
39
	private String WSDLServiceURL_;
40
	private String WSDLServicePathname_;
41
	
42
	public DefaultsForClientJavaWSDLCommand( ) {
43
	}
47
	}
44
	
48
45
	public IStatus execute( IProgressMonitor monitor, IAdaptable adaptable ) 
49
	public IStatus execute(IProgressMonitor monitor, IAdaptable adaptable)
46
	{
50
	{
47
		IEnvironment environment = getEnvironment();
51
		IEnvironment environment = getEnvironment();
48
		IStatus status;
52
		IStatus status;
49
		if (javaWSDLParam_ == null) {
53
		
50
			status = StatusUtils.errorStatus(
54
		if( outputFolder_ == null )
51
					AxisConsumptionCoreMessages.MSG_ERROR_JAVA_WSDL_PARAM_NOT_SET);
55
		{
56
			IPath[] paths = ResourceUtils.getAllJavaSourceLocations(proxyProject_);
57
			outputFolder_ = paths[0].toString();
58
		}
59
		
60
		if (javaWSDLParam_ == null)
61
		{
62
			status = StatusUtils
63
					.errorStatus(AxisConsumptionCoreMessages.MSG_ERROR_JAVA_WSDL_PARAM_NOT_SET);
52
			environment.getStatusHandler().reportError(status);
64
			environment.getStatusHandler().reportError(status);
53
			return status;
65
			return status;
54
		}
66
		}
55
56
		javaWSDLParam_.setMetaInfOnly(false);
67
		javaWSDLParam_.setMetaInfOnly(false);
57
		javaWSDLParam_.setServerSide(JavaWSDLParameter.SERVER_SIDE_NONE);
68
		javaWSDLParam_.setServerSide(JavaWSDLParameter.SERVER_SIDE_NONE);
58
		
69
		ModuleCoreNature mn = ModuleCoreNature.getModuleCoreNature(proxyProject_);
59
	    ModuleCoreNature mn = ModuleCoreNature.getModuleCoreNature(proxyProject_);
70
		if (mn != null)
60
	    if (mn!=null)
71
		{
61
	    {
72
			IPath webModuleServerRoot = ResourceUtils.getJavaSourceLocation(proxyProject_);
62
			IPath webModuleServerRoot = ResourceUtils.getJavaSourceLocation(proxyProject_ );
73
			// String output = PlatformUtils.getPlatformURL(webModuleServerRoot);
63
			//String output = PlatformUtils.getPlatformURL(webModuleServerRoot);
74
			String output = ResourceUtils.findResource(webModuleServerRoot).getLocation().toString();
64
			String output =	ResourceUtils.findResource(webModuleServerRoot).getLocation().toString();
75
			// String output =
65
//			String output = ResourceUtils.getWorkspaceRoot().getFolder(webModuleServerRoot).getLocation().toString();
76
			// ResourceUtils.getWorkspaceRoot().getFolder(webModuleServerRoot).getLocation().toString();
66
			javaWSDLParam_.setJavaOutput(output);
77
			IPath javaOutput = ResourceUtils.findResource( new Path( outputFolder_ )).getLocation();
67
78
			javaWSDLParam_.setJavaOutput(javaOutput.toString());
68
79
			
69
			IFolder webModuleContainer = ResourceUtils.getWebComponentServerRoot(proxyProject_);
80
			IFolder webModuleContainer = ResourceUtils.getWebComponentServerRoot(proxyProject_);
70
			if (webModuleContainer !=null)
81
			if (webModuleContainer != null)
71
			{
82
			{
72
			  IPath webModulePath = webModuleContainer.getFullPath();
83
				IPath webModulePath = webModuleContainer.getFullPath();
73
			  //output =  PlatformUtils.getPlatformURL(webModulePath);
84
				// output = PlatformUtils.getPlatformURL(webModulePath);
74
			  IResource res = ResourceUtils.findResource(webModulePath);
85
				IResource res = ResourceUtils.findResource(webModulePath);
75
			  if (res!=null){
86
				if (res != null)
76
				  output = res.getLocation().toString();
87
				{
77
			  } 
88
					output = res.getLocation().toString();
78
			  javaWSDLParam_.setOutput(output);
89
				}
79
			}	
80
	    }
81
	    else
82
	    {
83
	    	//Check if it's a plain old Java project
84
	    	IJavaProject javaProject = null;
85
	  
86
	 		 javaProject = JavaCore.create(proxyProject_);    
87
	 		 if (javaProject != null)
88
	 		 {
89
	 			IPath webModuleServerRoot = ResourceUtils.getJavaSourceLocation(proxyProject_);
90
				String output =	ResourceUtils.findResource(webModuleServerRoot).getLocation().toString();
91
				javaWSDLParam_.setJavaOutput(output);
92
				javaWSDLParam_.setOutput(output);
90
				javaWSDLParam_.setOutput(output);
93
	 		 }
91
			}
94
	 		 else
92
		}
95
	 		 {
93
		else
96
	 			 //Not familiar with this kind of project
94
		{
97
	 	 		 status = StatusUtils.errorStatus( AxisConsumptionUIMessages.MSG_WARN_NO_JAVA_NATURE);	
95
			// Check if it's a plain old Java project
98
	 	 		 environment.getStatusHandler().reportError(status);
96
			IJavaProject javaProject = null;
99
	 	 		 return status;
97
			javaProject = JavaCore.create(proxyProject_);
100
	 			 
98
			if (javaProject != null)
101
	 		 }
99
			{
102
	    }
100
				IPath output = ResourceUtils.findResource( new Path( outputFolder_ )).getLocation();
103
101
				javaWSDLParam_.setJavaOutput(output.toString());
104
102
				javaWSDLParam_.setOutput(output.toString());
105
103
			}
106
		if (WSDLServicePathname_ == null) {
104
			else
107
			
105
			{
108
			if (WSDLServiceURL_ == null) {
106
				// Not familiar with this kind of project
109
				status = StatusUtils.errorStatus(
107
				status = StatusUtils.errorStatus(AxisConsumptionUIMessages.MSG_WARN_NO_JAVA_NATURE);
110
						AxisConsumptionUIMessages.MSG_ERROR_WSDL_LOCATION_NOT_SET);
108
				environment.getStatusHandler().reportError(status);
109
				return status;
110
			}
111
		}
112
		if (WSDLServicePathname_ == null)
113
		{
114
			if (WSDLServiceURL_ == null)
115
			{
116
				status = StatusUtils.errorStatus(AxisConsumptionUIMessages.MSG_ERROR_WSDL_LOCATION_NOT_SET);
111
				environment.getStatusHandler().reportError(status);
117
				environment.getStatusHandler().reportError(status);
112
				return status;
118
				return status;
113
			}
119
			}
114
		} else {
120
		}
121
		else
122
		{
115
			WSDLServiceURL_ = PlatformUtils.getFileFromPlatform(WSDLServicePathname_);
123
			WSDLServiceURL_ = PlatformUtils.getFileFromPlatform(WSDLServicePathname_);
116
		}
124
		}
117
118
		javaWSDLParam_.setInputWsdlLocation(WSDLServiceURL_);
125
		javaWSDLParam_.setInputWsdlLocation(WSDLServiceURL_);
119
120
		return Status.OK_STATUS;
126
		return Status.OK_STATUS;
121
	}
127
	}
122
128
123
	/**
129
	/**
124
	 * Returns the javaWSDLParam.
130
	 * Returns the javaWSDLParam.
131
	 * 
125
	 * @return JavaWSDLParameter
132
	 * @return JavaWSDLParameter
126
	 */
133
	 */
127
	public JavaWSDLParameter getJavaWSDLParam() {
134
	public JavaWSDLParameter getJavaWSDLParam()
135
	{
128
		return javaWSDLParam_;
136
		return javaWSDLParam_;
129
	}
137
	}
130
138
131
	/**
139
	/**
132
	 * Sets the javaWSDLParam.
140
	 * Sets the javaWSDLParam.
133
	 * @param javaWSDLParam The javaWSDLParam to set
141
	 * 
142
	 * @param javaWSDLParam
143
	 *          The javaWSDLParam to set
134
	 */
144
	 */
135
	public void setJavaWSDLParam(JavaWSDLParameter javaWSDLParam) {
145
	public void setJavaWSDLParam(JavaWSDLParameter javaWSDLParam)
146
	{
136
		this.javaWSDLParam_ = javaWSDLParam;
147
		this.javaWSDLParam_ = javaWSDLParam;
137
	}
148
	}
138
149
139
	/**
150
	/**
140
	 * @param proxyProject_ The proxyProject_ to set.
151
	 * @param proxyProject_
152
	 *          The proxyProject_ to set.
141
	 */
153
	 */
142
	public void setProxyProject(IProject proxyProject) {
154
	public void setProxyProject(IProject proxyProject)
155
	{
143
		this.proxyProject_ = proxyProject;
156
		this.proxyProject_ = proxyProject;
144
	}
157
	}
158
145
	/**
159
	/**
146
	 * @param serviceURL_ The wSDLServiceURL_ to set.
160
	 * @param serviceURL_
161
	 *          The wSDLServiceURL_ to set.
147
	 */
162
	 */
148
	public void setWSDLServiceURL(String serviceURL) {
163
	public void setWSDLServiceURL(String serviceURL)
164
	{
149
		WSDLServiceURL_ = serviceURL;
165
		WSDLServiceURL_ = serviceURL;
150
	}
166
	}
167
151
	/**
168
	/**
152
	 * @param servicePathname_ The wSDLServicePathname_ to set.
169
	 * @param servicePathname_
170
	 *          The wSDLServicePathname_ to set.
153
	 */
171
	 */
154
	public void setWSDLServicePathname(String servicePathname) {
172
	public void setWSDLServicePathname(String servicePathname)
173
	{
155
		WSDLServicePathname_ = servicePathname;
174
		WSDLServicePathname_ = servicePathname;
156
	}
175
	}
176
177
	public String getOutputFolder()
178
	{
179
	  return outputFolder_;	
180
	}
181
	
182
	public void setOutputFolder(String outputFolder)
183
	{
184
		outputFolder_ = outputFolder;
185
	}
157
}
186
}
(-)src/org/eclipse/jst/ws/internal/axis/consumption/ui/task/Stub2BeanCommand.java (-5 / +13 lines)
Lines 1-12 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2003, 2004 IBM Corporation and others.
2
 * Copyright (c) 2003, 2006 IBM Corporation and others.
3
 * All rights reserved. This program and the accompanying materials
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
5
 * which accompanies this distribution, and is available at
6
 * http://www.eclipse.org/legal/epl-v10.html
6
 * http://www.eclipse.org/legal/epl-v10.html
7
 * 
7
 *
8
 * Contributors:
8
 * Contributors:
9
 *     IBM Corporation - initial API and implementation
9
 * IBM Corporation - initial API and implementation
10
 * yyyymmdd bug      Email and other contact information
11
 * -------- -------- -----------------------------------------------------------
12
 * 20060216   115144 pmoogk@ca.ibm.com - Peter Moogk
10
 *******************************************************************************/
13
 *******************************************************************************/
11
14
12
package org.eclipse.jst.ws.internal.axis.consumption.ui.task;
15
package org.eclipse.jst.ws.internal.axis.consumption.ui.task;
Lines 18-31 Link Here
18
import java.util.List;
21
import java.util.List;
19
import java.util.Map;
22
import java.util.Map;
20
import java.util.Vector;
23
import java.util.Vector;
21
22
import javax.wsdl.Definition;
24
import javax.wsdl.Definition;
23
import javax.wsdl.Port;
25
import javax.wsdl.Port;
24
import javax.wsdl.PortType;
26
import javax.wsdl.PortType;
25
import javax.wsdl.Service;
27
import javax.wsdl.Service;
26
import javax.wsdl.extensions.soap.SOAPAddress;
28
import javax.wsdl.extensions.soap.SOAPAddress;
27
import javax.xml.namespace.QName;
29
import javax.xml.namespace.QName;
28
29
import org.eclipse.core.resources.IProject;
30
import org.eclipse.core.resources.IProject;
30
import org.eclipse.core.runtime.CoreException;
31
import org.eclipse.core.runtime.CoreException;
31
import org.eclipse.core.runtime.IAdaptable;
32
import org.eclipse.core.runtime.IAdaptable;
Lines 51-56 Link Here
51
  private String discoveredWsdlPortElementName;
52
  private String discoveredWsdlPortElementName;
52
  private Vector portTypes_;
53
  private Vector portTypes_;
53
  private String proxyBean_;
54
  private String proxyBean_;
55
  private String outputFolder_;
54
  
56
  
55
  private IProject clientProject_;
57
  private IProject clientProject_;
56
  
58
  
Lines 150-155 Link Here
150
            portTypes_.add(portTypeID.toString());
152
            portTypes_.add(portTypeID.toString());
151
            Stub2BeanInfo stub2BeanInfo = new Stub2BeanInfo();
153
            Stub2BeanInfo stub2BeanInfo = new Stub2BeanInfo();
152
            stub2BeanInfo.setClientProject(clientProject_);
154
            stub2BeanInfo.setClientProject(clientProject_);
155
            stub2BeanInfo.setOutputFolder( outputFolder_ );
153
            String portTypePkgName = NameMappingUtils.getPackageName(portType.getQName().getNamespaceURI(), pkg2nsMapping);
156
            String portTypePkgName = NameMappingUtils.getPackageName(portType.getQName().getNamespaceURI(), pkg2nsMapping);
154
            String portTypeClassName = computeClassName(portTypeQName.getLocalPart());
157
            String portTypeClassName = computeClassName(portTypeQName.getLocalPart());
155
            stub2BeanInfo.setPackage(portTypePkgName);
158
            stub2BeanInfo.setPackage(portTypePkgName);
Lines 237-240 Link Here
237
	public String getProxyBean() {
240
	public String getProxyBean() {
238
		return proxyBean_;
241
		return proxyBean_;
239
	}	
242
	}	
243
	
244
	public void setOutputFolder( String outputFolder )
245
	{
246
		outputFolder_ = outputFolder;
247
	}
240
}
248
}
(-)src/org/eclipse/jst/ws/internal/axis/consumption/ui/task/Stub2BeanInfo.java (-38 / +16 lines)
Lines 1-12 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2003, 2004 IBM Corporation and others.
2
 * Copyright (c) 2003, 2006 IBM Corporation and others.
3
 * All rights reserved. This program and the accompanying materials
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
5
 * which accompanies this distribution, and is available at
6
 * http://www.eclipse.org/legal/epl-v10.html
6
 * http://www.eclipse.org/legal/epl-v10.html
7
 * 
7
 *
8
 * Contributors:
8
 * Contributors:
9
 *     IBM Corporation - initial API and implementation
9
 * IBM Corporation - initial API and implementation
10
 * yyyymmdd bug      Email and other contact information
11
 * -------- -------- -----------------------------------------------------------
12
 * 20060216   115144 pmoogk@ca.ibm.com - Peter Moogk
10
 *******************************************************************************/
13
 *******************************************************************************/
11
14
12
package org.eclipse.jst.ws.internal.axis.consumption.ui.task;
15
package org.eclipse.jst.ws.internal.axis.consumption.ui.task;
Lines 19-43 Link Here
19
import java.util.List;
22
import java.util.List;
20
import java.util.StringTokenizer;
23
import java.util.StringTokenizer;
21
import java.util.Vector;
24
import java.util.Vector;
22
23
import org.eclipse.core.resources.IFolder;
24
import org.eclipse.core.resources.IProject;
25
import org.eclipse.core.resources.IProject;
25
import org.eclipse.core.resources.IResource;
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.IProgressMonitor;
28
import org.eclipse.core.runtime.IProgressMonitor;
29
import org.eclipse.core.runtime.Path;
29
import org.eclipse.core.runtime.Path;
30
import org.eclipse.jdt.core.JavaCore;
31
import org.eclipse.jem.java.JavaClass;
30
import org.eclipse.jem.java.JavaClass;
32
import org.eclipse.jem.java.JavaHelpers;
31
import org.eclipse.jem.java.JavaHelpers;
33
import org.eclipse.jem.java.JavaParameter;
32
import org.eclipse.jem.java.JavaParameter;
34
import org.eclipse.jem.java.JavaVisibilityKind;
33
import org.eclipse.jem.java.JavaVisibilityKind;
35
import org.eclipse.jem.java.Method;
34
import org.eclipse.jem.java.Method;
36
import org.eclipse.jst.ws.internal.common.JavaMOFUtils;
35
import org.eclipse.jst.ws.internal.common.JavaMOFUtils;
37
import org.eclipse.jst.ws.internal.common.ResourceUtils;
38
import org.eclipse.jst.ws.internal.plugin.WebServicePlugin;
36
import org.eclipse.jst.ws.internal.plugin.WebServicePlugin;
39
import org.eclipse.wst.command.internal.env.common.FileResourceUtils;
37
import org.eclipse.wst.command.internal.env.common.FileResourceUtils;
40
import org.eclipse.wst.common.componentcore.ModuleCoreNature;
41
import org.eclipse.wst.common.environment.IStatusHandler;
38
import org.eclipse.wst.common.environment.IStatusHandler;
42
39
43
public class Stub2BeanInfo
40
public class Stub2BeanInfo
Lines 56-61 Link Here
56
  private Vector usedNames;
53
  private Vector usedNames;
57
  
54
  
58
  private IProject clientProject_;
55
  private IProject clientProject_;
56
  private String   outputFolder_;
59
  
57
  
60
  public Stub2BeanInfo()
58
  public Stub2BeanInfo()
61
  {
59
  {
Lines 74-79 Link Here
74
  	this.clientProject_ =  clientProject;
72
  	this.clientProject_ =  clientProject;
75
  }
73
  }
76
  
74
  
75
  public void setOutputFolder( String outputFolder )
76
  {
77
  	outputFolder_ = outputFolder;
78
  }
79
  
77
  public void setPackage(String pkgName)
80
  public void setPackage(String pkgName)
78
  {
81
  {
79
	  package_ = pkgName;
82
	  package_ = pkgName;
Lines 169-203 Link Here
169
    sb.append(".java");
172
    sb.append(".java");
170
173
171
    ByteArrayInputStream bais = new ByteArrayInputStream(bytes);
174
    ByteArrayInputStream bais = new ByteArrayInputStream(bytes);
172
    IPath sourceFolderPath = null;
175
    
173
    IPath filePath = null;
176
    IPath newFilePath = new Path(outputFolder_).append( sb.toString() );
174
    ModuleCoreNature mn = ModuleCoreNature.getModuleCoreNature(clientProject_);
177
    
175
    if (mn!=null)
178
    FileResourceUtils.createFile(WebServicePlugin.getInstance().getResourceContext(), newFilePath, bais, progressMonitor, statusMonitor);
176
    {
177
    	sourceFolderPath = ResourceUtils.getJavaSourceLocation(clientProject_);
178
        IFolder sourceFolder = (IFolder)ResourceUtils.findResource(sourceFolderPath);
179
        filePath = sourceFolder.getFile(new Path(sb.toString())).getFullPath();    	
180
    }
181
    else
182
    {
183
        // It's a plain old Java project
184
    	JavaCore.create(clientProject_);
185
186
		sourceFolderPath = ResourceUtils.getJavaSourceLocation(clientProject_);
187
		IResource sourceFolderResource = ResourceUtils.findResource(sourceFolderPath);
188
		if (sourceFolderResource instanceof IFolder) 
189
		{
190
				IFolder sourceFolder = (IFolder) sourceFolderResource;
191
				filePath = sourceFolder.getFile(new Path(sb.toString())).getFullPath();
192
		} else 
193
		{
194
			// The source must be going directly in the project
195
			filePath = clientProject_.getFile(new Path(sb.toString())).getFullPath();
196
		}
197
		
198
    }
199
200
    FileResourceUtils.createFile(WebServicePlugin.getInstance().getResourceContext(), filePath, bais, progressMonitor, statusMonitor);
201
  }
179
  }
202
180
203
  private void writePackage(Writer w) throws IOException
181
  private void writePackage(Writer w) throws IOException
(-)src/org/eclipse/jst/ws/internal/axis/consumption/ui/widgets/AxisProxyWidget.java (-15 / +29 lines)
Lines 1-24 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2004 IBM Corporation and others.
2
 * Copyright (c) 2004, 2006 IBM Corporation and others.
3
 * All rights reserved. This program and the accompanying materials
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
5
 * which accompanies this distribution, and is available at
6
 * http://www.eclipse.org/legal/epl-v10.html
6
 * http://www.eclipse.org/legal/epl-v10.html
7
 * 
7
 *
8
 * Contributors:
8
 * Contributors:
9
 *     IBM Corporation - initial API and implementation
9
 * IBM Corporation - initial API and implementation
10
 * yyyymmdd bug      Email and other contact information
11
 * -------- -------- -----------------------------------------------------------
12
 * 20060216   115144 pmoogk@ca.ibm.com - Peter Moogk
10
 *******************************************************************************/
13
 *******************************************************************************/
11
package org.eclipse.jst.ws.internal.axis.consumption.ui.widgets;
14
package org.eclipse.jst.ws.internal.axis.consumption.ui.widgets;
12
15
16
import org.eclipse.core.resources.IProject;
17
import org.eclipse.core.runtime.IPath;
13
import org.eclipse.jst.ws.internal.axis.consumption.ui.AxisConsumptionUIMessages;
18
import org.eclipse.jst.ws.internal.axis.consumption.ui.AxisConsumptionUIMessages;
19
import org.eclipse.jst.ws.internal.common.ResourceUtils;
14
import org.eclipse.jst.ws.internal.ui.common.UIUtils;
20
import org.eclipse.jst.ws.internal.ui.common.UIUtils;
15
import org.eclipse.swt.SWT;
21
import org.eclipse.swt.SWT;
16
import org.eclipse.swt.events.SelectionAdapter;
22
import org.eclipse.swt.events.SelectionAdapter;
17
import org.eclipse.swt.events.SelectionEvent;
23
import org.eclipse.swt.events.SelectionEvent;
18
import org.eclipse.swt.widgets.Button;
24
import org.eclipse.swt.widgets.Button;
25
import org.eclipse.swt.widgets.Combo;
19
import org.eclipse.swt.widgets.Composite;
26
import org.eclipse.swt.widgets.Composite;
20
import org.eclipse.swt.widgets.Listener;
27
import org.eclipse.swt.widgets.Listener;
21
import org.eclipse.swt.widgets.Text;
22
import org.eclipse.ui.PlatformUI;
28
import org.eclipse.ui.PlatformUI;
23
import org.eclipse.wst.command.internal.env.ui.widgets.SimpleWidgetDataContributor;
29
import org.eclipse.wst.command.internal.env.ui.widgets.SimpleWidgetDataContributor;
24
import org.eclipse.wst.command.internal.env.ui.widgets.WidgetDataEvents;
30
import org.eclipse.wst.command.internal.env.ui.widgets.WidgetDataEvents;
Lines 31-37 Link Here
31
  /*CONTEXT_ID PWJB0001 for the WSDL to Java Bindings Page*/
37
  /*CONTEXT_ID PWJB0001 for the WSDL to Java Bindings Page*/
32
  private final String INFOPOP_PWJB_PAGE = "PWJB0001";	//$NON-NLS-1$
38
  private final String INFOPOP_PWJB_PAGE = "PWJB0001";	//$NON-NLS-1$
33
		
39
		
34
  private Text folderText_;
40
  private Combo outputFolderCombo_;
35
  /*CONTEXT_ID PWJB0003 for the Folder field of the WSDL to Java Bindings Page*/
41
  /*CONTEXT_ID PWJB0003 for the Folder field of the WSDL to Java Bindings Page*/
36
  private final String INFOPOP_PWJB_TEXT_FOLDER = "PWJB0003";	//$NON-NLS-1$
42
  private final String INFOPOP_PWJB_TEXT_FOLDER = "PWJB0003";	//$NON-NLS-1$
37
43
Lines 54-60 Link Here
54
    											AxisConsumptionUIMessages.TOOLTIP_PWJB_CHECKBOX_GENPROXY,
60
    											AxisConsumptionUIMessages.TOOLTIP_PWJB_CHECKBOX_GENPROXY,
55
                                                INFOPOP_PWJB_CHECKBOX_GENPROXY );
61
                                                INFOPOP_PWJB_CHECKBOX_GENPROXY );
56
    genProxyCheckbox_.addListener( SWT.Selection, statusListener );
62
    genProxyCheckbox_.addListener( SWT.Selection, statusListener );
57
    
58
    genProxyCheckbox_.addSelectionListener( new SelectionAdapter()
63
    genProxyCheckbox_.addSelectionListener( new SelectionAdapter()
59
                                            {
64
                                            {
60
                                              public void widgetSelected( SelectionEvent evt )
65
                                              public void widgetSelected( SelectionEvent evt )
Lines 65-75 Link Here
65
    
70
    
66
    Composite textGroup = uiUtils.createComposite( parent, 2, 5, 0 );
71
    Composite textGroup = uiUtils.createComposite( parent, 2, 5, 0 );
67
    
72
    
68
    folderText_ = uiUtils.createText( textGroup, AxisConsumptionUIMessages.LABEL_FOLDER_NAME,
73
    outputFolderCombo_ = uiUtils.createCombo( textGroup, AxisConsumptionUIMessages.LABEL_FOLDER_NAME,
69
    									AxisConsumptionUIMessages.TOOLTIP_PWJB_TEXT_FOLDER,
74
    									AxisConsumptionUIMessages.TOOLTIP_PWJB_TEXT_FOLDER,
70
    									INFOPOP_PWJB_TEXT_FOLDER,
75
    									INFOPOP_PWJB_TEXT_FOLDER,
71
    									SWT.SINGLE | SWT.BORDER | SWT.READ_ONLY );
76
    									SWT.SINGLE | SWT.BORDER | SWT.READ_ONLY );
72
    folderText_.addListener( SWT.Modify, statusListener );
73
    
77
    
74
    showMappingsCheckbox_ = uiUtils.createCheckbox( parent, AxisConsumptionUIMessages.LABEL_EXPLORE_MAPPINGS_XML2BEAN,
78
    showMappingsCheckbox_ = uiUtils.createCheckbox( parent, AxisConsumptionUIMessages.LABEL_EXPLORE_MAPPINGS_XML2BEAN,
75
    									AxisConsumptionUIMessages.TOOLTIP_N2P_SHOW_MAPPINGS,
79
    									AxisConsumptionUIMessages.TOOLTIP_N2P_SHOW_MAPPINGS,
Lines 85-104 Link Here
85
  {
89
  {
86
    boolean enabled = genProxyCheckbox_.getSelection();
90
    boolean enabled = genProxyCheckbox_.getSelection();
87
    
91
    
88
    folderText_.setEnabled( enabled );
92
    outputFolderCombo_.setEnabled( enabled );
89
    showMappingsCheckbox_.setEnabled( enabled );
93
    showMappingsCheckbox_.setEnabled( enabled );
90
  }
94
  }
91
  
95
  
92
  public void setProxyFolder( String proxyFolder )
96
  public void setClientProject(IProject clientProject)
93
  {
97
  {  	
94
    folderText_.setText( proxyFolder );  
98
    IPath[] paths = ResourceUtils.getAllJavaSourceLocations(clientProject);
99
    
100
    for (int i = 0; i < paths.length ; i++)
101
    {
102
      outputFolderCombo_.add(paths[i].toString());
103
    }
104
    
105
    if( paths.length > 0 )
106
    {
107
    	outputFolderCombo_.select(0);
108
    }
95
  }
109
  }
96
  
110
  
97
  public String getProxyFolder()
111
  public String getOutputFolder()
98
  {
112
  {
99
     return folderText_.getText();  
113
  	return outputFolderCombo_.getText();
100
  }
114
  }
101
  
115
        
102
  public void setGenerateProxy( Boolean genProxy )
116
  public void setGenerateProxy( Boolean genProxy )
103
  {
117
  {
104
    genProxyCheckbox_.setSelection( genProxy.booleanValue() );
118
    genProxyCheckbox_.setSelection( genProxy.booleanValue() );
(-)src/org/eclipse/jst/ws/internal/axis/consumption/ui/wizard/client/WebServiceClientAxisType.java (-3 / +8 lines)
Lines 1-12 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2004 IBM Corporation and others.
2
 * Copyright (c) 2004, 2006 IBM Corporation and others.
3
 * All rights reserved. This program and the accompanying materials
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
5
 * which accompanies this distribution, and is available at
6
 * http://www.eclipse.org/legal/epl-v10.html
6
 * http://www.eclipse.org/legal/epl-v10.html
7
 * 
7
 *
8
 * Contributors:
8
 * Contributors:
9
 *     IBM Corporation - initial API and implementation
9
 * IBM Corporation - initial API and implementation
10
 * yyyymmdd bug      Email and other contact information
11
 * -------- -------- -----------------------------------------------------------
12
 * 20060216   115144 pmoogk@ca.ibm.com - Peter Moogk
10
 *******************************************************************************/
13
 *******************************************************************************/
11
package org.eclipse.jst.ws.internal.axis.consumption.ui.wizard.client;
14
package org.eclipse.jst.ws.internal.axis.consumption.ui.wizard.client;
12
15
Lines 49-58 Link Here
49
    dataRegistry.addMapping( AxisClientDefaultingCommand.class, "ProxyProjectFolder", AxisProxyWidget.class, "ProxyFolder", null );
52
    dataRegistry.addMapping( AxisClientDefaultingCommand.class, "ProxyProjectFolder", AxisProxyWidget.class, "ProxyFolder", null );
50
    dataRegistry.addMapping( AxisClientDefaultingCommand.class, "GenerateProxy", AxisProxyWidget.class);    
53
    dataRegistry.addMapping( AxisClientDefaultingCommand.class, "GenerateProxy", AxisProxyWidget.class);    
51
    dataRegistry.addMapping( AxisClientDefaultingCommand.class, "IsClientScenario", AxisProxyWidget.class);    
54
    dataRegistry.addMapping( AxisClientDefaultingCommand.class, "IsClientScenario", AxisProxyWidget.class);    
55
    dataRegistry.addMapping( AxisClientDefaultingCommand.class, "ClientProject", AxisProxyWidget.class );
52
    dataRegistry.addMapping( AxisClientDefaultingCommand.class, "JavaWSDLParam", AxisMappingsWidget.class, "JavaParameter", null);
56
    dataRegistry.addMapping( AxisClientDefaultingCommand.class, "JavaWSDLParam", AxisMappingsWidget.class, "JavaParameter", null);
53
    
57
    
54
    // AxisProxyWidget
58
    // AxisProxyWidget
55
    dataRegistry.addMapping( AxisProxyWidget.class, "GenerateProxy", ClientExtensionOutputCommand.class );
59
    dataRegistry.addMapping( AxisProxyWidget.class, "GenerateProxy", ClientExtensionOutputCommand.class );
60
    dataRegistry.addMapping( AxisProxyWidget.class, "OutputFolder", DefaultsForClientJavaWSDLCommand.class );
56
    
61
    
57
    //AxisMappingsWidget
62
    //AxisMappingsWidget
58
	dataRegistry.addMapping(AxisMappingsWidget.class, "JavaParameter", DefaultsForHTTPBasicAuthCommand.class, "JavaWSDLParam", null); //OK
63
	dataRegistry.addMapping(AxisMappingsWidget.class, "JavaParameter", DefaultsForHTTPBasicAuthCommand.class, "JavaWSDLParam", null); //OK
(-)src/org/eclipse/jst/ws/internal/axis/consumption/ui/wsrt/AxisWebServiceClient.java (-3 / +7 lines)
Lines 1-12 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2000, 2005 IBM Corporation and others.
2
 * Copyright (c) 2000, 2006 IBM Corporation and others.
3
 * All rights reserved. This program and the accompanying materials
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
5
 * which accompanies this distribution, and is available at
6
 * http://www.eclipse.org/legal/epl-v10.html
6
 * http://www.eclipse.org/legal/epl-v10.html
7
 * 
7
 *
8
 * Contributors:
8
 * Contributors:
9
 *     IBM Corporation - initial API and implementation
9
 * IBM Corporation - initial API and implementation
10
 * yyyymmdd bug      Email and other contact information
11
 * -------- -------- -----------------------------------------------------------
12
 * 20060216   115144 pmoogk@ca.ibm.com - Peter Moogk
10
 *******************************************************************************/
13
 *******************************************************************************/
11
14
12
package org.eclipse.jst.ws.internal.axis.consumption.ui.wsrt;
15
package org.eclipse.jst.ws.internal.axis.consumption.ui.wsrt;
Lines 143-148 Link Here
143
		registry.addMapping(AxisClientDefaultingCommand.class, "JavaWSDLParam", Stub2BeanCommand.class);
146
		registry.addMapping(AxisClientDefaultingCommand.class, "JavaWSDLParam", Stub2BeanCommand.class);
144
		registry.addMapping(AxisClientDefaultingCommand.class, "WebServicesParser", Stub2BeanCommand.class);
147
		registry.addMapping(AxisClientDefaultingCommand.class, "WebServicesParser", Stub2BeanCommand.class);
145
		registry.addMapping(AxisClientDefaultingCommand.class, "ClientProject", Stub2BeanCommand.class);
148
		registry.addMapping(AxisClientDefaultingCommand.class, "ClientProject", Stub2BeanCommand.class);
149
		registry.addMapping(DefaultsForClientJavaWSDLCommand.class, "OutputFolder", Stub2BeanCommand.class );
146
		// BuildProjectCommand()
150
		// BuildProjectCommand()
147
		registry.addMapping(AxisClientDefaultingCommand.class, "ClientProject", BuildProjectCommand.class, "Project", null);
151
		registry.addMapping(AxisClientDefaultingCommand.class, "ClientProject", BuildProjectCommand.class, "Project", null);
148
		registry.addMapping(AxisClientDefaultingCommand.class, "ForceBuild", BuildProjectCommand.class);
152
		registry.addMapping(AxisClientDefaultingCommand.class, "ForceBuild", BuildProjectCommand.class);

Return to bug 115144