diff options
author | kchan | 2008-05-09 14:12:40 +0000 |
---|---|---|
committer | kchan | 2008-05-09 14:12:40 +0000 |
commit | ad3f505e19efd296a6afd4edd52791497b01765d (patch) | |
tree | cc6b266b5c3311960579e97e3695f96930595153 /bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal | |
parent | 2cd2b1126311913baee2d2f0ca5e469d6fee441b (diff) | |
download | webtools.webservices-ad3f505e19efd296a6afd4edd52791497b01765d.tar.gz webtools.webservices-ad3f505e19efd296a6afd4edd52791497b01765d.tar.xz webtools.webservices-ad3f505e19efd296a6afd4edd52791497b01765d.zip |
[202945] Popup for testing with Web Services Explorer should be available on wsil files.
Diffstat (limited to 'bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal')
4 files changed, 85 insertions, 7 deletions
diff --git a/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/LaunchOptions.java b/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/LaunchOptions.java index 392f03b11..2a5b96831 100644 --- a/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/LaunchOptions.java +++ b/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/LaunchOptions.java @@ -1,12 +1,15 @@ /******************************************************************************* - * Copyright (c) 2002, 2005 IBM Corporation and others. + * Copyright (c) 2002, 2008 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 * http://www.eclipse.org/legal/epl-v10.html - * + * * Contributors: - * IBM Corporation - initial API and implementation + * IBM Corporation - initial API and implementation + * yyyymmdd bug Email and other contact information + * -------- -------- ----------------------------------------------------------- + * 20080506 202945 pmoogk@ca.ibm.com - Peter Moogk, Allow WSE to be launched from a WSIL file. *******************************************************************************/ package org.eclipse.wst.ws.internal.explorer; @@ -29,6 +32,8 @@ public class LaunchOptions { // WSDL Page preload constants public static final String WSDL_URL = "wsdl"; + + public static final String WSIL_URL = "wsilurl"; public static final String WEB_SERVICE_ENDPOINT = "webServiceEndpoint"; diff --git a/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/perspective/LaunchOptionsManager.java b/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/perspective/LaunchOptionsManager.java index 2c25b832a..6267be3ae 100644 --- a/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/perspective/LaunchOptionsManager.java +++ b/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/perspective/LaunchOptionsManager.java @@ -1,12 +1,15 @@ /******************************************************************************* - * Copyright (c) 2004, 2005 IBM Corporation and others. + * Copyright (c) 2004, 2008 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 * http://www.eclipse.org/legal/epl-v10.html * * Contributors: - * IBM Corporation - initial API and implementation + * IBM Corporation - initial API and implementation + * yyyymmdd bug Email and other contact information + * -------- -------- ----------------------------------------------------------- + * 20080506 202945 pmoogk@ca.ibm.com - Peter Moogk, Allow WSE to be launched from a WSIL file. *******************************************************************************/ package org.eclipse.wst.ws.internal.explorer.platform.perspective; @@ -16,6 +19,7 @@ import javax.servlet.http.HttpSession; import org.eclipse.wst.ws.internal.explorer.LaunchOptions; import org.eclipse.wst.ws.internal.explorer.platform.uddi.perspective.UDDIPerspective; import org.eclipse.wst.ws.internal.explorer.platform.wsdl.perspective.WSDLPerspective; +import org.eclipse.wst.ws.internal.explorer.platform.wsil.perspective.WSILPerspective; public class LaunchOptionsManager { @@ -74,6 +78,7 @@ public class LaunchOptionsManager String[] serviceNames = (String[])options.get(LaunchOptions.SERVICE_NAME); String[] serviceKeys = (String[])options.get(LaunchOptions.SERVICE_KEY); String[] wsdlURLs = (String[])options.get(LaunchOptions.WSDL_URL); + String[] wsilURLs = (String[])options.get(LaunchOptions.WSIL_URL); String[] endpoints = (String[])options.get(LaunchOptions.WEB_SERVICE_ENDPOINT); String[] serviceQNameStrings = (String[])options.get(LaunchOptions.SERVICE_QNAME_STRING); String[] bindingNameStrings = (String[])options.get(LaunchOptions.BINDING_NAME_STRING); @@ -88,6 +93,9 @@ public class LaunchOptionsManager wsdlPerspective.preloadWSDL(wsdlURLs); wsdlPerspective.preloadEndpoints(wsdlURLs, endpoints); wsdlPerspective.preselectServiceOrBinding(wsdlURLs,serviceQNameStrings,bindingNameStrings); + + WSILPerspective wsilPerspective = controller.getWSILPerspective(); + wsilPerspective.preloadWSIL( wsilURLs ); } } } diff --git a/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/wsil/perspective/WSILPerspective.java b/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/wsil/perspective/WSILPerspective.java index 5ae81f8e8..14321aa74 100644 --- a/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/wsil/perspective/WSILPerspective.java +++ b/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/wsil/perspective/WSILPerspective.java @@ -1,16 +1,21 @@ /******************************************************************************* - * Copyright (c) 2001, 2005 IBM Corporation and others. + * Copyright (c) 2001, 2008 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 * http://www.eclipse.org/legal/epl-v10.html * * Contributors: - * IBM Corporation - initial API and implementation + * IBM Corporation - initial API and implementation + * yyyymmdd bug Email and other contact information + * -------- -------- ----------------------------------------------------------- + * 20080506 202945 pmoogk@ca.ibm.com - Peter Moogk, Allow WSE to be launched from a WSIL file. *******************************************************************************/ package org.eclipse.wst.ws.internal.explorer.platform.wsil.perspective; +import java.util.Hashtable; + import javax.servlet.ServletContext; import org.eclipse.wst.ws.internal.datamodel.BasicModel; import org.eclipse.wst.ws.internal.explorer.platform.constants.ActionInputs; @@ -19,7 +24,9 @@ import org.eclipse.wst.ws.internal.explorer.platform.perspective.Controller; import org.eclipse.wst.ws.internal.explorer.platform.perspective.NodeManager; import org.eclipse.wst.ws.internal.explorer.platform.perspective.Perspective; import org.eclipse.wst.ws.internal.explorer.platform.util.DirUtils; +import org.eclipse.wst.ws.internal.explorer.platform.wsil.actions.OpenWSILAction; import org.eclipse.wst.ws.internal.explorer.platform.wsil.actions.SwitchPerspectiveFromWSILAction; +import org.eclipse.wst.ws.internal.explorer.platform.wsil.constants.WsilActionInputs; public class WSILPerspective extends Perspective { @@ -54,6 +61,26 @@ public class WSILPerspective extends Perspective savedActionsContainerFramesetRows_ = actionsContainerFramesetRows_; } + public final void preloadWSIL( String[] wsilURL ) + { + if( wsilURL != null ) + { + for( int index = 0; index < wsilURL.length; index++ ) + { + OpenWSILAction action = new OpenWSILAction(controller_); + Hashtable table = action.getPropertyTable(); + table.put(WsilActionInputs.WSIL_URL, wsilURL[index] ); + table.put(WsilActionInputs.WSIL_INSPECTION_TYPE, String.valueOf(WsilActionInputs.WSIL_DETAILS)); + action.run(); + } + + if( wsilURL.length >0 ) + { + controller_.setCurrentPerspective(ActionInputs.PERSPECTIVE_WSIL); + } + } + } + public NodeManager getNodeManager() { return nodeManager_; } diff --git a/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/popup/PopupTestWSIL.java b/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/popup/PopupTestWSIL.java new file mode 100644 index 000000000..208a3191d --- /dev/null +++ b/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/popup/PopupTestWSIL.java @@ -0,0 +1,38 @@ +/******************************************************************************* + * Copyright (c) 2008 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 + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + * yyyymmdd bug Email and other contact information + * -------- -------- ----------------------------------------------------------- + * 20080506 202945 pmoogk@ca.ibm.com - Peter Moogk, Allow WSE to launch on WSIL file. + *******************************************************************************/ +package org.eclipse.wst.ws.internal.explorer.popup; + +import java.util.Vector; + +import org.eclipse.jface.viewers.IStructuredSelection; +import org.eclipse.wst.ws.internal.explorer.LaunchOption; +import org.eclipse.wst.ws.internal.explorer.LaunchOptions; + +public class PopupTestWSIL extends PopupTestWSDL +{ + protected IStructuredSelection selection = null; + + public PopupTestWSIL() + { + super(); + } + + + protected void addLaunchOptions(Vector launchOptions, String wsdlURL, String stateLocation, String defaultFavoritesLocation) + { + launchOptions.add(new LaunchOption(LaunchOptions.WSIL_URL, wsdlURL)); + launchOptions.add(new LaunchOption(LaunchOptions.STATE_LOCATION,stateLocation)); + launchOptions.add(new LaunchOption(LaunchOptions.DEFAULT_FAVORITES_LOCATION,defaultFavoritesLocation)); + } +} |