diff options
Diffstat (limited to 'bundles/org.eclipse.wst.ws.parser/src/org/eclipse/wst')
34 files changed, 0 insertions, 2723 deletions
diff --git a/bundles/org.eclipse.wst.ws.parser/src/org/eclipse/wst/ws/internal/parser/disco/DISCOContractReference.java b/bundles/org.eclipse.wst.ws.parser/src/org/eclipse/wst/ws/internal/parser/disco/DISCOContractReference.java deleted file mode 100644 index a96dad292..000000000 --- a/bundles/org.eclipse.wst.ws.parser/src/org/eclipse/wst/ws/internal/parser/disco/DISCOContractReference.java +++ /dev/null @@ -1,28 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2004 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.parser.disco; - -public class DISCOContractReference extends DISCOReference -{ - private String docRef_; - - public DISCOContractReference(String ref,String docRef) - { - super(ref); - docRef_ = docRef; - } - - public String getDocRef() - { - return docRef_; - } -}
\ No newline at end of file diff --git a/bundles/org.eclipse.wst.ws.parser/src/org/eclipse/wst/ws/internal/parser/disco/DISCOParser.java b/bundles/org.eclipse.wst.ws.parser/src/org/eclipse/wst/ws/internal/parser/disco/DISCOParser.java deleted file mode 100644 index 620944923..000000000 --- a/bundles/org.eclipse.wst.ws.parser/src/org/eclipse/wst/ws/internal/parser/disco/DISCOParser.java +++ /dev/null @@ -1,123 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2004 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.parser.disco; - -import java.util.Vector; -import javax.xml.parsers.DocumentBuilder; -import javax.xml.parsers.DocumentBuilderFactory; -import javax.xml.parsers.ParserConfigurationException; -import org.w3c.dom.Document; -import org.w3c.dom.Element; -import org.w3c.dom.Node; -import org.w3c.dom.NodeList; -import org.xml.sax.InputSource; - -/** - * See http://msdn.microsoft.com/msdnmag/issues/02/02/xml/default.aspx for more - * details on DISCO. - */ -public class DISCOParser -{ - private DocumentBuilder parser_; - private final String NS_DISCO = "http://schemas.xmlsoap.org/disco/"; - private final String DISCOVERY = "discovery"; - private final String DISCOVERY_REF = "discoveryRef"; - private final String NS_CONTRACT_REF = "http://schemas.xmlsoap.org/disco/scl/"; - private final String CONTRACT_REF = "contractRef"; - private final String REF = "ref"; - private final String DOC_REF = "docRef"; - - public DISCOParser() - { - try - { - DocumentBuilderFactory docBuilderFactory = DocumentBuilderFactory.newInstance(); - docBuilderFactory.setNamespaceAware(true); - parser_ = docBuilderFactory.newDocumentBuilder(); - } - catch (ParserConfigurationException pce) - { - parser_ = null; - } - } - - public DISCOReference[] parse(String discoURI, InputSource source) throws Exception - { - if (parser_ != null) - { - Document doc = parser_.parse(source); - Element rootElement = doc.getDocumentElement(); - // Root element must by <disco:discovery - // xmlns:disco="http://schemas.xmlsoap.org/disco/"> - if (rootElement != null && rootElement.getNamespaceURI().equals(NS_DISCO) && rootElement.getLocalName().equals(DISCOVERY)) - { - NodeList childNodes = rootElement.getChildNodes(); - Vector discoReferences = new Vector(); - for (int i = 0; i < childNodes.getLength(); i++) - { - Node childNode = childNodes.item(i); - if (childNode instanceof Element) - { - Element element = (Element)childNode; - String localName = element.getLocalName(); - String nsURI = element.getNamespaceURI(); - if (nsURI.equals(NS_DISCO) && localName.equals(DISCOVERY_REF)) - { - // DISCO link. - String ref = convertToAbsoluteURI(discoURI, element.getAttribute(REF)); - discoReferences.addElement(new DISCOReference(ref)); - } - else if (nsURI.equals(NS_CONTRACT_REF) && localName.equals(CONTRACT_REF)) - { - // WSDL link. - String ref = convertToAbsoluteURI(discoURI, element.getAttribute(REF)); - String docRef = convertToAbsoluteURI(discoURI, element.getAttribute(DOC_REF)); - discoReferences.addElement(new DISCOContractReference(ref, docRef)); - } - } - } - int numberOfDISCOReferences = discoReferences.size(); - if (numberOfDISCOReferences > 0) - { - DISCOReference[] references = new DISCOReference[numberOfDISCOReferences]; - discoReferences.copyInto(references); - return references; - } - } - else - { - // The document is not a valid DISCO document. - throw new Exception(); - } - } - return null; - } - - private String convertToAbsoluteURI(String discoURI, String refURI) - { - if (refURI != null) - { - if (refURI.indexOf("://") > -1) - { - // refURI is already absolute. - return refURI; - } - else - { - StringBuffer absoluteURI = new StringBuffer(discoURI.substring(0, Math.max(discoURI.lastIndexOf('\\'), discoURI.lastIndexOf('/') + 1))); - absoluteURI.append(refURI); - return absoluteURI.toString(); - } - } - return null; - } -}
\ No newline at end of file diff --git a/bundles/org.eclipse.wst.ws.parser/src/org/eclipse/wst/ws/internal/parser/disco/DISCOReference.java b/bundles/org.eclipse.wst.ws.parser/src/org/eclipse/wst/ws/internal/parser/disco/DISCOReference.java deleted file mode 100644 index dd2175edb..000000000 --- a/bundles/org.eclipse.wst.ws.parser/src/org/eclipse/wst/ws/internal/parser/disco/DISCOReference.java +++ /dev/null @@ -1,27 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2004 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.parser.disco; - -public class DISCOReference -{ - private String ref_; - - public DISCOReference(String ref) - { - ref_ = ref; - } - - public String getRef() - { - return ref_; - } -}
\ No newline at end of file diff --git a/bundles/org.eclipse.wst.ws.parser/src/org/eclipse/wst/ws/internal/parser/discovery/NetUtils.java b/bundles/org.eclipse.wst.ws.parser/src/org/eclipse/wst/ws/internal/parser/discovery/NetUtils.java deleted file mode 100644 index 527a489b1..000000000 --- a/bundles/org.eclipse.wst.ws.parser/src/org/eclipse/wst/ws/internal/parser/discovery/NetUtils.java +++ /dev/null @@ -1,93 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2004 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.parser.discovery; - -import java.io.IOException; -import java.io.InputStream; -import java.net.MalformedURLException; -import java.net.URL; -import java.net.URLConnection; - -import sun.misc.BASE64Encoder; - -public final class NetUtils -{ - - /** - * Get the java.net.URLConnection given a string representing the URL. This class ensures - * that proxy settings in WSAD are respected. - * @param urlString String representing the URL. - * @return java.net.URLCDonnection URLConnection to the URL. - */ - public static final URLConnection getURLConnection(String urlString) - { - try - { - URL url = createURL(urlString); - URLConnection uc = url.openConnection(); - String proxyUserName = System.getProperty("http.proxyUserName"); - String proxyPassword = System.getProperty("http.proxyPassword"); - if (proxyUserName != null && proxyPassword != null) - { - StringBuffer userNamePassword = new StringBuffer(proxyUserName); - userNamePassword.append(':').append(proxyPassword); - BASE64Encoder encoder = new BASE64Encoder(); - String encoding = encoder.encode(userNamePassword.toString().getBytes()); - userNamePassword.setLength(0); - userNamePassword.append("Basic ").append(encoding); - uc.setRequestProperty("Proxy-authorization",userNamePassword.toString()); - } - return uc; - } - catch (MalformedURLException e) - { - } - catch (IOException e) - { - } - return null; - } - - /** - * Get the java.io.InputStream for a URL given a string representing the URL. This class - * ensures that proxy settings in WSAD are respected. - * @param urlString String representing the URL. - * @return java.io.InputStream InputStream for reading the URL stream. - */ - public static final InputStream getURLInputStream(String urlString) - { - try - { - URLConnection uc = getURLConnection(urlString); - if (uc != null) - { - InputStream is = uc.getInputStream(); - return is; - } - } - catch (IOException e) - { - } - return null; - } - - /** - * Create a URL from a string. - * @param urlString String representing the URL. - * @return URL java.lang.URL representation of the URL. - * @throws MalformedURLException - */ - public static final URL createURL(String urlString) throws MalformedURLException - { - return new URL(urlString); - } -}
\ No newline at end of file diff --git a/bundles/org.eclipse.wst.ws.parser/src/org/eclipse/wst/ws/internal/parser/discovery/WebServicesParserExt.java b/bundles/org.eclipse.wst.ws.parser/src/org/eclipse/wst/ws/internal/parser/discovery/WebServicesParserExt.java deleted file mode 100644 index 4e907538f..000000000 --- a/bundles/org.eclipse.wst.ws.parser/src/org/eclipse/wst/ws/internal/parser/discovery/WebServicesParserExt.java +++ /dev/null @@ -1,32 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2004 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.parser.discovery; - -import java.net.MalformedURLException; -import java.net.URL; - -import org.eclipse.wst.ws.internal.parser.wsil.WebServicesParser; - -public class WebServicesParserExt extends WebServicesParser { - - public WebServicesParserExt() { - super(); - } - - public WebServicesParserExt(String uri) { - super(uri); - } - - protected URL createURL(String url) throws MalformedURLException { - return NetUtils.createURL(url); - } -}
\ No newline at end of file diff --git a/bundles/org.eclipse.wst.ws.parser/src/org/eclipse/wst/ws/internal/parser/favorites/FavoritesConstants.java b/bundles/org.eclipse.wst.ws.parser/src/org/eclipse/wst/ws/internal/parser/favorites/FavoritesConstants.java deleted file mode 100644 index 5b2e956e7..000000000 --- a/bundles/org.eclipse.wst.ws.parser/src/org/eclipse/wst/ws/internal/parser/favorites/FavoritesConstants.java +++ /dev/null @@ -1,22 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2004 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.parser.favorites; - -public class FavoritesConstants -{ - // Namespace - public static final String NAMESPACE_WSDL = "http://schemas.xmlsoap.org/wsdl/"; - public static final String NAMESPACE_UDDI_V1 = "urn:uddi-org:api"; - public static final String NAMESPACE_UDDI_V2 = "urn:uddi-org:api_v2"; - public static final String NAMESPACE_UDDI_BINDING = "http://schemas.xmlsoap.org/ws/2001/10/inspection/uddi/"; - public static final String NAMESPACE_WSIL_INSPECTION = "http://schemas.xmlsoap.org/ws/2001/10/inspection/"; -} diff --git a/bundles/org.eclipse.wst.ws.parser/src/org/eclipse/wst/ws/internal/parser/favorites/FavoritesLink.java b/bundles/org.eclipse.wst.ws.parser/src/org/eclipse/wst/ws/internal/parser/favorites/FavoritesLink.java deleted file mode 100644 index c8c912955..000000000 --- a/bundles/org.eclipse.wst.ws.parser/src/org/eclipse/wst/ws/internal/parser/favorites/FavoritesLink.java +++ /dev/null @@ -1,34 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2003, 2004 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.parser.favorites; - -import org.apache.wsil.Link; - -public class FavoritesLink -{ - protected Link link_; - - public FavoritesLink() - { - link_ = null; - } - - public Link getLink() - { - return link_; - } - - public void setLink(Link link) - { - link_ = link; - } -} diff --git a/bundles/org.eclipse.wst.ws.parser/src/org/eclipse/wst/ws/internal/parser/favorites/FavoritesRegistryTypeAbstract.java b/bundles/org.eclipse.wst.ws.parser/src/org/eclipse/wst/ws/internal/parser/favorites/FavoritesRegistryTypeAbstract.java deleted file mode 100644 index d167fbea6..000000000 --- a/bundles/org.eclipse.wst.ws.parser/src/org/eclipse/wst/ws/internal/parser/favorites/FavoritesRegistryTypeAbstract.java +++ /dev/null @@ -1,429 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2003, 2004 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.parser.favorites; - -import java.io.File; -import java.io.FileReader; -import java.io.IOException; -import java.util.Vector; - -import org.apache.wsil.Abstract; -import org.apache.wsil.Description; -import org.apache.wsil.Inspection; -import org.apache.wsil.Link; -import org.apache.wsil.Service; -import org.apache.wsil.ServiceName; -import org.apache.wsil.WSILDocument; -import org.apache.wsil.WSILException; -import org.apache.wsil.extension.uddi.BusinessDescription; -import org.apache.wsil.extension.uddi.ServiceDescription; -import org.apache.wsil.impl.AbstractImpl; -import org.apache.wsil.impl.DescriptionImpl; -import org.apache.wsil.impl.LinkImpl; -import org.apache.wsil.impl.ServiceImpl; -import org.apache.wsil.impl.ServiceNameImpl; -import org.apache.wsil.impl.extension.uddi.BusinessDescriptionImpl; -import org.apache.wsil.impl.extension.uddi.ServiceDescriptionImpl; -import org.uddi4j.util.BusinessKey; -import org.uddi4j.util.ServiceKey; - -public abstract class FavoritesRegistryTypeAbstract implements IFavoritesRegistryType -{ - public FavoritesRegistryTypeAbstract() - { - } - - public abstract String getReadLocation(); - public abstract String getWriteLocation(); - protected abstract WSILDocument getWSILDocument(); - - public void init() - { - getWSILDocument(); - } - - protected WSILDocument loadWSILDocument(String path, boolean force) - { - try - { - WSILDocument wsilDoc = WSILDocument.newInstance(); - wsilDoc.read(new FileReader(new File(path))); - return wsilDoc; - } - catch (Throwable t) - { - if (force) - { - try - { - return WSILDocument.newInstance(); - } - catch (Throwable t2) - { - return null; - } - } - else - return null; - } - } - - public String getFavoritesVersion() - { - WSILDocument wsilDoc = getWSILDocument(); - Inspection inspection = wsilDoc.getInspection(); - Abstract[] abstracts = inspection.getAbstracts(); - if (abstracts.length > 0) - return abstracts[0].getText(); - else - return null; - } - - public void setFavoritesVersion(String version) - { - WSILDocument wsilDoc = getWSILDocument(); - Inspection inspection = wsilDoc.getInspection(); - Abstract abst = new AbstractImpl(); - abst.setText(version); - inspection.removeAbstracts(); - inspection.addAbstract(abst); - } - - public synchronized void save() throws WSILException, IOException - { - WSILDocument wsilDoc = getWSILDocument(); - if (wsilDoc != null) - wsilDoc.write(getWriteLocation()); - } - - public IFavoritesUDDIRegistry[] getFavoritesUDDIRegistries() - { - Link[] links = loadUDDIRegistries(); - FavoritesUDDIRegistry[] registries = new FavoritesUDDIRegistry[links.length]; - for (int i = 0; i < links.length; i++) - { - registries[i] = new FavoritesUDDIRegistry(); - registries[i].setLink(links[i]); - } - return registries; - } - - public IFavoritesUDDIBusiness[] getFavoritesUDDIBusinesses() - { - Link[] links = loadUDDIBusinesses(); - FavoritesUDDIBusiness[] businesses = new FavoritesUDDIBusiness[links.length]; - for (int i = 0; i < links.length; i++) - { - businesses[i] = new FavoritesUDDIBusiness(); - businesses[i].setLink(links[i]); - } - return businesses; - } - - public IFavoritesUDDIService[] getFavoritesUDDIServices() - { - Service[] services = loadUDDIServices(); - FavoritesUDDIService[] uddiServices = new FavoritesUDDIService[services.length]; - for (int i = 0; i < services.length; i++) - { - uddiServices[i] = new FavoritesUDDIService(); - uddiServices[i].setService(services[i]); - } - return uddiServices; - } - - public IFavoritesUDDIServiceInterface[] getFavoritesUDDIServiceInterfaces() - { - Service[] services = loadUDDIServiceInterfaces(); - FavoritesUDDIServiceInterface[] serInts = new FavoritesUDDIServiceInterface[services.length]; - for (int i = 0; i < services.length; i++) - { - serInts[i] = new FavoritesUDDIServiceInterface(); - serInts[i].setService(services[i]); - } - return serInts; - } - - public IFavoritesWSDL[] getFavoritesWSDLs() - { - Service[] services = loadWSDLServices(); - FavoritesWSDL[] wsdls = new FavoritesWSDL[services.length]; - for (int i = 0; i < services.length; i++) - { - wsdls[i] = new FavoritesWSDL(); - wsdls[i].setService(services[i]); - } - return wsdls; - } - - public IFavoritesWSIL[] getFavoritesWSILs() - { - Link[] links = loadWSILs(); - FavoritesWSIL[] wsils = new FavoritesWSIL[links.length]; - for (int i = 0; i < links.length; i++) - { - wsils[i] = new FavoritesWSIL(); - wsils[i].setLink(links[i]); - } - return wsils; - } - - public Link[] loadUDDIRegistries() { - return loadLinksByNamespace(FavoritesConstants.NAMESPACE_UDDI_V1); - } - - public Link[] loadUDDIBusinesses() { - return loadLinksByNamespace(FavoritesConstants.NAMESPACE_UDDI_V2); - } - - public Service[] loadUDDIServices() { - return loadServicesByNamespace(FavoritesConstants.NAMESPACE_UDDI_V2); - } - - public Service[] loadUDDIServiceInterfaces() { - return loadServicesByNamespace(FavoritesConstants.NAMESPACE_UDDI_V1); - } - - public Service[] loadWSDLServices() { - return loadServicesByNamespace(FavoritesConstants.NAMESPACE_WSDL); - } - - public Link[] loadWSILs() { - return loadLinksByNamespace(FavoritesConstants.NAMESPACE_WSIL_INSPECTION); - } - - private Service[] loadServicesByNamespace(String namespace) { - Vector serviceVector = new Vector(); - WSILDocument wsilDoc = getWSILDocument(); - if (wsilDoc != null) - { - Inspection inspection = wsilDoc.getInspection(); - Service[] services = inspection.getServices(); - for (int i = 0; i < services.length; i++) - { - Description[] desc = services[i].getDescriptions(); - if (desc[0].getReferencedNamespace().equals(namespace)) - serviceVector.add(services[i]); - } - } - Service[] services = new Service[serviceVector.size()]; - serviceVector.copyInto(services); - return services; - } - - private Link[] loadLinksByNamespace(String namespace) { - Vector linkVector = new Vector(); - WSILDocument wsilDoc = getWSILDocument(); - if (wsilDoc != null) - { - Inspection inspection = wsilDoc.getInspection(); - Link[] links = inspection.getLinks(); - for (int i = 0; i < links.length; i++) - { - if (links[i].getReferencedNamespace().equals(namespace)) - linkVector.add(links[i]); - } - } - Link[] links = new Link[linkVector.size()]; - linkVector.copyInto(links); - return links; - } - - public void addFavoritesUDDIRegistry(IFavoritesUDDIRegistry registry) - { - addUDDIRegistry(registry.getName(), registry.getInquiryURL(), registry.getPublishURL(), registry.getRegistrationURL()); - } - - public void addFavoritesUDDIBusiness(IFavoritesUDDIBusiness business) - { - addUDDIBusiness(business.getName(), business.getInquiryURL(), business.getBusinessKey()); - } - - public void addFavoritesUDDIService(IFavoritesUDDIService service) - { - addUDDIService(service.getName(), service.getInquiryURL(), service.getServiceKey()); - } - - public void addFavoritesUDDIServiceInterface(IFavoritesUDDIServiceInterface serviceInterface) - { - addUDDIServiceInterface(serviceInterface.getName(), serviceInterface.getInquiryURL(), serviceInterface.getServiceInterfaceKey()); - } - - public void addFavoritesWSDL(IFavoritesWSDL wsdl) - { - addWSDLService(wsdl.getWsdlUrl()); - } - - public void addFavoritesWSIL(IFavoritesWSIL wsil) - { - addWSILLink(wsil.getWsilUrl()); - } - - public Link addUDDIRegistry(String registryName, String inquiryAPI, String publishAPI, String registrationURL) { - WSILDocument wsilDoc = getWSILDocument(); - Inspection inspection = wsilDoc.getInspection(); - Link link = new LinkImpl(); - // registry name - Abstract abst = new AbstractImpl(); - abst.setText(registryName); - link.addAbstract(abst); - // inquiry URL - Abstract abst2 = new AbstractImpl(); - abst2.setText(inquiryAPI); - link.addAbstract(abst2); - // publish URL - Abstract abst3 = new AbstractImpl(); - if (publishAPI != null) - abst3.setText(publishAPI); - else - abst3.setText(""); - link.addAbstract(abst3); - // registration URL - Abstract abst4 = new AbstractImpl(); - if (registrationURL != null) - abst4.setText(registrationURL); - else - abst4.setText(""); - link.addAbstract(abst4); - // add namespace - link.setReferencedNamespace(FavoritesConstants.NAMESPACE_UDDI_V1); - inspection.addLink(link); - return link; - } - - public Link addUDDIBusiness(String businessName, String inquiryAPI, String businessKey) { - WSILDocument wsilDoc = getWSILDocument(); - Inspection inspection = wsilDoc.getInspection(); - Link link = new LinkImpl(); - Abstract abst = new AbstractImpl(); - abst.setText(businessName); - link.addAbstract(abst); - link.setReferencedNamespace(FavoritesConstants.NAMESPACE_UDDI_V2); - BusinessDescription bd = new BusinessDescriptionImpl(); - bd.setLocation(inquiryAPI); - BusinessKey key = new BusinessKey(businessKey); - bd.setBusinessKey(key); - link.setExtensionElement(bd); - inspection.addLink(link); - return link; - } - - public Service addUDDIService(String serviceName, String inquiryAPI, String serviceKey) { - WSILDocument wsilDoc = getWSILDocument(); - Inspection inspection = wsilDoc.getInspection(); - Service service = new ServiceImpl(); - ServiceName name = new ServiceNameImpl(); - name.setText(serviceName); - service.addServiceName(name); - Description desc = new DescriptionImpl(); - desc.setReferencedNamespace(FavoritesConstants.NAMESPACE_UDDI_V2); - ServiceDescription sd = new ServiceDescriptionImpl(); - sd.setLocation(inquiryAPI); - ServiceKey key = new ServiceKey(serviceKey); - sd.setServiceKey(key); - desc.setExtensionElement(sd); - service.addDescription(desc); - inspection.addService(service); - return service; - } - - public Service addUDDIServiceInterface(String serIntName, String inquiryAPI, String serIntKey) { - WSILDocument wsilDoc = getWSILDocument(); - Inspection inspection = wsilDoc.getInspection(); - Service service = new ServiceImpl(); - ServiceName name = new ServiceNameImpl(); - name.setText(serIntName); - service.addServiceName(name); - Description desc = new DescriptionImpl(); - desc.setReferencedNamespace(FavoritesConstants.NAMESPACE_UDDI_V1); - ServiceDescription sd = new ServiceDescriptionImpl(); - sd.setLocation(inquiryAPI); - ServiceKey key = new ServiceKey(serIntKey); - sd.setServiceKey(key); - desc.setExtensionElement(sd); - service.addDescription(desc); - inspection.addService(service); - return service; - } - - public Service addWSDLService(String url) { - WSILDocument wsilDoc = getWSILDocument(); - Inspection inspection = wsilDoc.getInspection(); - Service service = new ServiceImpl(); - Description desc = new DescriptionImpl(); - desc.setLocation(url); - desc.setReferencedNamespace(FavoritesConstants.NAMESPACE_WSDL); - service.addDescription(desc); - inspection.addService(service); - return service; - } - - public Link addWSILLink(String url) { - WSILDocument wsilDoc = getWSILDocument(); - Inspection inspection = wsilDoc.getInspection(); - Link link = new LinkImpl(); - link.setLocation(url); - link.setReferencedNamespace(FavoritesConstants.NAMESPACE_WSIL_INSPECTION); - inspection.addLink(link); - return link; - } - - public void removeFavoritesUDDIRegistry(IFavoritesUDDIRegistry registry) - { - if (registry instanceof FavoritesUDDIRegistry) - removeLink(((FavoritesUDDIRegistry)registry).getLink()); - } - - public void removeFavoritesUDDIBusiness(IFavoritesUDDIBusiness business) - { - if (business instanceof FavoritesUDDIBusiness) - removeLink(((FavoritesUDDIBusiness)business).getLink()); - } - - public void removeFavoritesUDDIService(IFavoritesUDDIService service) - { - if (service instanceof FavoritesUDDIService) - removeService(((FavoritesUDDIService)service).getService()); - } - - public void removeFavoritesUDDIServiceInterface(IFavoritesUDDIServiceInterface serviceInterface) - { - if (serviceInterface instanceof FavoritesUDDIServiceInterface) - removeService(((FavoritesUDDIServiceInterface)serviceInterface).getService()); - } - - public void removeFavoritesWSDL(IFavoritesWSDL wsdl) - { - if (wsdl instanceof FavoritesWSDL) - removeService(((FavoritesWSDL)wsdl).getService()); - } - - public void removeFavoritesWSIL(IFavoritesWSIL wsil) - { - if (wsil instanceof FavoritesWSIL) - removeLink(((FavoritesWSIL)wsil).getLink()); - } - - public void removeService(Service service) - { - WSILDocument wsilDoc = getWSILDocument(); - Inspection inspection = wsilDoc.getInspection(); - inspection.removeService(service); - } - - public void removeLink(Link link) - { - WSILDocument wsilDoc = getWSILDocument(); - Inspection inspection = wsilDoc.getInspection(); - inspection.removeLink(link); - } -} diff --git a/bundles/org.eclipse.wst.ws.parser/src/org/eclipse/wst/ws/internal/parser/favorites/FavoritesService.java b/bundles/org.eclipse.wst.ws.parser/src/org/eclipse/wst/ws/internal/parser/favorites/FavoritesService.java deleted file mode 100644 index 4520f9aaf..000000000 --- a/bundles/org.eclipse.wst.ws.parser/src/org/eclipse/wst/ws/internal/parser/favorites/FavoritesService.java +++ /dev/null @@ -1,34 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2003, 2004 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.parser.favorites; - -import org.apache.wsil.Service; - -public class FavoritesService -{ - protected Service service_; - - public FavoritesService() - { - service_ = null; - } - - public Service getService() - { - return service_; - } - - public void setService(Service service) - { - service_ = service; - } -} diff --git a/bundles/org.eclipse.wst.ws.parser/src/org/eclipse/wst/ws/internal/parser/favorites/FavoritesUDDIBusiness.java b/bundles/org.eclipse.wst.ws.parser/src/org/eclipse/wst/ws/internal/parser/favorites/FavoritesUDDIBusiness.java deleted file mode 100644 index f53883c86..000000000 --- a/bundles/org.eclipse.wst.ws.parser/src/org/eclipse/wst/ws/internal/parser/favorites/FavoritesUDDIBusiness.java +++ /dev/null @@ -1,49 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2003, 2004 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.parser.favorites; - -import org.apache.wsil.extension.uddi.BusinessDescription; - -public class FavoritesUDDIBusiness extends FavoritesLink implements IFavoritesUDDIBusiness -{ - public FavoritesUDDIBusiness() - { - super(); - } - - public String getName() - { - return (link_.getAbstracts())[0].getText(); - } - - public String getInquiryURL() - { - return ((BusinessDescription)link_.getExtensionElement()).getLocation(); - } - - public String getBusinessKey() - { - return ((BusinessDescription)link_.getExtensionElement()).getBusinessKey().getText(); - } - - public void setName(String name) - { - } - - public void setInquiryURL(String inquiryURL) - { - } - - public void setBusinessKey(String key) - { - } -} diff --git a/bundles/org.eclipse.wst.ws.parser/src/org/eclipse/wst/ws/internal/parser/favorites/FavoritesUDDIRegistry.java b/bundles/org.eclipse.wst.ws.parser/src/org/eclipse/wst/ws/internal/parser/favorites/FavoritesUDDIRegistry.java deleted file mode 100644 index 7cc8076dd..000000000 --- a/bundles/org.eclipse.wst.ws.parser/src/org/eclipse/wst/ws/internal/parser/favorites/FavoritesUDDIRegistry.java +++ /dev/null @@ -1,88 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2003, 2004 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.parser.favorites; - -import org.apache.wsil.Abstract; -import org.eclipse.wst.ws.internal.parser.plugin.ParserPlugin; - -public class FavoritesUDDIRegistry extends FavoritesLink implements IFavoritesUDDIRegistry -{ - public FavoritesUDDIRegistry() - { - super(); - } - - public String getName() - { - String name = (link_.getAbstracts())[0].getText(); - if (name.startsWith("%")) - { - String translatedName = ParserPlugin.getMessage(name); - if (translatedName != null) - name = translatedName; - } - return name; - } - - public String getInquiryURL() - { - return (link_.getAbstracts())[1].getText(); - } - - public String getPublishURL() - { - Abstract[] abstracts = link_.getAbstracts(); - if (abstracts.length > 2) - { - String publishURL = abstracts[2].getText(); - if (publishURL != null && publishURL.length() > 0) - return publishURL; - } - return null; - } - - public String getRegistrationURL() - { - Abstract[] abstracts = link_.getAbstracts(); - if (abstracts.length > 3) - { - String registrationURL = abstracts[3].getText(); - if (registrationURL != null && registrationURL.length() > 0) - return registrationURL; - } - return null; - } - - public void setName(String name) - { - (link_.getAbstracts())[0].setText(name); - } - - public void setInquiryURL(String inquiryURL) - { - (link_.getAbstracts())[1].setText(inquiryURL); - } - - public void setPublishURL(String publishURL) - { - Abstract[] abstracts = link_.getAbstracts(); - if (abstracts.length > 2) - abstracts[2].setText(publishURL); - } - - public void setRegistrationURL(String registrationURL) - { - Abstract[] abstracts = link_.getAbstracts(); - if (abstracts.length > 3) - abstracts[3].setText(registrationURL); - } -} diff --git a/bundles/org.eclipse.wst.ws.parser/src/org/eclipse/wst/ws/internal/parser/favorites/FavoritesUDDIService.java b/bundles/org.eclipse.wst.ws.parser/src/org/eclipse/wst/ws/internal/parser/favorites/FavoritesUDDIService.java deleted file mode 100644 index 0954f5712..000000000 --- a/bundles/org.eclipse.wst.ws.parser/src/org/eclipse/wst/ws/internal/parser/favorites/FavoritesUDDIService.java +++ /dev/null @@ -1,51 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2003, 2004 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.parser.favorites; - -import org.apache.wsil.extension.uddi.ServiceDescription; - -public class FavoritesUDDIService extends FavoritesService implements IFavoritesUDDIService -{ - public FavoritesUDDIService() - { - super(); - } - - public String getName() - { - return (service_.getServiceNames())[0].getText(); - } - - public String getInquiryURL() - { - ServiceDescription sd = (ServiceDescription)(service_.getDescriptions())[0].getExtensionElement(); - return sd.getLocation(); - } - - public String getServiceKey() - { - ServiceDescription sd = (ServiceDescription)(service_.getDescriptions())[0].getExtensionElement(); - return sd.getServiceKey().getText(); - } - - public void setName(String name) - { - } - - public void setInquiryURL(String inquiryURL) - { - } - - public void setServiceKey(String key) - { - } -} diff --git a/bundles/org.eclipse.wst.ws.parser/src/org/eclipse/wst/ws/internal/parser/favorites/FavoritesUDDIServiceInterface.java b/bundles/org.eclipse.wst.ws.parser/src/org/eclipse/wst/ws/internal/parser/favorites/FavoritesUDDIServiceInterface.java deleted file mode 100644 index 56ec674c1..000000000 --- a/bundles/org.eclipse.wst.ws.parser/src/org/eclipse/wst/ws/internal/parser/favorites/FavoritesUDDIServiceInterface.java +++ /dev/null @@ -1,51 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2003, 2004 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.parser.favorites; - -import org.apache.wsil.extension.uddi.ServiceDescription; - -public class FavoritesUDDIServiceInterface extends FavoritesService implements IFavoritesUDDIServiceInterface -{ - public FavoritesUDDIServiceInterface() - { - super(); - } - - public String getName() - { - return (service_.getServiceNames())[0].getText(); - } - - public String getInquiryURL() - { - ServiceDescription sd = (ServiceDescription)(service_.getDescriptions())[0].getExtensionElement(); - return sd.getLocation(); - } - - public String getServiceInterfaceKey() - { - ServiceDescription sd = (ServiceDescription)(service_.getDescriptions())[0].getExtensionElement(); - return sd.getServiceKey().getText(); - } - - public void setName(String name) - { - } - - public void setInquiryURL(String inquiryURL) - { - } - - public void setServiceInterfaceKey(String key) - { - } -} diff --git a/bundles/org.eclipse.wst.ws.parser/src/org/eclipse/wst/ws/internal/parser/favorites/FavoritesWSDL.java b/bundles/org.eclipse.wst.ws.parser/src/org/eclipse/wst/ws/internal/parser/favorites/FavoritesWSDL.java deleted file mode 100644 index 0f340e053..000000000 --- a/bundles/org.eclipse.wst.ws.parser/src/org/eclipse/wst/ws/internal/parser/favorites/FavoritesWSDL.java +++ /dev/null @@ -1,38 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2003, 2004 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.parser.favorites; - -public class FavoritesWSDL extends FavoritesService implements IFavoritesWSDL -{ - public FavoritesWSDL() - { - super(); - } - - public String getName() - { - return getWsdlUrl(); - } - - public String getWsdlUrl() - { - return (service_.getDescriptions())[0].getLocation(); - } - - public void setName(String name) - { - } - - public void setWsdlUrl(String wsdlURL) - { - } -} diff --git a/bundles/org.eclipse.wst.ws.parser/src/org/eclipse/wst/ws/internal/parser/favorites/FavoritesWSIL.java b/bundles/org.eclipse.wst.ws.parser/src/org/eclipse/wst/ws/internal/parser/favorites/FavoritesWSIL.java deleted file mode 100644 index 6622c7dea..000000000 --- a/bundles/org.eclipse.wst.ws.parser/src/org/eclipse/wst/ws/internal/parser/favorites/FavoritesWSIL.java +++ /dev/null @@ -1,39 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2003, 2004 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.parser.favorites; - -public class FavoritesWSIL extends FavoritesLink implements IFavoritesWSIL -{ - public FavoritesWSIL() - { - super(); - } - - public String getName() - { - return getWsilUrl(); - } - - - public String getWsilUrl() - { - return link_.getLocation(); - } - - public void setName(String name) - { - } - - public void setWsilUrl(String wsilURL) - { - } -} diff --git a/bundles/org.eclipse.wst.ws.parser/src/org/eclipse/wst/ws/internal/parser/favorites/IFavoritesRegistryType.java b/bundles/org.eclipse.wst.ws.parser/src/org/eclipse/wst/ws/internal/parser/favorites/IFavoritesRegistryType.java deleted file mode 100644 index b2c96c1cb..000000000 --- a/bundles/org.eclipse.wst.ws.parser/src/org/eclipse/wst/ws/internal/parser/favorites/IFavoritesRegistryType.java +++ /dev/null @@ -1,36 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2003, 2004 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.parser.favorites; - -public interface IFavoritesRegistryType -{ - public IFavoritesUDDIRegistry[] getFavoritesUDDIRegistries(); - public IFavoritesUDDIBusiness[] getFavoritesUDDIBusinesses(); - public IFavoritesUDDIService[] getFavoritesUDDIServices(); - public IFavoritesUDDIServiceInterface[] getFavoritesUDDIServiceInterfaces(); - public IFavoritesWSDL[] getFavoritesWSDLs(); - public IFavoritesWSIL[] getFavoritesWSILs(); - - public void addFavoritesUDDIRegistry(IFavoritesUDDIRegistry registry); - public void addFavoritesUDDIBusiness(IFavoritesUDDIBusiness business); - public void addFavoritesUDDIService(IFavoritesUDDIService service); - public void addFavoritesUDDIServiceInterface(IFavoritesUDDIServiceInterface serviceInterface); - public void addFavoritesWSDL(IFavoritesWSDL wsdl); - public void addFavoritesWSIL(IFavoritesWSIL wsil); - - public void removeFavoritesUDDIRegistry(IFavoritesUDDIRegistry registry); - public void removeFavoritesUDDIBusiness(IFavoritesUDDIBusiness business); - public void removeFavoritesUDDIService(IFavoritesUDDIService service); - public void removeFavoritesUDDIServiceInterface(IFavoritesUDDIServiceInterface serviceInterface); - public void removeFavoritesWSDL(IFavoritesWSDL wsdl); - public void removeFavoritesWSIL(IFavoritesWSIL wsil); -} diff --git a/bundles/org.eclipse.wst.ws.parser/src/org/eclipse/wst/ws/internal/parser/favorites/IFavoritesUDDIBusiness.java b/bundles/org.eclipse.wst.ws.parser/src/org/eclipse/wst/ws/internal/parser/favorites/IFavoritesUDDIBusiness.java deleted file mode 100644 index dd2d2c950..000000000 --- a/bundles/org.eclipse.wst.ws.parser/src/org/eclipse/wst/ws/internal/parser/favorites/IFavoritesUDDIBusiness.java +++ /dev/null @@ -1,23 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2003, 2004 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.parser.favorites; - -public interface IFavoritesUDDIBusiness -{ - public String getName(); - public String getInquiryURL(); - public String getBusinessKey(); - - public void setName(String name); - public void setInquiryURL(String inquiryURL); - public void setBusinessKey(String key); -} diff --git a/bundles/org.eclipse.wst.ws.parser/src/org/eclipse/wst/ws/internal/parser/favorites/IFavoritesUDDIRegistry.java b/bundles/org.eclipse.wst.ws.parser/src/org/eclipse/wst/ws/internal/parser/favorites/IFavoritesUDDIRegistry.java deleted file mode 100644 index bb035f1c1..000000000 --- a/bundles/org.eclipse.wst.ws.parser/src/org/eclipse/wst/ws/internal/parser/favorites/IFavoritesUDDIRegistry.java +++ /dev/null @@ -1,25 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2003, 2004 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.parser.favorites; - -public interface IFavoritesUDDIRegistry -{ - public String getName(); - public String getInquiryURL(); - public String getPublishURL(); - public String getRegistrationURL(); - - public void setName(String name); - public void setInquiryURL(String inquiryURL); - public void setPublishURL(String publishURL); - public void setRegistrationURL(String registrationURL); -} diff --git a/bundles/org.eclipse.wst.ws.parser/src/org/eclipse/wst/ws/internal/parser/favorites/IFavoritesUDDIService.java b/bundles/org.eclipse.wst.ws.parser/src/org/eclipse/wst/ws/internal/parser/favorites/IFavoritesUDDIService.java deleted file mode 100644 index 286370df0..000000000 --- a/bundles/org.eclipse.wst.ws.parser/src/org/eclipse/wst/ws/internal/parser/favorites/IFavoritesUDDIService.java +++ /dev/null @@ -1,23 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2003, 2004 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.parser.favorites; - -public interface IFavoritesUDDIService -{ - public String getName(); - public String getInquiryURL(); - public String getServiceKey(); - - public void setName(String name); - public void setInquiryURL(String inquiryURL); - public void setServiceKey(String key); -} diff --git a/bundles/org.eclipse.wst.ws.parser/src/org/eclipse/wst/ws/internal/parser/favorites/IFavoritesUDDIServiceInterface.java b/bundles/org.eclipse.wst.ws.parser/src/org/eclipse/wst/ws/internal/parser/favorites/IFavoritesUDDIServiceInterface.java deleted file mode 100644 index ad426cbb6..000000000 --- a/bundles/org.eclipse.wst.ws.parser/src/org/eclipse/wst/ws/internal/parser/favorites/IFavoritesUDDIServiceInterface.java +++ /dev/null @@ -1,23 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2003, 2004 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.parser.favorites; - -public interface IFavoritesUDDIServiceInterface -{ - public String getName(); - public String getInquiryURL(); - public String getServiceInterfaceKey(); - - public void setName(String name); - public void setInquiryURL(String inquiryURL); - public void setServiceInterfaceKey(String key); -} diff --git a/bundles/org.eclipse.wst.ws.parser/src/org/eclipse/wst/ws/internal/parser/favorites/IFavoritesWSDL.java b/bundles/org.eclipse.wst.ws.parser/src/org/eclipse/wst/ws/internal/parser/favorites/IFavoritesWSDL.java deleted file mode 100644 index d69f824cf..000000000 --- a/bundles/org.eclipse.wst.ws.parser/src/org/eclipse/wst/ws/internal/parser/favorites/IFavoritesWSDL.java +++ /dev/null @@ -1,21 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2003, 2004 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.parser.favorites; - -public interface IFavoritesWSDL -{ - public String getName(); - public String getWsdlUrl(); - - public void setName(String name); - public void setWsdlUrl(String wsdlURL); -} diff --git a/bundles/org.eclipse.wst.ws.parser/src/org/eclipse/wst/ws/internal/parser/favorites/IFavoritesWSIL.java b/bundles/org.eclipse.wst.ws.parser/src/org/eclipse/wst/ws/internal/parser/favorites/IFavoritesWSIL.java deleted file mode 100644 index 4c129e13b..000000000 --- a/bundles/org.eclipse.wst.ws.parser/src/org/eclipse/wst/ws/internal/parser/favorites/IFavoritesWSIL.java +++ /dev/null @@ -1,21 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2003, 2004 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.parser.favorites; - -public interface IFavoritesWSIL -{ - public String getName(); - public String getWsilUrl(); - - public void setName(String name); - public void setWsilUrl(String wsilURL); -} diff --git a/bundles/org.eclipse.wst.ws.parser/src/org/eclipse/wst/ws/internal/parser/plugin/ParserPlugin.java b/bundles/org.eclipse.wst.ws.parser/src/org/eclipse/wst/ws/internal/parser/plugin/ParserPlugin.java deleted file mode 100644 index d2dc6dc69..000000000 --- a/bundles/org.eclipse.wst.ws.parser/src/org/eclipse/wst/ws/internal/parser/plugin/ParserPlugin.java +++ /dev/null @@ -1,111 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2004 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.parser.plugin; - -import java.text.MessageFormat; -import java.util.MissingResourceException; -import java.util.ResourceBundle; - -import org.eclipse.core.runtime.Plugin; -import org.eclipse.wst.command.internal.env.core.common.MessageUtils; - -/** - * The main plugin class to be used in the desktop. - */ -public class ParserPlugin extends Plugin { - //The shared instance. - private static ParserPlugin plugin; - //Resource bundle. - private ResourceBundle resourceBundle; - - /** - * The constructor. - */ - public ParserPlugin() { - super(); - plugin = this; - try { - resourceBundle = ResourceBundle.getBundle("org.eclipse.wst.ws.parser.ParserPluginResources"); - } catch (MissingResourceException x) { - resourceBundle = null; - } - } - - /** - * Returns the shared instance. - */ - public static ParserPlugin getDefault() { - return plugin; - } - - /** - * Returns the string from the plugin's resource bundle, - * or 'key' if not found. - */ - public static String getResourceString(String key) { - ResourceBundle bundle = ParserPlugin.getDefault().getResourceBundle(); - try { - return (bundle != null) ? bundle.getString(key) : key; - } catch (MissingResourceException e) { - return key; - } - } - - /** - * Returns the plugin's resource bundle, - */ - public ResourceBundle getResourceBundle() { - return resourceBundle; - } - - /** - * Returns the message string identified by the given key from - * the plugin.properties file for the appropriate locale. - * @param key The message key string prefixed by a "%" symbol. - * That is, the string passed in must be of the form "%KEY" - * where the plugin.properties file contains a line of the - * form: "KEY = value". - * @return The locale-specific message. - */ - public static String getMessage ( String key ) - { - MessageUtils msgUtils = new MessageUtils( "org.eclipse.wst.ws.parser.plugin", plugin ); - - if( key.startsWith("%")) - { - key = key.substring( 1, key.length() ); - } - - return msgUtils.getMessage(key); - } - - /** - * Returns the message string identified by the given key from - * the plugin.properties file for the appropriate locale. - * Substitution sequences in the message string - * are replaced by the given array of substitution objects (which - * are most frequently strings). See java.text.MessageFormat for - * further details on substitution. - * @param key The message key string prefixed by a "%" symbol. - * That is, the string passed in must be of the form "%KEY" - * where the plugin.properties file contains a line of the - * form: "KEY = value". - * @param args The substitution values for the message - * as required by the message in plugin.properties and - * by the rules of class java.text.MessageFormat. - * @return The locale-specific message. - */ - public static String getMessage ( String key, Object[] args ) - { - return MessageFormat.format(getMessage(key),args); - } -} diff --git a/bundles/org.eclipse.wst.ws.parser/src/org/eclipse/wst/ws/internal/parser/wsil/HTMLHeadHandler.java b/bundles/org.eclipse.wst.ws.parser/src/org/eclipse/wst/ws/internal/parser/wsil/HTMLHeadHandler.java deleted file mode 100644 index e63c60df3..000000000 --- a/bundles/org.eclipse.wst.ws.parser/src/org/eclipse/wst/ws/internal/parser/wsil/HTMLHeadHandler.java +++ /dev/null @@ -1,296 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2006 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 - * -------- -------- ----------------------------------------------------------- - * 20060517 142324 rsinha@ca.ibm.com - Rupam Kuehner - *******************************************************************************/ - -package org.eclipse.wst.ws.internal.parser.wsil; - -import java.io.UnsupportedEncodingException; -import java.util.Vector; - -import org.xml.sax.Attributes; -import org.xml.sax.SAXException; -import org.xml.sax.SAXParseException; -import org.xml.sax.helpers.DefaultHandler; - -public class HTMLHeadHandler extends DefaultHandler -{ - private final char START_TAG = '<'; - private final char END_TAG = '>'; - private final String HEAD_START_TAG = "<head>"; - private final String HEAD_END_TAG = "</head>"; - private final String ROOT_START_TAG = "<root>"; - private final String ROOT_END_TAG = "</root>"; - private final String UTF8 = "UTF-8"; - - //HTML META tag information used to detect the charset. - private final String HTML_CONTENT = "content"; - private final String HTTP_EQUIV = "http-equiv"; - private final String HTTP_EQUIV_CONTENT_TYPE = "Content-Type"; - private final String CHARSET = "charset"; - - // WSIL tag information. - private final String META = "meta"; - private final String NAME = "name"; - private final String SERVICE_INSPECTION = "serviceInspection"; - private final String CONTENT = "content"; - - // DISCO tag information. - private final String LINK = "link"; - private final String TYPE = "type"; - private final String TEXT_XML = "text/xml"; - private final String REL = "rel"; - private final String ALTERNATE = "alternate"; - private final String HREF = "href"; - - private String baseURI_; - private Vector wsils_; - private Vector discos_; - private String byteEncoding = UTF8; //Default to UTF-8. - - public HTMLHeadHandler(String baseURI) - { - super(); - baseURI_ = baseURI; - wsils_ = new Vector(); - discos_ = new Vector(); - } - - public String[] getWsils() - { - String[] wsils = new String[wsils_.size()]; - wsils_.copyInto(wsils); - return wsils; - } - - public String[] getDiscos() - { - String[] discos = new String[discos_.size()]; - discos_.copyInto(discos); - return discos; - } - - public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException - { - String qNameLC = qName.toLowerCase(); - if (qNameLC.equals(META)) - { - String nameValue = attributes.getValue(NAME); - if (SERVICE_INSPECTION.equals(nameValue)) - { - String wsilURI = attributes.getValue(CONTENT); - if (baseURI_ != null && wsilURI.indexOf(":/") == -1) - { - StringBuffer sb = new StringBuffer(); - sb.append(baseURI_.substring(0, baseURI_.lastIndexOf("/")+1)); - sb.append(wsilURI); - wsilURI = sb.toString(); - } - if (!wsils_.contains(wsilURI)) - wsils_.add(wsilURI); - } - } - else if (qNameLC.equals(LINK)) - { - // See http://msdn.microsoft.com/msdnmag/issues/02/02/xml/default.aspx for more details on DISCO. - String type = attributes.getValue(TYPE); - String rel = attributes.getValue(REL); - String href = attributes.getValue(HREF); - if (TEXT_XML.equals(type) && ALTERNATE.equals(rel) && href != null) - { - String discoURI = href; - if (discoURI.indexOf(":/") == -1) - { - StringBuffer sb = new StringBuffer(); - sb.append(baseURI_.substring(0,baseURI_.lastIndexOf("/")+1)); - sb.append(discoURI); - discoURI = sb.toString(); - } - if (!discos_.contains(discoURI)) - discos_.add(discoURI); - } - } - } - - public void error(SAXParseException e) throws SAXException - { - } - - public void fatalError(SAXParseException e) throws SAXException - { - } - - public void warning(SAXParseException e) throws SAXException - { - } - - /** - * Appends the elements of the provided tag in the provided document to the provided StringBuffer. - * @param target - * @param document - * @param tag - * @param encoding - * @return boolean false if the value of the encoding parameter matched the detected charset or if no charset was detected. - * Returns true if a charset was detected and it did not equal the encoding parameter. If true is returned - * the harvesting of the tags would have stopped at the point the charset was detected. The caller - * should call this method again with the correct encoding. - */ - private boolean harvestTags(StringBuffer target,String document,String tag, String encoding) - { - boolean changeEncoding = false; - int index = document.indexOf(START_TAG); - int documentLength = document.length(); - int tagLength = tag.length(); - while (index != -1 && (index+1+tagLength)<documentLength) - { - String str = document.substring(index+1,index+1+tagLength); - if (str.toLowerCase().equals(tag)) - { - str = document.substring(index,document.indexOf(END_TAG,index+1)+1); - target.append(str); - index += str.length(); - - //If tag is META and declares the charset, find out what it is - //and if it matches what was passed in. If it matches, continue - //with the parsing and return false when complete. - //If the detected charset is different from what was passed in, - //- change byteEncoding to equal the detected charset. - //- stop parsing. - //- return true. - if (tag.equals(META)) - { - int idxOfContent = str.indexOf(HTML_CONTENT); - int idxOfHTTPEQUIV = str.indexOf(HTTP_EQUIV); - if (idxOfHTTPEQUIV!= -1 && idxOfContent != -1) - { - //Check if the http-equiv attribute is set to Content-Type. - int idxOfHTTPEQUIVOpenQuote = str.indexOf("\"", idxOfHTTPEQUIV+1); - int idxOfHTTPEQUIVClosingQuote = str.indexOf("\"", idxOfHTTPEQUIVOpenQuote+1); - String hTTPEQUIVValueUntrimmed = str.substring(idxOfHTTPEQUIVOpenQuote+1, idxOfHTTPEQUIVClosingQuote); - if (hTTPEQUIVValueUntrimmed.trim().equals(HTTP_EQUIV_CONTENT_TYPE)) - { - //This META tag contains the charset. Get the value of the content attribute - int idxOfOpenQuote = str.indexOf("\"", idxOfContent+1); - int idxOfClosingQuote = str.indexOf("\"", idxOfOpenQuote+1); - String contentValue = str.substring(idxOfOpenQuote+1, idxOfClosingQuote); - - //Get the charset - int idxOfCharSet = contentValue.indexOf(CHARSET); - int idxOfEquals = contentValue.indexOf("=", idxOfCharSet+CHARSET.length()); - String detectedEncodingValueUntrimmed = contentValue.substring(idxOfEquals+1); - String detectedEncodingValue = detectedEncodingValueUntrimmed.trim(); - if (!detectedEncodingValue.equals(encoding)) - { - byteEncoding = detectedEncodingValue; - changeEncoding = true; - break; - } - } - } - } - } - else - index++; - index = document.indexOf(START_TAG,index); - } - - return changeEncoding; - } - - - /** - * If the provided byte array reperesents the contents of an HTML - * document, this method will return a byte array in which - * <ul> - * <li>the opening and closing HEAD tags are removed and replaced with - * opening and closing <root> tags</li> - * <li>only the META and LINK elements are in the HTML document - * are included in the contents between the opening and closing - * <root> tags. - * </ul> - * This method will modify the value of the byteEncoding String - * attribute on this class if it is something other than - * UTF-8. Callers of this method should call getByteEncoding() - * after calling this method if they need to know the charset - * value used by this method to decode/endcode the byte array. - * @param b - * @return byte[] - */ - public byte[] harvestHeadTags(byte[] b) - { - String s; - - try - { - //Assume the default byte encoding of UTF-8 for now. - s = new String(b, byteEncoding); - } - catch (UnsupportedEncodingException uee) - { - s = new String(b); - } - String head = s.toLowerCase(); - int headStartIndex = head.indexOf(HEAD_START_TAG); - int headEndIndex = head.indexOf(HEAD_END_TAG); - StringBuffer sb = new StringBuffer(); - sb.append(ROOT_START_TAG); - if (headStartIndex != -1 && headEndIndex != -1) - { - head = s.substring(headStartIndex, headEndIndex+HEAD_END_TAG.length()); - boolean encodingChanged = harvestTags(sb,head,META, byteEncoding); - if (encodingChanged) - { - //The harvestTags method detected a different charset - //than the one that was passed in. Start from the beginning - //with the correct charset. - String s2; - try - { - s2 = new String(b, byteEncoding); - } - catch (UnsupportedEncodingException uee) - { - s2 = new String(b); - } - String head2 = s2.toLowerCase(); - int head2StartIndex = head2.indexOf(HEAD_START_TAG); - int head2EndIndex = head2.indexOf(HEAD_END_TAG); - sb = new StringBuffer(); - sb.append(ROOT_START_TAG); - if (head2StartIndex != -1 && head2EndIndex != -1) - { - head2 = s2.substring(head2StartIndex, head2EndIndex+HEAD_END_TAG.length()); - harvestTags(sb,head2,META, byteEncoding); - harvestTags(sb,head2,LINK,byteEncoding); - } - } - else - { - harvestTags(sb,head,LINK,byteEncoding); - } - } - sb.append(ROOT_END_TAG); - try - { - return sb.toString().getBytes(byteEncoding); - } catch (UnsupportedEncodingException uee) - { - return sb.toString().getBytes(); - } - - } - - public String getByteEncoding() - { - return byteEncoding; - } -} diff --git a/bundles/org.eclipse.wst.ws.parser/src/org/eclipse/wst/ws/internal/parser/wsil/IllegalArgumentsException.java b/bundles/org.eclipse.wst.ws.parser/src/org/eclipse/wst/ws/internal/parser/wsil/IllegalArgumentsException.java deleted file mode 100644 index bf42dc6b9..000000000 --- a/bundles/org.eclipse.wst.ws.parser/src/org/eclipse/wst/ws/internal/parser/wsil/IllegalArgumentsException.java +++ /dev/null @@ -1,22 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2004 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.parser.wsil; - -public class IllegalArgumentsException extends Exception -{ - private static final long serialVersionUID = -2533981176285561234L; - - public IllegalArgumentsException(String arg) - { - super(arg); - } -} diff --git a/bundles/org.eclipse.wst.ws.parser/src/org/eclipse/wst/ws/internal/parser/wsil/UDDIURIHelper.java b/bundles/org.eclipse.wst.ws.parser/src/org/eclipse/wst/ws/internal/parser/wsil/UDDIURIHelper.java deleted file mode 100644 index 3d007ac66..000000000 --- a/bundles/org.eclipse.wst.ws.parser/src/org/eclipse/wst/ws/internal/parser/wsil/UDDIURIHelper.java +++ /dev/null @@ -1,63 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2004 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.parser.wsil; - -import java.text.MessageFormat; -import java.text.ParseException; - -public class UDDIURIHelper -{ - private static final String QUERYSERVICE_URI_TEMPLATE = "uddiservice:query:{0}:query:{1}"; - private static final String SERVICEKEY_URI_TEMPLATE = "uddiservice:serviceKey:{0}:serviceKey:{1}"; - - public static final String getQueryServiceURI(String query,String inquiryURL) - { - String[] uriParams = {query,inquiryURL}; - return MessageFormat.format(QUERYSERVICE_URI_TEMPLATE,uriParams); - } - - public static final String getServiceKeyURI(String serviceKey,String inquiryURL) - { - String[] uriParams = {serviceKey,inquiryURL}; - return MessageFormat.format(SERVICEKEY_URI_TEMPLATE,uriParams); - } - - private static final String[] parseURI(String pattern,String uri) - { - try - { - MessageFormat mf = new MessageFormat(pattern); - Object[] parsedResults = mf.parse(uri); - if (parsedResults != null && parsedResults.length > 0) - { - String[] results = new String[parsedResults.length]; - for (int i=0;i<parsedResults.length;i++) - results[i] = (String)parsedResults[i]; - return results; - } - } - catch (ParseException e) - { - } - return null; - } - - public static final String[] parseServiceKeyURI(String uri) - { - return parseURI(SERVICEKEY_URI_TEMPLATE,uri); - } - - public static final String[] parseQueryServiceURI(String uri) - { - return parseURI(QUERYSERVICE_URI_TEMPLATE,uri); - } -}
\ No newline at end of file diff --git a/bundles/org.eclipse.wst.ws.parser/src/org/eclipse/wst/ws/internal/parser/wsil/WSILMessages.java b/bundles/org.eclipse.wst.ws.parser/src/org/eclipse/wst/ws/internal/parser/wsil/WSILMessages.java deleted file mode 100644 index 3286ba799..000000000 --- a/bundles/org.eclipse.wst.ws.parser/src/org/eclipse/wst/ws/internal/parser/wsil/WSILMessages.java +++ /dev/null @@ -1,22 +0,0 @@ -package org.eclipse.wst.ws.internal.parser.wsil; - -import org.eclipse.osgi.util.NLS; - -public class WSILMessages extends NLS -{ - private static final String BUNDLE_NAME = "org.eclipse.wst.ws.internal.parser.wsil.wsil"; //$NON-NLS-1$ - - static - { - NLS.initializeMessages(BUNDLE_NAME, WSILMessages.class); - } - - public static String MSG_ERROR_INVALID_ARGUMENTS; - public static String MSG_ERROR_ILLEGAL_ARGUMENTS; - public static String MSG_ERROR_INVALID_WSDL_URI; - public static String MSG_ERROR_INVALID_WSIL_URI; - public static String MSG_ERROR_UNRESOLVABLE_WSDL; - public static String MSG_ERROR_UNEXPECTED_EXCEPTION; - public static String MSG_ERROR_MALFORMED_WSDL; - public static String MSG_ERROR_WRITE_WSIL; -}
\ No newline at end of file diff --git a/bundles/org.eclipse.wst.ws.parser/src/org/eclipse/wst/ws/internal/parser/wsil/WWWAuthenticationException.java b/bundles/org.eclipse.wst.ws.parser/src/org/eclipse/wst/ws/internal/parser/wsil/WWWAuthenticationException.java deleted file mode 100644 index 8ac66a620..000000000 --- a/bundles/org.eclipse.wst.ws.parser/src/org/eclipse/wst/ws/internal/parser/wsil/WWWAuthenticationException.java +++ /dev/null @@ -1,46 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2004 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.parser.wsil; - -import java.io.IOException; - -public class WWWAuthenticationException extends Exception -{ - private static final long serialVersionUID = -4918211021620316049L; - - private IOException ioe_; - private String wwwAuthMsg_; - private String url_; - - public WWWAuthenticationException(IOException ioe, String wwwAuthMsg, String url) - { - super(ioe.getMessage()); - ioe_ = ioe; - wwwAuthMsg_ = wwwAuthMsg; - url_ = url; - } - - public IOException getIOException() - { - return ioe_; - } - - public String getWWWAuthenticationMsg() - { - return wwwAuthMsg_; - } - - public String getURL() - { - return url_; - } -} diff --git a/bundles/org.eclipse.wst.ws.parser/src/org/eclipse/wst/ws/internal/parser/wsil/WWWAuthenticationHandler.java b/bundles/org.eclipse.wst.ws.parser/src/org/eclipse/wst/ws/internal/parser/wsil/WWWAuthenticationHandler.java deleted file mode 100644 index c7a8cab19..000000000 --- a/bundles/org.eclipse.wst.ws.parser/src/org/eclipse/wst/ws/internal/parser/wsil/WWWAuthenticationHandler.java +++ /dev/null @@ -1,19 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2004 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.parser.wsil; - -public interface WWWAuthenticationHandler -{ - public void handleWWWAuthentication(WWWAuthenticationException wwwae); - public String getUsername(); - public String getPassword(); -} diff --git a/bundles/org.eclipse.wst.ws.parser/src/org/eclipse/wst/ws/internal/parser/wsil/WebServiceEntity.java b/bundles/org.eclipse.wst.ws.parser/src/org/eclipse/wst/ws/internal/parser/wsil/WebServiceEntity.java deleted file mode 100644 index 33e38a77f..000000000 --- a/bundles/org.eclipse.wst.ws.parser/src/org/eclipse/wst/ws/internal/parser/wsil/WebServiceEntity.java +++ /dev/null @@ -1,148 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2004 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.parser.wsil; - -import java.util.ArrayList; -import java.util.List; - -public class WebServiceEntity -{ - public static final int TYPE_UNKNOWN = -1; - public static final int TYPE_HTML = 0; - public static final int TYPE_WSIL = 1; - public static final int TYPE_WSDL = 2; - public static final int TYPE_UDDI_SERVICE = 3; - public static final int TYPE_DISCO = 4; - - private Object parent_; - private List children_; - private int type_; - private String uri_; - private byte[] bytes_; - private String httpUsername_; - private String httpPassword_; - private String documentation_; - private Object model_; - - public WebServiceEntity() - { - parent_ = null; - children_ = new ArrayList(); - type_ = TYPE_UNKNOWN; - uri_ = null; - bytes_ = null; - httpUsername_ = null; - httpPassword_ = null; - documentation_ = null; - model_ = null; - } - - public Object getParent() - { - return parent_; - } - - public void setParent(Object parent) - { - parent_ = parent; - } - - public List getChildren() - { - return children_; - } - - public void addChild(Object child) - { - children_.add(child); - } - - public void removeChild(Object child) - { - children_.remove(child); - } - - public int getType() - { - return type_; - } - - public void setType(int type) - { - type_ = type; - } - - public String getURI() - { - return uri_; - } - - public void setURI(String uri) - { - uri_ = uri; - } - - public byte[] getBytes() - { - return bytes_; - } - - public void setBytes(byte[] bytes) - { - bytes_ = bytes; - } - - public String getHTTPUsername() - { - return httpUsername_; - } - - public void setHTTPUsername(String httpUsername) - { - httpUsername_ = httpUsername; - } - - public String getHTTPPassword() - { - return httpPassword_; - } - - public void setHTTPPassword(String httpPassword) - { - httpPassword_ = httpPassword; - } - - public String getDocumentation() - { - return documentation_; - } - - public void setDocumentation(String documentation) - { - documentation_ = documentation; - } - - public Object getModel() - { - return model_; - } - - public void setModel(Object model) - { - model_ = model; - } - - public boolean isEntityResolved() - { - return (bytes_ != null); - } -}
\ No newline at end of file diff --git a/bundles/org.eclipse.wst.ws.parser/src/org/eclipse/wst/ws/internal/parser/wsil/WebServicesParser.java b/bundles/org.eclipse.wst.ws.parser/src/org/eclipse/wst/ws/internal/parser/wsil/WebServicesParser.java deleted file mode 100644 index 583ad9d22..000000000 --- a/bundles/org.eclipse.wst.ws.parser/src/org/eclipse/wst/ws/internal/parser/wsil/WebServicesParser.java +++ /dev/null @@ -1,628 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2006 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 - * -------- -------- ----------------------------------------------------------- - * 20060504 119296 pmoogk@ca.ibm.com - Peter Moogk - * 20060517 142324 rsinha@ca.ibm.com - Rupam Kuehner - * 20060711 150301 pmoogk@ca.ibm.com - Peter Moogk - * 20060818 154393 pmoogk@ca.ibm.com - Peter Moogk - * 20060906 156420 pmoogk@ca.ibm.com - Peter Moogk - *******************************************************************************/ - -package org.eclipse.wst.ws.internal.parser.wsil; - -import java.io.ByteArrayInputStream; -import java.io.ByteArrayOutputStream; -import java.io.IOException; -import java.io.InputStream; -import java.io.InputStreamReader; -import java.net.MalformedURLException; -import java.net.URL; -import java.net.URLConnection; -import java.util.Hashtable; -import javax.wsdl.Definition; -import javax.wsdl.WSDLException; -import javax.wsdl.factory.WSDLFactory; -import javax.wsdl.xml.WSDLReader; -import javax.xml.parsers.ParserConfigurationException; -import javax.xml.parsers.SAXParser; -import javax.xml.parsers.SAXParserFactory; -import org.apache.wsil.Abstract; -import org.apache.wsil.Description; -import org.apache.wsil.Inspection; -import org.apache.wsil.Link; -import org.apache.wsil.Service; -import org.apache.wsil.WSILConstants; -import org.apache.wsil.WSILDocument; -import org.apache.wsil.WSILException; -import org.apache.wsil.extension.ExtensionElement; -import org.apache.wsil.extension.uddi.ServiceDescription; -import org.apache.wsil.extension.uddi.UDDIConstants; -import org.apache.wsil.extension.wsdl.WSDLConstants; -import org.eclipse.core.resources.IFile; -import org.eclipse.core.resources.IResource; -import org.eclipse.core.resources.ResourcesPlugin; -import org.eclipse.core.runtime.CoreException; -import org.eclipse.wst.ws.internal.parser.disco.DISCOContractReference; -import org.eclipse.wst.ws.internal.parser.disco.DISCOParser; -import org.eclipse.wst.ws.internal.parser.disco.DISCOReference; -import org.eclipse.wst.wsdl.WSDLPlugin; -import org.xml.sax.InputSource; -import org.xml.sax.SAXException; -import sun.misc.BASE64Encoder; - -public class WebServicesParser -{ - public static final int PARSE_NONE = 0; - public static final int PARSE_WSIL = 1<<0; - public static final int PARSE_WSDL = 1<<1; - public static final int PARSE_LINKS = 1<<2; - public static final int PARSE_DISCO = 1<<3; - - private String uri_; - private Hashtable uriToEntityTable_; - - private String httpBasicAuthUsername_; - private String httpBasicAuthPassword_; - - public WebServicesParser() - { - this(null); - } - - public WebServicesParser(String uri) - { - uri_ = uri; - uriToEntityTable_ = new Hashtable(); - httpBasicAuthUsername_ = null; - httpBasicAuthPassword_ = null; - } - - public String getURI() - { - return uri_; - } - - public void setURI(String uri) - { - uri_ = uri; - } - - public WebServiceEntity getWebServiceEntityByURI(String uri) - { - if (uri != null) - return (WebServiceEntity)uriToEntityTable_.get(uri); - else - return null; - } - - /** - * - * @param wsilURI - * @return - * @deprecated replaced with getWSILDocumentVerbose(String, String) - */ - public WSILDocument getWSILDocument(String wsilURI ) - { - try - { - return getWSILDocumentVerbose(wsilURI, "UTF-8" ); - } - catch (Throwable t) - { - } - return null; - } - - /** - * - * @param wsilURI - * @return - * @throws MalformedURLException - * @throws IOException - * @throws WWWAuthenticationException - * @throws WSILException - * @deprecated replaced with getWSILDocumentVerbose(String, String) - */ - public WSILDocument getWSILDocumentVerbose(String wsilURI ) throws MalformedURLException, IOException, WWWAuthenticationException, WSILException - { - return getWSILDocumentVerbose( wsilURI, "UTF-8" ); - } - - public WSILDocument getWSILDocumentVerbose(String wsilURI, String byteEncoding ) throws MalformedURLException, IOException, WWWAuthenticationException, WSILException - { - WebServiceEntity wsEntity = getWebServiceEntityByURI(wsilURI); - - if (wsEntity == null) - { - wsEntity = new WebServiceEntity(); - wsEntity.setURI(wsilURI); - uriToEntityTable_.put(wsilURI, wsEntity); - } - - WSILDocument wsilDocument = (WSILDocument)wsEntity.getModel(); - - if (wsilDocument == null) - { - // For some reason WSDL4J is not reading the content type properly for platform resources. Therefore, we will get - // the stream directly from Eclipse if we find a platform protocol specified in the URL. - if( wsilURI.startsWith( "platform:/resource" ) ) - { - String path = wsilURI.substring(18); - IResource resource = ResourcesPlugin.getWorkspace().getRoot().findMember( path ); - - if( resource instanceof IFile ) - { - try - { - IFile file = (IFile)resource; - InputStream stream = file.getContents(); - InputStreamReader reader = new InputStreamReader( stream, file.getCharset() ); - - wsilDocument = WSILDocument.newInstance(); - wsilDocument.read( reader ); - } - catch( CoreException exc ){} - } - } - else - { - // TODO the following 3 lines of code should probably be removed, since - // the WSDL4J parser does not need a byte stream. - byte[] b = getInputStreamAsByteArray(wsilURI); - wsEntity.setBytes(b); - setHTTPSettings(wsEntity); - - // This parser only checks the header of HTML for a particular encoding. - // It doesn't check the encoding for general XML documents like WSDL and WSIL. - // This causing this parser to alway use UTF-8 as the encoding. Therefore, - // since we can not trust the encoding specified we will not use it. Instead, - // we will just let the WSIL parser figure out what encoding to use. - - //InputStreamReader isr = new InputStreamReader(new ByteArrayInputStream(b), byteEncoding ); - wsilDocument = WSILDocument.newInstance(); - wsilDocument.read(wsilURI); - } - - wsEntity.setType(WebServiceEntity.TYPE_WSIL); - wsEntity.setModel(wsilDocument); - } - return wsilDocument; - } - - public Definition getWSDLDefinition(String wsdlURI) - { - try - { - return getWSDLDefinitionVerbose(wsdlURI); - } - catch (Throwable t) - { - } - return null; - } - - public Definition getWSDLDefinitionVerbose(String wsdlURI) throws MalformedURLException, IOException, WWWAuthenticationException, WSDLException - { - WebServiceEntity wsEntity = getWebServiceEntityByURI(wsdlURI); - if (wsEntity == null) - { - wsEntity = new WebServiceEntity(); - wsEntity.setURI(wsdlURI); - uriToEntityTable_.put(wsdlURI, wsEntity); - } - Definition definition = (Definition)wsEntity.getModel(); - if (definition == null) - { - byte[] b = getInputStreamAsByteArray(wsdlURI); - wsEntity.setBytes(b); - setHTTPSettings(wsEntity); - ByteArrayInputStream bais = new ByteArrayInputStream(b); - WSDLFactory factory = WSDLPlugin.INSTANCE.createWSDL4JFactory(); - WSDLReader wsdlReader = factory.newWSDLReader(); - definition = wsdlReader.readWSDL(wsdlURI, new InputSource(bais)); - wsEntity.setType(WebServiceEntity.TYPE_WSDL); - wsEntity.setModel(definition); - } - return definition; - } - - public void parse() throws MalformedURLException, IOException, ParserConfigurationException, SAXException, WWWAuthenticationException - { - parseURL(PARSE_WSIL | PARSE_WSDL | PARSE_LINKS | PARSE_DISCO); - } - - public void parse(int parseOption) throws MalformedURLException, IOException, ParserConfigurationException, SAXException, WWWAuthenticationException - { - parseURL(parseOption); - } - - private void parseURL(int parseOption) throws MalformedURLException, IOException, ParserConfigurationException, SAXException, WWWAuthenticationException - { - WebServiceEntity wsEntity = new WebServiceEntity(); - - // This variable makes this object a little more thread safe than it was - // before, although this object is not completely thread safe. The scenario - // that we are trying to avoid is where one call to this method gets blocked - // at the getInputStreamAsByteArray call. Then a second call to the method - // is made that changes the uri_ global variable. When the first call - // completes it would use uri_ value from the second invocation instead - // of the value from the first. Storing the uri_ into this variable helps - // avoid this bad scenario. - String theUri = uri_; - - wsEntity.setURI(theUri); - byte[] b = getInputStreamAsByteArray(theUri); - wsEntity.setBytes(b); - setHTTPSettings(wsEntity); - uriToEntityTable_.put(theUri, wsEntity); - // parse uri_ as a HTML document - HTMLHeadHandler headHandler = new HTMLHeadHandler(theUri); - byte[] head = headHandler.harvestHeadTags(b); - String byteEncoding = headHandler.getByteEncoding(); - SAXParserFactory factory = SAXParserFactory.newInstance(); - factory.setNamespaceAware(false); - factory.setValidating(false); - SAXParser parser = factory.newSAXParser(); - try - { - ByteArrayInputStream bais = new ByteArrayInputStream(head); - InputStreamReader isr = new InputStreamReader(bais, byteEncoding); - InputSource is = new InputSource(isr); - parser.parse(is, headHandler); - } - catch (Throwable t) - { - } - String[] wsilURIs = headHandler.getWsils(); - String[] discoURIs = headHandler.getDiscos(); - // true if uri_ is a HTML document - if (wsilURIs.length > 0 || discoURIs.length > 0) - { - wsEntity.setType(WebServiceEntity.TYPE_HTML); - for (int i = 0; i < wsilURIs.length; i++) - { - String absoluteURI = convertToAbsoluteURI(theUri, wsilURIs[i]); - WebServiceEntity wsilEntity = new WebServiceEntity(); - wsilEntity.setType(WebServiceEntity.TYPE_WSIL); - wsilEntity.setURI(absoluteURI); - associate(wsEntity, wsilEntity); - uriToEntityTable_.put(absoluteURI, wsilEntity); - if ((parseOption | PARSE_WSIL) == parseOption) - { - try - { - parseWSIL(absoluteURI, parseOption, byteEncoding ); - } - catch (Throwable t) - { - } - } - } - for (int i=0;i<discoURIs.length;i++) - { - WebServiceEntity discoEntity = new WebServiceEntity(); - discoEntity.setType(WebServiceEntity.TYPE_DISCO); - discoEntity.setURI(discoURIs[i]); - associate(wsEntity,discoEntity); - uriToEntityTable_.put(discoURIs[i],discoEntity); - if ((parseOption | PARSE_DISCO) == parseOption) - { - try - { - parseDISCO(discoURIs[i],parseOption); - } - catch (Throwable t) - { - } - } - } - } - // false if uri_ is not a HTML document - // then parse uri_ as a WSIL document - else - { - try - { - parseWSIL(theUri, parseOption, byteEncoding ); - // no exception thrown if uri_ is a WSIL document - wsEntity.setType(WebServiceEntity.TYPE_WSIL); - } - catch (Throwable t) - { - // exception thrown if uri_ is not a WSIL document - // then parse uri_ as a DISCO document. - try - { - parseDISCO(theUri, parseOption); - // no exception thrown if uri_ is a DISCO document - wsEntity.setType(WebServiceEntity.TYPE_DISCO); - } - catch (Throwable t2) - { - // exception thrown if uri_ is not a DISCO document - // then parse uri_ as a WSDL document - try - { - parseWSDL(theUri); - // no exception thrown if uri_ is a WSDL document - wsEntity.setType(WebServiceEntity.TYPE_WSDL); - } - catch (Throwable t3) - { - // exception thrown if uri_ is not a WSDL document - // then do nothing - } - } - } - } - } - - private void parseWSIL(String wsilURI, int parseOption, String byteEncoding ) throws WSILException, MalformedURLException, IOException, WSDLException, WWWAuthenticationException - { - WebServiceEntity wsilEntity = getWebServiceEntityByURI(wsilURI); - WSILDocument wsilDoc = (WSILDocument)wsilEntity.getModel(); - if (wsilDoc != null) - { - // Prevent infinite loops from occurring when a WSIL cycles occur. - return; - } - wsilDoc = getWSILDocumentVerbose(wsilURI, byteEncoding ); - Inspection inspection = wsilDoc.getInspection(); - Service[] services = inspection.getServices(); - for (int i = 0; i < services.length; i++) - { - Description[] descs = services[i].getDescriptions(); - // Set the documentation to the <service> element's first abstract. - String documentation = null; - Abstract[] abstracts = services[i].getAbstracts(); - if (abstracts != null && abstracts.length > 0) - documentation = abstracts[0].getText(); - for (int j = 0; j < descs.length; j++) - { - String referencedNS = descs[j].getReferencedNamespace(); - // If a <description> element contains an abstract, use it to override the service documentation. - abstracts = descs[j].getAbstracts(); - if (abstracts != null && abstracts.length > 0) - documentation = abstracts[0].getText(); - if (WSDLConstants.NS_URI_WSDL.equals(referencedNS)) - { - String location = descs[j].getLocation(); - if (location != null && location.length() > 0) - { - String absoluteURI = convertToAbsoluteURI(wsilURI, location); - WebServiceEntity wsdlEntity = new WebServiceEntity(); - wsdlEntity.setType(WebServiceEntity.TYPE_WSDL); - wsdlEntity.setURI(absoluteURI); - wsdlEntity.setDocumentation(documentation); - associate(wsilEntity, wsdlEntity); - uriToEntityTable_.put(absoluteURI, wsdlEntity); - if ((parseOption | PARSE_WSDL) == parseOption) - parseWSDL(absoluteURI); - } - } - else if (UDDIConstants.NS_URI_UDDI_V2.equals(referencedNS)) - { - ExtensionElement ee = descs[j].getExtensionElement(); - if (ee instanceof ServiceDescription) - { - ServiceDescription sd = (ServiceDescription)ee; - String inquiryURL = sd.getLocation(); - String serviceKey = sd.getServiceKey().getText(); - WebServiceEntity uddiServiceEntity = new WebServiceEntity(); - uddiServiceEntity.setType(WebServiceEntity.TYPE_UDDI_SERVICE); - String uddiServiceKeyURI = UDDIURIHelper.getServiceKeyURI(serviceKey,inquiryURL); - uddiServiceEntity.setURI(uddiServiceKeyURI); - uddiServiceEntity.setDocumentation(documentation); - associate(wsilEntity,uddiServiceEntity); - uriToEntityTable_.put(uddiServiceKeyURI,uddiServiceEntity); - // TODO: parse WSDL if necessary... - } - } - } - } - Link[] links = inspection.getLinks(); - for (int i = 0; i < links.length; i++) - { - if (WSILConstants.NS_URI_WSIL.equals(links[i].getReferencedNamespace())) - { - String documentation = null; - Abstract[] abstracts = links[i].getAbstracts(); - if (abstracts != null && abstracts.length > 0) - documentation = abstracts[0].getText(); - String linkLocation = links[i].getLocation(); - String absoluteURI = convertToAbsoluteURI(wsilURI, linkLocation); - // Prevent cycles. - WebServiceEntity wsilLinkEntity = getWebServiceEntityByURI(absoluteURI); - if (wsilLinkEntity == null) - { - wsilLinkEntity = new WebServiceEntity(); - wsilLinkEntity.setType(WebServiceEntity.TYPE_WSIL); - wsilLinkEntity.setURI(absoluteURI); - wsilLinkEntity.setDocumentation(documentation); - uriToEntityTable_.put(absoluteURI, wsilLinkEntity); - if ((parseOption | PARSE_LINKS) == parseOption) - parseWSIL(absoluteURI, parseOption, byteEncoding ); - } - associate(wsilEntity,wsilLinkEntity); - } - } - } - - private void parseDISCO(String discoURI, int parseOption) throws MalformedURLException, WWWAuthenticationException, Exception - { - WebServiceEntity discoEntity = getWebServiceEntityByURI(discoURI); - byte[] b = getInputStreamAsByteArray(discoURI); - discoEntity.setBytes(b); - setHTTPSettings(discoEntity); - ByteArrayInputStream bais = new ByteArrayInputStream(b); - DISCOParser parser = new DISCOParser(); - DISCOReference[] references = parser.parse(discoURI,new InputSource(bais)); - if (references != null && references.length > 0) - { - for (int i=0;i<references.length;i++) - { - if (references[i] instanceof DISCOContractReference) - { - // contractRef - DISCOContractReference reference = (DISCOContractReference)references[i]; - String ref = reference.getRef(); - String docRef = reference.getDocRef(); - WebServiceEntity wsdlEntity = new WebServiceEntity(); - wsdlEntity.setType(WebServiceEntity.TYPE_WSDL); - wsdlEntity.setURI(ref); - wsdlEntity.setDocumentation(docRef); - associate(discoEntity,wsdlEntity); - uriToEntityTable_.put(ref,wsdlEntity); - if ((parseOption | PARSE_WSDL) == parseOption) - parseWSDL(ref); - } - else - { - // discoveryRef - String ref = references[i].getRef(); - // Prevent cycles. - WebServiceEntity discoLinkEntity = getWebServiceEntityByURI(ref); - if (discoLinkEntity == null) - { - discoLinkEntity = new WebServiceEntity(); - discoLinkEntity.setType(WebServiceEntity.TYPE_DISCO); - discoLinkEntity.setURI(ref); - uriToEntityTable_.put(ref,discoLinkEntity); - if ((parseOption | PARSE_LINKS) == parseOption) - parseDISCO(ref,parseOption); - } - associate(discoEntity,discoLinkEntity); - } - } - } - } - - private Definition parseWSDL(String wsdlURI) throws WSDLException, MalformedURLException, IOException, WWWAuthenticationException - { - return getWSDLDefinitionVerbose(wsdlURI); - } - - private byte[] getInputStreamAsByteArray(String uriString) throws MalformedURLException, IOException, WWWAuthenticationException - { - // Try to get a cached copy of the byte[] - WebServiceEntity wsEntity = getWebServiceEntityByURI(uriString); - if (wsEntity != null) - { - byte[] bytes = wsEntity.getBytes(); - if (bytes != null) - return bytes; - } - // Get the byte[] by opening a stream to the URI - URL url = createURL(uriString); - URLConnection conn = url.openConnection(); - // proxy server setting - String proxyUserName = System.getProperty("http.proxyUserName"); - String proxyPassword = System.getProperty("http.proxyPassword"); - if (proxyUserName != null && proxyPassword != null) - { - StringBuffer userNamePassword = new StringBuffer(proxyUserName); - userNamePassword.append(':').append(proxyPassword); - BASE64Encoder encoder = new BASE64Encoder(); - String encoding = encoder.encode(userNamePassword.toString().getBytes()); - userNamePassword.setLength(0); - userNamePassword.append("Basic ").append(encoding); - conn.setRequestProperty("Proxy-authorization", userNamePassword.toString()); - } - // HTTP basic authentication setting - if (httpBasicAuthUsername_ != null && httpBasicAuthPassword_ != null) - { - StringBuffer sb = new StringBuffer(httpBasicAuthUsername_); - sb.append(':').append(httpBasicAuthPassword_); - BASE64Encoder encoder = new BASE64Encoder(); - String encoding = encoder.encode(sb.toString().getBytes()); - sb.setLength(0); - sb.append("Basic ").append(encoding); - conn.setRequestProperty("Authorization", sb.toString()); - } - InputStream is = null; - try - { - is = conn.getInputStream(); - String wwwAuthMsg = conn.getHeaderField("WWW-Authenticate"); - if (wwwAuthMsg != null) - throw new WWWAuthenticationException(new IOException(), wwwAuthMsg, uriString); - } - catch (IOException ioe) - { - String wwwAuthMsg = conn.getHeaderField("WWW-Authenticate"); - if (wwwAuthMsg != null) - throw new WWWAuthenticationException(ioe, wwwAuthMsg, uriString); - else - throw ioe; - } - ByteArrayOutputStream baos = new ByteArrayOutputStream(); - byte[] b = new byte[1024]; - int byteRead = is.read(b); - while (byteRead != -1) - { - baos.write(b, 0, byteRead); - byteRead = is.read(b); - } - is.close(); - return baos.toByteArray(); - } - - protected URL createURL(String url) throws MalformedURLException - { - return new URL(url); - } - - private void associate(WebServiceEntity parent, WebServiceEntity child) - { - parent.addChild(child); - child.setParent(parent); - } - - private String convertToAbsoluteURI(String baseURI,String refURI) - { - if (refURI != null && refURI.indexOf(":") < 0) - { - StringBuffer absoluteURI = new StringBuffer(baseURI.substring(0,Math.max(baseURI.lastIndexOf('\\'),baseURI.lastIndexOf('/')+1))); - absoluteURI.append(refURI); - return absoluteURI.toString(); - } - return refURI; - } - - private void setHTTPSettings(WebServiceEntity entity) - { - if (httpBasicAuthUsername_ != null && httpBasicAuthPassword_ != null) - { - entity.setHTTPUsername(httpBasicAuthUsername_); - entity.setHTTPPassword(httpBasicAuthPassword_); - } - } - - public String getHTTPBasicAuthUsername() - { - return httpBasicAuthUsername_; - } - - public void setHTTPBasicAuthUsername(String username) - { - httpBasicAuthUsername_ = username; - } - - public String getHTTPBasicAuthPassword() - { - return httpBasicAuthPassword_; - } - - public void setHTTPBasicAuthPassword(String password) - { - httpBasicAuthPassword_ = password; - } -} diff --git a/bundles/org.eclipse.wst.ws.parser/src/org/eclipse/wst/ws/internal/parser/wsil/wsil.properties b/bundles/org.eclipse.wst.ws.parser/src/org/eclipse/wst/ws/internal/parser/wsil/wsil.properties deleted file mode 100644 index 1e60c01ba..000000000 --- a/bundles/org.eclipse.wst.ws.parser/src/org/eclipse/wst/ws/internal/parser/wsil/wsil.properties +++ /dev/null @@ -1,22 +0,0 @@ -############################################################################### -# Copyright (c) 2001,2004 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 -############################################################################### - -# -# Messages for AddWSDLToWSILCommand -# -MSG_ERROR_INVALID_ARGUMENTS=IWAB0055E Invalid command arguments. -MSG_ERROR_ILLEGAL_ARGUMENTS=IWAB0105E Illegal argument. -MSG_ERROR_INVALID_WSDL_URI=IWAB0185E Invalid WSDL URI. -MSG_ERROR_INVALID_WSIL_URI=IWAB0206E Invalid WSIL URI. -MSG_ERROR_UNRESOLVABLE_WSDL=IWAB0405E WSDL is unresolvable. -MSG_ERROR_UNEXPECTED_EXCEPTION=IWAB0451E An unexpected exception has occured. -MSG_ERROR_MALFORMED_WSDL=IWAB0452E WSDL is malformed, error parsing WSDL. -MSG_ERROR_WRITE_WSIL=IWAB0453E Error writing WSIL. diff --git a/bundles/org.eclipse.wst.ws.parser/src/org/eclipse/wst/ws/parser/PluginMessages.java b/bundles/org.eclipse.wst.ws.parser/src/org/eclipse/wst/ws/parser/PluginMessages.java deleted file mode 100644 index 939b0d5a6..000000000 --- a/bundles/org.eclipse.wst.ws.parser/src/org/eclipse/wst/ws/parser/PluginMessages.java +++ /dev/null @@ -1,18 +0,0 @@ -package org.eclipse.wst.ws.parser; - -import org.eclipse.osgi.util.NLS; - -public class PluginMessages extends NLS -{ - private static final String BUNDLE_NAME = "org.eclipse.wst.ws.parser.plugin"; //$NON-NLS-1$ - - static - { - NLS.initializeMessages(BUNDLE_NAME, PluginMessages.class); - } - - public static String PUBLICUDDIREGISTRYTYPE_NAME_SAP; - public static String PUBLICUDDIREGISTRYTYPE_NAME_SAP_TEST; - public static String PUBLICUDDIREGISTRYTYPE_NAME_XMETHODS; - public static String PUBLICUDDIREGISTRYTYPE_NAME_NTTCOMM; -}
\ No newline at end of file diff --git a/bundles/org.eclipse.wst.ws.parser/src/org/eclipse/wst/ws/parser/plugin.properties b/bundles/org.eclipse.wst.ws.parser/src/org/eclipse/wst/ws/parser/plugin.properties deleted file mode 100644 index 0080e4720..000000000 --- a/bundles/org.eclipse.wst.ws.parser/src/org/eclipse/wst/ws/parser/plugin.properties +++ /dev/null @@ -1,18 +0,0 @@ -############################################################################### -# Copyright (c) 2004,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 -############################################################################### - -# -# PublicUDDIRegistryType -# -PUBLICUDDIREGISTRYTYPE_NAME_SAP=SAP UDDI Registry -PUBLICUDDIREGISTRYTYPE_NAME_SAP_TEST=SAP UDDI Test Registry -PUBLICUDDIREGISTRYTYPE_NAME_XMETHODS=XMethods Registry -PUBLICUDDIREGISTRYTYPE_NAME_NTTCOMM=NTT Communications Registry
\ No newline at end of file |