diff options
Diffstat (limited to 'bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/UDDILaunchWebServiceWizardAction.java')
-rw-r--r-- | bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/UDDILaunchWebServiceWizardAction.java | 93 |
1 files changed, 0 insertions, 93 deletions
diff --git a/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/UDDILaunchWebServiceWizardAction.java b/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/UDDILaunchWebServiceWizardAction.java deleted file mode 100644 index 6095284a0..000000000 --- a/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/UDDILaunchWebServiceWizardAction.java +++ /dev/null @@ -1,93 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2005 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 - *******************************************************************************/ - -package org.eclipse.wst.ws.internal.explorer.platform.uddi.actions; - -import java.io.File; -import java.io.FileOutputStream; -import javax.wsdl.Definition; -import org.eclipse.wst.ws.internal.explorer.platform.actions.LaunchWebServiceWizardAction; -import org.eclipse.wst.ws.internal.explorer.platform.datamodel.TreeElement; -import org.eclipse.wst.ws.internal.explorer.platform.perspective.Controller; -import org.eclipse.wst.ws.internal.explorer.platform.perspective.FormTool; -import org.eclipse.wst.ws.internal.explorer.platform.perspective.MessageQueue; -import org.eclipse.wst.ws.internal.explorer.platform.perspective.Node; -import org.eclipse.wst.ws.internal.explorer.platform.perspective.NodeManager; -import org.eclipse.wst.ws.internal.explorer.platform.uddi.datamodel.ServiceElement; -import org.eclipse.wst.ws.internal.explorer.platform.uddi.datamodel.ServiceInterfaceElement; -import org.eclipse.wst.ws.internal.explorer.platform.uddi.perspective.UDDIPerspective; -import org.eclipse.wst.ws.internal.explorer.platform.uddi.util.Uddi4jHelper; -import org.uddi4j.datatype.service.BusinessService; -import org.uddi4j.datatype.tmodel.TModel; - -public class UDDILaunchWebServiceWizardAction extends LaunchWebServiceWizardAction -{ - public UDDILaunchWebServiceWizardAction(Controller controller) - { - super(controller); - } - - public FormTool getSelectedFormTool() - { - UDDIPerspective uddiPerspective = controller_.getUDDIPerspective(); - return (FormTool)uddiPerspective.getNavigatorManager().getSelectedNode().getCurrentToolManager().getSelectedTool(); - } - - public boolean run() - { - UDDIPerspective uddiPerspective = controller_.getUDDIPerspective(); - MessageQueue messageQueue = uddiPerspective.getMessageQueue(); - NodeManager nodeManager = uddiPerspective.getNavigatorManager(); - Node node = nodeManager.getSelectedNode(); - TreeElement element = node.getTreeElement(); - Uddi4jHelper uddi4jHelper = new Uddi4jHelper(); - String wsdlUrl = null; - if (element instanceof ServiceElement) - { - ServiceElement serviceElement = (ServiceElement)element; - BusinessService bs = serviceElement.getBusinessService(); - wsdlUrl = uddi4jHelper.getWSDL(bs, serviceElement.getRegistryElement().getProxy()); - } - else if (element instanceof ServiceInterfaceElement) - { - TModel tModel = ((ServiceInterfaceElement)element).getTModel(); - wsdlUrl = uddi4jHelper.getWSDL(tModel); - } - - try - { - if (wsdlUrl != null) - { - Definition def = uddi4jHelper.getWSDLDefinition(wsdlUrl); - File tempFile = File.createTempFile("temp",".wsdl"); - UDDIImportWSDLToFileSystemAction action = new UDDIImportWSDLToFileSystemAction(controller_); - action.writeWSDLDefinition(new FileOutputStream(tempFile),def); - wsdlUrl = tempFile.toURL().toString(); - return launchWizard(wsdlUrl); - } - } - catch (Throwable t) - { - messageQueue.addMessage(controller_.getMessage("MSG_ERROR_RETRIEVING_WSDL_DOC")); - } - return false; - } - - public final String getStatusContentVar() - { - return controller_.getUDDIPerspective().getStatusContentVar(); - } - - public final String getStatusContentPage() - { - return controller_.getUDDIPerspective().getStatusContentPage(); - } -} |