Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 24585 Details for
Bug 101337
WSDL in Java Project causes NPE in Web service Client wizard
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
apply to org.eclipse.jst.ws.consumption.ui
patch101337_jst_ws_consumption_ui.txt (text/plain), 7.31 KB, created by
Rupam Kuehner
on 2005-07-11 21:01:25 EDT
(
hide
)
Description:
apply to org.eclipse.jst.ws.consumption.ui
Filename:
MIME Type:
Creator:
Rupam Kuehner
Created:
2005-07-11 21:01:25 EDT
Size:
7.31 KB
patch
obsolete
>Index: src/org/eclipse/jst/ws/consumption/ui/plugin.properties >=================================================================== >RCS file: /home/webtools/jst/components/ws/plugins/org.eclipse.jst.ws.consumption.ui/src/org/eclipse/jst/ws/consumption/ui/plugin.properties,v >retrieving revision 1.10 >diff -u -r1.10 plugin.properties >--- src/org/eclipse/jst/ws/consumption/ui/plugin.properties 21 Jun 2005 20:49:34 -0000 1.10 >+++ src/org/eclipse/jst/ws/consumption/ui/plugin.properties 12 Jul 2005 00:59:08 -0000 >@@ -58,6 +58,7 @@ > # General messages. > # > MSG_ERROR_TASK_EXCEPTED=IWAB0234E An internal error occurred. Details: {0} >+MSG_ERROR_NO_SERVER_RUNTIME=No suitable server can be found for the {0} Web service runtime. Go to Window > Preferences. Select Server > Installed Runtimes and configure one of the following: {1} > > > >Index: src/org/eclipse/jst/ws/internal/consumption/ui/common/ServerSelectionUtils.java >=================================================================== >RCS file: /home/webtools/jst/components/ws/plugins/org.eclipse.jst.ws.consumption.ui/src/org/eclipse/jst/ws/internal/consumption/ui/common/ServerSelectionUtils.java,v >retrieving revision 1.5 >diff -u -r1.5 ServerSelectionUtils.java >--- src/org/eclipse/jst/ws/internal/consumption/ui/common/ServerSelectionUtils.java 14 Jun 2005 20:45:32 -0000 1.5 >+++ src/org/eclipse/jst/ws/internal/consumption/ui/common/ServerSelectionUtils.java 12 Jul 2005 00:59:10 -0000 >@@ -604,7 +604,7 @@ > boolean isValid = isServerValid(validServerFactoryIds[i], j2eeVersion); > if (isValid) > { >- serverInfo[0] = validServerFactoryIds[0]; >+ serverInfo[0] = validServerFactoryIds[i]; > return serverInfo; > } > } >Index: src/org/eclipse/jst/ws/internal/consumption/ui/widgets/runtime/ClientRuntimeSelectionWidgetDefaultingCommand.java >=================================================================== >RCS file: /home/webtools/jst/components/ws/plugins/org.eclipse.jst.ws.consumption.ui/src/org/eclipse/jst/ws/internal/consumption/ui/widgets/runtime/ClientRuntimeSelectionWidgetDefaultingCommand.java,v >retrieving revision 1.21 >diff -u -r1.21 ClientRuntimeSelectionWidgetDefaultingCommand.java >--- src/org/eclipse/jst/ws/internal/consumption/ui/widgets/runtime/ClientRuntimeSelectionWidgetDefaultingCommand.java 23 Jun 2005 17:16:36 -0000 1.21 >+++ src/org/eclipse/jst/ws/internal/consumption/ui/widgets/runtime/ClientRuntimeSelectionWidgetDefaultingCommand.java 12 Jul 2005 00:59:11 -0000 >@@ -227,7 +227,12 @@ > > setClientDefaultProject(); > setClientDefaultEAR(); >- setClientDefaultServer(); >+ Status serverStatus = setClientDefaultServer(); >+ if (serverStatus.getSeverity()== Status.ERROR) >+ { >+ environment.getStatusHandler().reportError(serverStatus); >+ return serverStatus; >+ } > updateClientEARs(); > > //Calculate default IWebServiceClient >@@ -411,11 +416,16 @@ > //reasonable J2EE version and Web service runtime values > > if (project != null && project.exists()) >- { >- boolean isValidComponentType = J2EEUtils.isWebComponent(project, componentName) || >+ { >+ boolean isValidComponentType = false; >+ if (componentName != null && componentName.length()>0) >+ { >+ isValidComponentType = J2EEUtils.isWebComponent(project, componentName) || > J2EEUtils.isEJBComponent(project, componentName) || > J2EEUtils.isAppClientComponent(project, componentName) || > J2EEUtils.isJavaComponent(project, componentName); >+ } >+ > if (isValidComponentType) > { > //WebServiceClientTypeRegistry wsctReg = WebServiceClientTypeRegistry.getInstance(); >@@ -819,8 +829,9 @@ > } > } > >- private void setClientDefaultServer() >+ private Status setClientDefaultServer() > { >+ Status status = new SimpleStatus(""); > //Calculate reasonable default server based on initial project selection. > String initialClientProjectName = runtimeClientTypes_.getChoice().getChoice().getList().getSelection(); > IProject initialClientProject = ProjectUtilities.getProject(initialClientProjectName); >@@ -872,12 +883,76 @@ > { > clientIds_.setServerInstanceId(serverInfo[1]); > } >- } >+ } >+ else >+ { >+ //Since the project and the EAR are both new, try changing the J2EE level >+ boolean foundServer = false; >+ WebServiceRuntimeInfo wsrt = WebServiceRuntimeExtensionUtils.getWebServiceRuntimeById(clientIds_.getRuntimeId()); >+ if (wsrt != null) >+ { >+ String[] versions = wsrt.getJ2eeLevels(); >+ if (versions != null && versions.length > 0) >+ { >+ for (int k=0; k<versions.length; k++) >+ { >+ //If this J2EE version is different from the current one, see if there is >+ //a server available. >+ if (clientJ2EEVersion_!=versions[k]) >+ { >+ String[] si = ServerSelectionUtils.getServerFromWebServceRuntimeAndJ2EE(clientIds_.getRuntimeId(), versions[k]); >+ if (si!=null) >+ { >+ if (si[0]!=null && si[0].length()>0) >+ { >+ clientIds_.setServerId(si[0]); >+ } >+ if (si[1]!=null && si[1].length()>0) >+ { >+ clientIds_.setServerInstanceId(si[1]); >+ } >+ clientJ2EEVersion_ = versions[k]; >+ foundServer = true; >+ break; >+ } >+ >+ } >+ } >+ } >+ } >+ //No valid server runtimes appear to be configured, this is an error condition. >+ if (!foundServer) >+ { >+ String runtimeLabel = WebServiceRuntimeExtensionUtils.getRuntimeLabelById(clientIds_.getRuntimeId()); >+ String serverLabels = getServerLabels(clientIds_.getRuntimeId()); >+ status = new SimpleStatus("", msgUtils_.getMessage("MSG_ERROR_NO_SERVER_RUNTIME", new String[]{runtimeLabel, serverLabels}),Status.ERROR); >+ } >+ >+ } > } > >- } >+ } >+ >+ return status; > } > >+ protected String getServerLabels(String runtimeId) >+ { >+ WebServiceRuntimeInfo wsrt = WebServiceRuntimeExtensionUtils.getWebServiceRuntimeById(runtimeId); >+ String[] validServerFactoryIds = wsrt.getServerFactoryIds(); >+ //String[] validServerLabels = new String[validServerFactoryIds.length]; >+ StringBuffer validServerLabels = new StringBuffer(); >+ for (int i=0; i<validServerFactoryIds.length; i++) >+ { >+ if (i>0) >+ { >+ validServerLabels.append(", "); >+ } >+ validServerLabels.append(WebServiceRuntimeExtensionUtils.getServerLabelById(validServerFactoryIds[i])); >+ >+ } >+ return validServerLabels.toString(); >+ } > > protected void updateClientProject(String projectName, String componentName, String serviceTypeId) > {
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 101337
: 24585 |
24586