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 214202 Details for
Bug 364026
saaj.jar deployment fails when multiple javax.xml.soap bundles are installed
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]
Patch with updated copyrights
bug364026-revisedPatch2.txt (text/plain), 7.71 KB, created by
Keith Chong
on 2012-04-18 13:26:53 EDT
(
hide
)
Description:
Patch with updated copyrights
Filename:
MIME Type:
Creator:
Keith Chong
Created:
2012-04-18 13:26:53 EDT
Size:
7.71 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.jst.ws.axis.consumption.ui >Index: src/org/eclipse/jst/ws/internal/axis/consumption/ui/task/CopyAxisJarCommand.java >=================================================================== >RCS file: /cvsroot/webtools/webservices/plugins/org.eclipse.jst.ws.axis.consumption.ui/src/org/eclipse/jst/ws/internal/axis/consumption/ui/task/CopyAxisJarCommand.java,v >retrieving revision 1.36 >diff -u -r1.36 CopyAxisJarCommand.java >--- src/org/eclipse/jst/ws/internal/axis/consumption/ui/task/CopyAxisJarCommand.java 20 Apr 2010 15:43:27 -0000 1.36 >+++ src/org/eclipse/jst/ws/internal/axis/consumption/ui/task/CopyAxisJarCommand.java 18 Apr 2012 17:25:50 -0000 >@@ -21,6 +21,7 @@ > * 20080326 224148 makandre@ca.ibm.com - Andrew Mak, Web service scenarios broke in latest builds with Equinox p2 > * 20100304 304385 mahutch@ca.ibm.com - Mark Hutchinson, Allow users to disable copying axis jars > * 20100414 309040 mahutch@ca.ibm.com - Mark Hutchinson, update jar sizes >+ * 20120418 364026 lippert@acm.org - Martin Lippert, saaj.jar deployment fails when multiple javax.xml.soap bundles are installed > *******************************************************************************/ > package org.eclipse.jst.ws.internal.axis.consumption.ui.task; > >@@ -60,6 +61,7 @@ > import org.eclipse.wst.common.environment.IEnvironment; > import org.eclipse.wst.common.frameworks.datamodel.AbstractDataModelOperation; > import org.eclipse.wst.ws.internal.common.BundleUtils; >+import org.osgi.framework.Version; > > > public class CopyAxisJarCommand extends AbstractDataModelOperation { >@@ -71,6 +73,8 @@ > public static String JAVAX_XML_RPC_PLUGIN_ID = "javax.xml.rpc"; //$NON-NLS-1$ > public static String JAVAX_XML_RPC_JAR = "jaxrpc.jar"; //$NON-NLS-1$ > public static String JAVAX_XML_SOAP_PLUGIN_ID = "javax.xml.soap"; //$NON-NLS-1$ >+ public static Version JAVAX_XML_SOAP_PLUGIN_VERSION = Version.parseVersion("1.2.0"); >+ private static Version JAVAX_XML_SOAP_PLUGIN_UPPER_VERSION = Version.parseVersion("1.3.0"); > public static String JAVAX_XML_SOAP_JAR = "saaj.jar"; //$NON-NLS-1$ > public static String JAVAX_WSDL_PLUGIN_ID = "javax.wsdl"; //$NON-NLS-1$ > public static String JAVAX_WSDL_JAR = "wsdl4j.jar"; //$NON-NLS-1$ >@@ -150,19 +154,19 @@ > deleteObsoleteJars(webModulePath); > > >- copyIFile(AXIS_RUNTIME_PLUGIN_ID, "lib/" + AXIS_JAR, webModulePath, "WEB-INF/lib/" + AXIS_JAR, status, env, monitor); >+ copyIFile(AXIS_RUNTIME_PLUGIN_ID, null, null, "lib/" + AXIS_JAR, webModulePath, "WEB-INF/lib/" + AXIS_JAR, status, env, monitor); > if (status.getSeverity() == Status.ERROR) { > return; > } >- copyIFile(COMMON_DISCOVERY_PLUGIN_ID, "lib/" + COMMON_DISCOVERY_JAR, webModulePath, "WEB-INF/lib/" + COMMON_DISCOVERY_JAR, status, env, monitor); >+ copyIFile(COMMON_DISCOVERY_PLUGIN_ID, null, null, "lib/" + COMMON_DISCOVERY_JAR, webModulePath, "WEB-INF/lib/" + COMMON_DISCOVERY_JAR, status, env, monitor); > if (status.getSeverity() == Status.ERROR) { > return; > } >- copyIFile(JAVAX_XML_RPC_PLUGIN_ID, "lib/" + JAVAX_XML_RPC_JAR, webModulePath, "WEB-INF/lib/" + JAVAX_XML_RPC_JAR, status, env, monitor); >+ copyIFile(JAVAX_XML_RPC_PLUGIN_ID, null, null, "lib/" + JAVAX_XML_RPC_JAR, webModulePath, "WEB-INF/lib/" + JAVAX_XML_RPC_JAR, status, env, monitor); > if (status.getSeverity() == Status.ERROR) { > return; > } >- copyIFile(JAVAX_XML_SOAP_PLUGIN_ID, "lib/" + JAVAX_XML_SOAP_JAR, webModulePath, "WEB-INF/lib/" + JAVAX_XML_SOAP_JAR, status, env, monitor); >+ copyIFile(JAVAX_XML_SOAP_PLUGIN_ID, JAVAX_XML_SOAP_PLUGIN_VERSION, JAVAX_XML_SOAP_PLUGIN_UPPER_VERSION, "lib/" + JAVAX_XML_SOAP_JAR, webModulePath, "WEB-INF/lib/" + JAVAX_XML_SOAP_JAR, status, env, monitor); > if (status.getSeverity() == Status.ERROR) { > return; > } >@@ -181,7 +185,7 @@ > /** > * > */ >- private void copyIFile(String pluginId, String source, IPath targetPath, String targetFile, IStatus status, IEnvironment env, IProgressMonitor monitor) { >+ private void copyIFile(String pluginId, Version pluginVersion, Version upperVersion, String source, IPath targetPath, String targetFile, IStatus status, IEnvironment env, IProgressMonitor monitor) { > IPath target = targetPath.append(new Path(targetFile)); > ProgressUtils.report(monitor, ConsumptionMessages.PROGRESS_INFO_COPYING_FILE); > >@@ -190,7 +194,15 @@ > context.setOverwriteFilesEnabled(true); > context.setCreateFoldersEnabled(true); > context.setCheckoutFilesEnabled(true); >- URL sourceURL = BundleUtils.getURLFromBundle(pluginId, source); >+ >+ URL sourceURL = null; >+ if (pluginVersion != null) { >+ sourceURL = BundleUtils.getURLFromBundle(pluginId, pluginVersion, upperVersion, source); >+ } >+ else { >+ sourceURL = BundleUtils.getURLFromBundle(pluginId, source); >+ } >+ > IFile resource = ResourceUtils.getWorkspaceRoot().getFile(target); > if (!resource.exists()) { > IFile file = FileResourceUtils.createFile(context, target, sourceURL.openStream(), monitor, env.getStatusHandler()); >#P org.eclipse.wst.ws >Index: src/org/eclipse/wst/ws/internal/common/BundleUtils.java >=================================================================== >RCS file: /cvsroot/webtools/webservices/plugins/org.eclipse.wst.ws/src/org/eclipse/wst/ws/internal/common/BundleUtils.java,v >retrieving revision 1.4 >diff -u -r1.4 BundleUtils.java >--- src/org/eclipse/wst/ws/internal/common/BundleUtils.java 26 Mar 2008 21:23:14 -0000 1.4 >+++ src/org/eclipse/wst/ws/internal/common/BundleUtils.java 18 Apr 2012 17:25:51 -0000 >@@ -1,5 +1,5 @@ > /******************************************************************************* >- * Copyright (c) 2003, 2008 IBM Corporation and others. >+ * Copyright (c) 2003, 2012 IBM Corporation and others. > * All rights reserved. This program and the accompanying materials > * are made available under the terms of the Eclipse Public License v1.0 > * which accompanies this distribution, and is available at >@@ -11,6 +11,7 @@ > * -------- -------- ----------------------------------------------------------- > * 20070501 184505 kathy@ca.ibm.com - Kathy Chan > * 20080326 224148 makandre@ca.ibm.com - Andrew Mak, Web service scenarios broke in latest builds with Equinox p2 >+ * 20120418 364026 lippert@acm.org - Martin Lippert, saaj.jar deployment fails when multiple javax.xml.soap bundles are installed > *******************************************************************************/ > package org.eclipse.wst.ws.internal.common; > >@@ -30,13 +31,35 @@ > { > static public URL getURLFromBundle( String bundleId, String path ) throws MalformedURLException > { >- Bundle bundle = Platform.getBundle( bundleId ); >+ Bundle bundle = Platform.getBundle(bundleId); > URL installURL = bundle.getEntry("/"); > URL fileURL = new URL(installURL, path ); > > return fileURL; > } > >+ static public URL getURLFromBundle( String bundleId, Version bundleVersion, Version upperVersion, String path ) throws MalformedURLException >+ { >+ Bundle bundle = getBundleWithinVersionRange(bundleId, bundleVersion, upperVersion); >+ URL installURL = bundle.getEntry("/"); >+ URL fileURL = new URL(installURL, path ); >+ >+ return fileURL; >+ } >+ >+ private static Bundle getBundleWithinVersionRange(String bundleId, >+ Version bundleVersion, Version upperVersion) { >+ Bundle[] bundles = Platform.getBundles(bundleId, bundleVersion.toString()); >+ for(Bundle bundle : bundles) { >+ Version aVersion = bundle.getVersion(); >+ if (aVersion.compareTo(bundleVersion) >= 0 && aVersion.compareTo(upperVersion) < 0) { >+ return bundle; >+ } >+ } >+ >+ return null; >+ } >+ > /** > * @param bundleId > * @return Returns the path for the Jarred plugin. Returns null if path not found.
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 364026
:
212906
|
213895
| 214202