KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > netbeans > modules > websvc > spi > jaxws > client > JAXWSClientSupportImpl


1 /*
2  * The contents of this file are subject to the terms of the Common Development
3  * and Distribution License (the License). You may not use this file except in
4  * compliance with the License.
5  *
6  * You can obtain a copy of the License at http://www.netbeans.org/cddl.html
7  * or http://www.netbeans.org/cddl.txt.
8  *
9  * When distributing Covered Code, include this CDDL Header Notice in each file
10  * and include the License file at http://www.netbeans.org/cddl.txt.
11  * If applicable, add the following below the CDDL Header, with the fields
12  * enclosed by brackets [] replaced by your own identifying information:
13  * "Portions Copyrighted [year] [name of copyright owner]"
14  *
15  * The Original Software is NetBeans. The Initial Developer of the Original
16  * Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
17  * Microsystems, Inc. All Rights Reserved.
18  */

19
20 package org.netbeans.modules.websvc.spi.jaxws.client;
21
22 import java.io.IOException JavaDoc;
23 import java.net.URL JavaDoc;
24 import java.util.List JavaDoc;
25
26 import org.openide.filesystems.FileObject;
27 import org.openide.nodes.Node;
28
29 /**
30  *
31  * @author Peter Williams, Milan Kuchtiak
32  */

33
34 /** SPI for JAXWSClientSupport
35  */

36 public interface JAXWSClientSupportImpl {
37     
38     public static final String JavaDoc XML_RESOURCES_FOLDER="xml-resources"; //NOI18N
39
public static final String JavaDoc CLIENTS_LOCAL_FOLDER="web-service-references"; //NOI18N
40
public static final String JavaDoc CATALOG_FILE="catalog.xml"; //NOI18N
41

42     
43     /** Add JAX-WS Client to project.
44      * <ul>
45      * <li> add client element to jax-ws.xml (Netbeans specific configuration file)
46      * <li> download the wsdl file(s) and all related XML artifacts to the project
47      * <li> generate JAX-WS artifacts for web service specified by wsdlUrl.
48      * <li> this can be achieved by creating specific target in build-impl.xml, that calls wsimport task.
49      * </ul>
50      * @param clientName proposed name for the client (the web service reference node display name)
51      * @param wsdlURL URL for web service WSDL file
52      * @param isJsr109 flag indicating the need to add JAX-WS libraries to project:
53      * if (isJsr109==false) JAX-WS libraries should be added to the project classpath
54      * @return unique name for WS Client in the project(can be different than requested clientName)
55      */

56     public String JavaDoc addServiceClient(String JavaDoc clientName, String JavaDoc wsdlUrl, String JavaDoc packageName, boolean isJsr109);
57     
58     /** Get WSDL folder for the project (folder containing wsdl files)
59      * The folder is used to save remote or local wsdl files to be available within the jar/war files.
60      * it is usually META-INF/wsdl folder (or WEB-INF/wsdl for web application)
61      * @param createFolder if (createFolder==true) the folder will be created (if not created before)
62      * @return the file object (folder) where wsdl files are located in project
63      */

64     public FileObject getWsdlFolder(boolean createFolder) throws IOException JavaDoc;
65     
66     /** Get folder for local WSDL and XML artifacts for given client
67      * This is the location where wsdl/xml files are downloaded to the project.
68      * JAX-WS java artifacts will be generated from these local files instead of remote.
69      * @param clientName client name (the web service reference node display name)
70      * @param createFolder if (createFolder==true) the folder will be created (if not created before)
71      * @return the file object (folder) where wsdl files are located in project
72      */

73     public FileObject getLocalWsdlFolderForClient(String JavaDoc clientName, boolean createFolder);
74     
75     /** Get folder for local jaxb binding (xml) files for given client
76      * This is the location where external jaxb binding files are downloaded to the project.
77      * JAX-WS java artifacts will be generated using these local binding files instead of remote.
78      * @param clientName client name (the web service reference node display name)
79      * @param createFolder if (createFolder==true) the folder will be created (if not created before)
80      * @return the file object (folder) where jaxb binding files are located in project
81      */

82     public FileObject getBindingsFolderForClient(String JavaDoc clientName, boolean createFolder);
83     
84     /** Remove JAX-WS Client from project.
85      * <ul>
86      * <li> remove client element from jax-ws.xml (Netbeans specific configuration file)
87      * <li> remove all WSDL/XML artifacts related to this client
88      * <li> remove all JAX-WS java artifacts generated for this client
89      * </ul>
90      * @param clientName client name (the web service reference node display name)
91      */

92     public void removeServiceClient(String JavaDoc serviceName);
93     
94     /** Get list of all JAX-WS Clients in project
95      * @param clientName client name (the web service reference node display name)
96      */

97     public List JavaDoc getServiceClients();
98     
99     /** gets the URL of catalog.xml file
100      * (the catalog is used by wsimport to locate local wsdl/xml resources)
101      * @return URL url of the car
102      */

103     public URL JavaDoc getCatalog();
104     
105     /** intended to be used to obtain service-ref name for given web service reference
106      * (currently not used in projects)
107      */

108     public String JavaDoc getServiceRefName(Node clientNode);
109
110 }
111
Popular Tags