author | mkos |
Sun, 30 Dec 2012 00:00:00 +0100 | |
changeset 22678 | ac1ea46be942 |
parent 12009 | 4abb694f273a |
child 25429 | 1c4e76ec718a |
permissions | -rw-r--r-- |
12009 | 1 |
/* |
22678
ac1ea46be942
8029237: Update copyright year to match last edit in jaxws repository for 2012
mkos
parents:
12009
diff
changeset
|
2 |
* Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved. |
12009 | 3 |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 |
* |
|
5 |
* This code is free software; you can redistribute it and/or modify it |
|
6 |
* under the terms of the GNU General Public License version 2 only, as |
|
7 |
* published by the Free Software Foundation. Oracle designates this |
|
8 |
* particular file as subject to the "Classpath" exception as provided |
|
9 |
* by Oracle in the LICENSE file that accompanied this code. |
|
10 |
* |
|
11 |
* This code is distributed in the hope that it will be useful, but WITHOUT |
|
12 |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
|
13 |
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
|
14 |
* version 2 for more details (a copy is included in the LICENSE file that |
|
15 |
* accompanied this code). |
|
16 |
* |
|
17 |
* You should have received a copy of the GNU General Public License version |
|
18 |
* 2 along with this work; if not, write to the Free Software Foundation, |
|
19 |
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
|
20 |
* |
|
21 |
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
|
22 |
* or visit www.oracle.com if you need additional information or have any |
|
23 |
* questions. |
|
24 |
*/ |
|
25 |
||
26 |
package javax.xml.ws.spi; |
|
27 |
||
28 |
import java.net.URL; |
|
29 |
import java.util.List; |
|
30 |
import java.util.Iterator; |
|
31 |
import java.util.Map; |
|
32 |
import java.lang.reflect.Method; |
|
33 |
import javax.xml.namespace.QName; |
|
34 |
import javax.xml.ws.*; |
|
35 |
import javax.xml.ws.wsaddressing.W3CEndpointReference; |
|
36 |
||
37 |
import org.w3c.dom.Element; |
|
38 |
||
39 |
/** |
|
40 |
* Service provider for <code>ServiceDelegate</code> and |
|
41 |
* <code>Endpoint</code> objects. |
|
42 |
* <p> |
|
43 |
* |
|
44 |
* @since JAX-WS 2.0 |
|
45 |
*/ |
|
46 |
public abstract class Provider { |
|
47 |
||
48 |
/** |
|
49 |
* A constant representing the property used to lookup the |
|
50 |
* name of a <code>Provider</code> implementation |
|
51 |
* class. |
|
52 |
*/ |
|
53 |
static public final String JAXWSPROVIDER_PROPERTY |
|
54 |
= "javax.xml.ws.spi.Provider"; |
|
55 |
||
56 |
/** |
|
57 |
* A constant representing the name of the default |
|
58 |
* <code>Provider</code> implementation class. |
|
59 |
**/ |
|
60 |
// Using two strings so that package renaming doesn't change it |
|
61 |
static final String DEFAULT_JAXWSPROVIDER |
|
62 |
= "com.sun"+".xml.internal.ws.spi.ProviderImpl"; |
|
63 |
||
64 |
/** |
|
65 |
* Take advantage of Java SE 6's java.util.ServiceLoader API. |
|
66 |
* Using reflection so that there is no compile-time dependency on SE 6. |
|
67 |
*/ |
|
68 |
static private final Method loadMethod; |
|
69 |
static private final Method iteratorMethod; |
|
70 |
static { |
|
71 |
Method tLoadMethod = null; |
|
72 |
Method tIteratorMethod = null; |
|
73 |
try { |
|
74 |
Class<?> clazz = Class.forName("java.util.ServiceLoader"); |
|
75 |
tLoadMethod = clazz.getMethod("load", Class.class); |
|
76 |
tIteratorMethod = clazz.getMethod("iterator"); |
|
77 |
} catch(ClassNotFoundException ce) { |
|
78 |
// Running on Java SE 5 |
|
79 |
} catch(NoSuchMethodException ne) { |
|
80 |
// Shouldn't happen |
|
81 |
} |
|
82 |
loadMethod = tLoadMethod; |
|
83 |
iteratorMethod = tIteratorMethod; |
|
84 |
} |
|
85 |
||
86 |
||
87 |
/** |
|
88 |
* Creates a new instance of Provider |
|
89 |
*/ |
|
90 |
protected Provider() { |
|
91 |
} |
|
92 |
||
93 |
/** |
|
94 |
* |
|
95 |
* Creates a new provider object. |
|
96 |
* <p> |
|
97 |
* The algorithm used to locate the provider subclass to use consists |
|
98 |
* of the following steps: |
|
99 |
* <p> |
|
100 |
* <ul> |
|
101 |
* <li> |
|
102 |
* If a resource with the name of |
|
103 |
* <code>META-INF/services/javax.xml.ws.spi.Provider</code> |
|
104 |
* exists, then its first line, if present, is used as the UTF-8 encoded |
|
105 |
* name of the implementation class. |
|
106 |
* </li> |
|
107 |
* <li> |
|
108 |
* If the $java.home/lib/jaxws.properties file exists and it is readable by |
|
109 |
* the <code>java.util.Properties.load(InputStream)</code> method and it contains |
|
110 |
* an entry whose key is <code>javax.xml.ws.spi.Provider</code>, then the value of |
|
111 |
* that entry is used as the name of the implementation class. |
|
112 |
* </li> |
|
113 |
* <li> |
|
114 |
* If a system property with the name <code>javax.xml.ws.spi.Provider</code> |
|
115 |
* is defined, then its value is used as the name of the implementation class. |
|
116 |
* </li> |
|
117 |
* <li> |
|
118 |
* Finally, a default implementation class name is used. |
|
119 |
* </li> |
|
120 |
* </ul> |
|
121 |
* |
|
122 |
*/ |
|
123 |
public static Provider provider() { |
|
124 |
try { |
|
125 |
Object provider = getProviderUsingServiceLoader(); |
|
126 |
if (provider == null) { |
|
127 |
provider = FactoryFinder.find(JAXWSPROVIDER_PROPERTY, DEFAULT_JAXWSPROVIDER); |
|
128 |
} |
|
129 |
if (!(provider instanceof Provider)) { |
|
130 |
Class pClass = Provider.class; |
|
131 |
String classnameAsResource = pClass.getName().replace('.', '/') + ".class"; |
|
132 |
ClassLoader loader = pClass.getClassLoader(); |
|
133 |
if(loader == null) { |
|
134 |
loader = ClassLoader.getSystemClassLoader(); |
|
135 |
} |
|
136 |
URL targetTypeURL = loader.getResource(classnameAsResource); |
|
137 |
throw new LinkageError("ClassCastException: attempting to cast" + |
|
138 |
provider.getClass().getClassLoader().getResource(classnameAsResource) + |
|
139 |
"to" + targetTypeURL.toString() ); |
|
140 |
} |
|
141 |
return (Provider) provider; |
|
142 |
} catch (WebServiceException ex) { |
|
143 |
throw ex; |
|
144 |
} catch (Exception ex) { |
|
145 |
throw new WebServiceException("Unable to createEndpointReference Provider", ex); |
|
146 |
} |
|
147 |
} |
|
148 |
||
149 |
||
150 |
private static Provider getProviderUsingServiceLoader() { |
|
151 |
if (loadMethod != null) { |
|
152 |
Object loader; |
|
153 |
try { |
|
154 |
loader = loadMethod.invoke(null, Provider.class); |
|
155 |
} catch (Exception e) { |
|
156 |
throw new WebServiceException("Cannot invoke java.util.ServiceLoader#load()", e); |
|
157 |
} |
|
158 |
||
159 |
Iterator<Provider> it; |
|
160 |
try { |
|
161 |
it = (Iterator<Provider>)iteratorMethod.invoke(loader); |
|
162 |
} catch(Exception e) { |
|
163 |
throw new WebServiceException("Cannot invoke java.util.ServiceLoader#iterator()", e); |
|
164 |
} |
|
165 |
return it.hasNext() ? it.next() : null; |
|
166 |
} |
|
167 |
return null; |
|
168 |
} |
|
169 |
||
170 |
/** |
|
171 |
* Creates a service delegate object. |
|
172 |
* <p> |
|
173 |
* @param wsdlDocumentLocation A URL pointing to the WSDL document |
|
174 |
* for the service, or <code>null</code> if there isn't one. |
|
175 |
* @param serviceName The qualified name of the service. |
|
176 |
* @param serviceClass The service class, which MUST be either |
|
177 |
* <code>javax.xml.ws.Service</code> or a subclass thereof. |
|
178 |
* @return The newly created service delegate. |
|
179 |
*/ |
|
180 |
public abstract ServiceDelegate createServiceDelegate( |
|
181 |
java.net.URL wsdlDocumentLocation, |
|
182 |
QName serviceName, Class<? extends Service> serviceClass); |
|
183 |
||
184 |
/** |
|
185 |
* Creates a service delegate object. |
|
186 |
* <p> |
|
187 |
* @param wsdlDocumentLocation A URL pointing to the WSDL document |
|
188 |
* for the service, or <code>null</code> if there isn't one. |
|
189 |
* @param serviceName The qualified name of the service. |
|
190 |
* @param serviceClass The service class, which MUST be either |
|
191 |
* <code>javax.xml.ws.Service</code> or a subclass thereof. |
|
192 |
* @param features Web Service features that must be configured on |
|
193 |
* the service. If the provider doesn't understand a feature, |
|
194 |
* it must throw a WebServiceException. |
|
195 |
* @return The newly created service delegate. |
|
196 |
* |
|
197 |
* @since JAX-WS 2.2 |
|
198 |
*/ |
|
199 |
public ServiceDelegate createServiceDelegate( |
|
200 |
java.net.URL wsdlDocumentLocation, |
|
201 |
QName serviceName, Class<? extends Service> serviceClass, WebServiceFeature ... features) { |
|
202 |
throw new UnsupportedOperationException("JAX-WS 2.2 implementation must override this default behaviour."); |
|
203 |
} |
|
204 |
||
205 |
||
206 |
/** |
|
207 |
* |
|
208 |
* Creates an endpoint object with the provided binding and implementation |
|
209 |
* object. |
|
210 |
* |
|
211 |
* @param bindingId A URI specifying the desired binding (e.g. SOAP/HTTP) |
|
212 |
* @param implementor A service implementation object to which |
|
213 |
* incoming requests will be dispatched. The corresponding |
|
214 |
* class MUST be annotated with all the necessary Web service |
|
215 |
* annotations. |
|
216 |
* @return The newly created endpoint. |
|
217 |
*/ |
|
218 |
public abstract Endpoint createEndpoint(String bindingId, |
|
219 |
Object implementor); |
|
220 |
||
221 |
||
222 |
/** |
|
223 |
* Creates and publishes an endpoint object with the specified |
|
224 |
* address and implementation object. |
|
225 |
* |
|
226 |
* @param address A URI specifying the address and transport/protocol |
|
227 |
* to use. A http: URI MUST result in the SOAP 1.1/HTTP |
|
228 |
* binding being used. Implementations may support other |
|
229 |
* URI schemes. |
|
230 |
* @param implementor A service implementation object to which |
|
231 |
* incoming requests will be dispatched. The corresponding |
|
232 |
* class MUST be annotated with all the necessary Web service |
|
233 |
* annotations. |
|
234 |
* @return The newly created endpoint. |
|
235 |
*/ |
|
236 |
public abstract Endpoint createAndPublishEndpoint(String address, |
|
237 |
Object implementor); |
|
238 |
||
239 |
/** |
|
240 |
* read an EndpointReference from the infoset contained in |
|
241 |
* <code>eprInfoset</code>. |
|
242 |
* |
|
243 |
* @param eprInfoset infoset for EndpointReference |
|
244 |
* |
|
245 |
* @return the <code>EndpointReference</code> unmarshalled from |
|
246 |
* <code>eprInfoset</code>. This method never returns <code>null</code>. |
|
247 |
* |
|
248 |
* @throws WebServiceException If there is an error creating the |
|
249 |
* <code>EndpointReference</code> from the specified <code>eprInfoset</code>. |
|
250 |
* |
|
251 |
* @throws NullPointerException If the <code>null</code> |
|
252 |
* <code>eprInfoset</code> value is given. |
|
253 |
* |
|
254 |
* @since JAX-WS 2.1 |
|
255 |
**/ |
|
256 |
public abstract EndpointReference readEndpointReference(javax.xml.transform.Source eprInfoset); |
|
257 |
||
258 |
||
259 |
/** |
|
260 |
* The getPort method returns a proxy. If there |
|
261 |
* are any reference parameters in the |
|
262 |
* <code>endpointReference</code>, then those reference |
|
263 |
* parameters MUST appear as SOAP headers, indicating them to be |
|
264 |
* reference parameters, on all messages sent to the endpoint. |
|
265 |
* The parameter <code>serviceEndpointInterface</code> specifies |
|
266 |
* the service endpoint interface that is supported by the |
|
267 |
* returned proxy. |
|
268 |
* The parameter <code>endpointReference</code> specifies the |
|
269 |
* endpoint that will be invoked by the returned proxy. |
|
270 |
* In the implementation of this method, the JAX-WS |
|
271 |
* runtime system takes the responsibility of selecting a protocol |
|
272 |
* binding (and a port) and configuring the proxy accordingly from |
|
273 |
* the WSDL metadata of the |
|
274 |
* <code>serviceEndpointInterface</code> and the <code>EndpointReference</code>. |
|
275 |
* For this method |
|
276 |
* to successfully return a proxy, WSDL metadata MUST be available and the |
|
277 |
* <code>endpointReference</code> MUST contain an implementation understood |
|
278 |
* <code>serviceName</code> metadata. |
|
279 |
* |
|
280 |
* |
|
281 |
* @param endpointReference the EndpointReference that will |
|
282 |
* be invoked by the returned proxy. |
|
283 |
* @param serviceEndpointInterface Service endpoint interface |
|
284 |
* @param features A list of WebServiceFeatures to configure on the |
|
285 |
* proxy. Supported features not in the <code>features |
|
286 |
* </code> parameter will have their default values. |
|
287 |
* @return Object Proxy instance that supports the |
|
288 |
* specified service endpoint interface |
|
289 |
* @throws WebServiceException |
|
290 |
* <UL> |
|
291 |
* <LI>If there is an error during creation |
|
292 |
* of the proxy |
|
293 |
* <LI>If there is any missing WSDL metadata |
|
294 |
* as required by this method} |
|
295 |
* <LI>If this |
|
296 |
* <code>endpointReference</code> |
|
297 |
* is illegal |
|
298 |
* <LI>If an illegal |
|
299 |
* <code>serviceEndpointInterface</code> |
|
300 |
* is specified |
|
301 |
* <LI>If a feature is enabled that is not compatible with |
|
302 |
* this port or is unsupported. |
|
303 |
* </UL> |
|
304 |
* |
|
305 |
* @see WebServiceFeature |
|
306 |
* |
|
307 |
* @since JAX-WS 2.1 |
|
308 |
**/ |
|
309 |
public abstract <T> T getPort(EndpointReference endpointReference, |
|
310 |
Class<T> serviceEndpointInterface, |
|
311 |
WebServiceFeature... features); |
|
312 |
||
313 |
/** |
|
314 |
* Factory method to create a <code>W3CEndpointReference</code>. |
|
315 |
* |
|
316 |
* <p> |
|
317 |
* This method can be used to create a <code>W3CEndpointReference</code> |
|
318 |
* for any endpoint by specifying the <code>address</code> property along |
|
319 |
* with any other desired properties. This method |
|
320 |
* can also be used to create a <code>W3CEndpointReference</code> for |
|
321 |
* an endpoint that is published by the same Java EE application. |
|
322 |
* To do so the <code>address</code> property can be provided or this |
|
323 |
* method can automatically determine the <code>address</code> of |
|
324 |
* an endpoint that is published by the same Java EE application and is |
|
325 |
* identified by the <code>serviceName</code> and |
|
326 |
* <code>portName</code> propeties. If the <code>address</code> is |
|
327 |
* <code>null</code> and the <code>serviceName</code> and |
|
328 |
* <code>portName</code> do not identify an endpoint published by the |
|
329 |
* same Java EE application, a |
|
330 |
* <code>javax.lang.IllegalStateException</code> MUST be thrown. |
|
331 |
* |
|
332 |
* @param address Specifies the address of the target endpoint |
|
333 |
* @param serviceName Qualified name of the service in the WSDL. |
|
334 |
* @param portName Qualified name of the endpoint in the WSDL. |
|
335 |
* @param metadata A list of elements that should be added to the |
|
336 |
* <code>W3CEndpointReference</code> instances <code>wsa:metadata</code> |
|
337 |
* element. |
|
338 |
* @param wsdlDocumentLocation URL for the WSDL document location for |
|
339 |
* the service. |
|
340 |
* @param referenceParameters Reference parameters to be associated |
|
341 |
* with the returned <code>EndpointReference</code> instance. |
|
342 |
* |
|
343 |
* @return the <code>W3CEndpointReference</code> created from |
|
344 |
* <code>serviceName</code>, <code>portName</code>, |
|
345 |
* <code>metadata</code>, <code>wsdlDocumentLocation</code> |
|
346 |
* and <code>referenceParameters</code>. This method |
|
347 |
* never returns <code>null</code>. |
|
348 |
* |
|
349 |
* @throws java.lang.IllegalStateException |
|
350 |
* <ul> |
|
351 |
* <li>If the <code>address</code>, <code>serviceName</code> and |
|
352 |
* <code>portName</code> are all <code>null</code>. |
|
353 |
* <li>If the <code>serviceName</code> service is <code>null</code> and the |
|
354 |
* <code>portName</code> is NOT <code>null</code>. |
|
355 |
* <li>If the <code>address</code> property is <code>null</code> and |
|
356 |
* the <code>serviceName</code> and <code>portName</code> do not |
|
357 |
* specify a valid endpoint published by the same Java EE |
|
358 |
* application. |
|
359 |
* <li>If the <code>serviceName</code>is NOT <code>null</code> |
|
360 |
* and is not present in the specified WSDL. |
|
361 |
* <li>If the <code>portName</code> port is not <code>null</code> and it |
|
362 |
* is not present in <code>serviceName</code> service in the WSDL. |
|
363 |
* <li>If the <code>wsdlDocumentLocation</code> is NOT <code>null</code> |
|
364 |
* and does not represent a valid WSDL. |
|
365 |
* </ul> |
|
366 |
* @throws WebServiceException If an error occurs while creating the |
|
367 |
* <code>W3CEndpointReference</code>. |
|
368 |
* |
|
369 |
* @since JAX-WS 2.1 |
|
370 |
*/ |
|
371 |
public abstract W3CEndpointReference createW3CEndpointReference(String address, QName serviceName, QName portName, |
|
372 |
List<Element> metadata, String wsdlDocumentLocation, List<Element> referenceParameters); |
|
373 |
||
374 |
||
375 |
/** |
|
376 |
* Factory method to create a <code>W3CEndpointReference</code>. |
|
377 |
* Using this method, a <code>W3CEndpointReference</code> instance |
|
378 |
* can be created with extension elements, and attributes. |
|
379 |
* <code>Provider</code> implementations must override the default |
|
380 |
* implementation. |
|
381 |
* |
|
382 |
* <p> |
|
383 |
* This method can be used to create a <code>W3CEndpointReference</code> |
|
384 |
* for any endpoint by specifying the <code>address</code> property along |
|
385 |
* with any other desired properties. This method |
|
386 |
* can also be used to create a <code>W3CEndpointReference</code> for |
|
387 |
* an endpoint that is published by the same Java EE application. |
|
388 |
* To do so the <code>address</code> property can be provided or this |
|
389 |
* method can automatically determine the <code>address</code> of |
|
390 |
* an endpoint that is published by the same Java EE application and is |
|
391 |
* identified by the <code>serviceName</code> and |
|
392 |
* <code>portName</code> propeties. If the <code>address</code> is |
|
393 |
* <code>null</code> and the <code>serviceName</code> and |
|
394 |
* <code>portName</code> do not identify an endpoint published by the |
|
395 |
* same Java EE application, a |
|
396 |
* <code>javax.lang.IllegalStateException</code> MUST be thrown. |
|
397 |
* |
|
398 |
* @param address Specifies the address of the target endpoint |
|
399 |
* @param interfaceName the <code>wsam:InterfaceName</code> element in the |
|
400 |
* <code>wsa:Metadata</code> element. |
|
401 |
* @param serviceName Qualified name of the service in the WSDL. |
|
402 |
* @param portName Qualified name of the endpoint in the WSDL. |
|
403 |
* @param metadata A list of elements that should be added to the |
|
404 |
* <code>W3CEndpointReference</code> instances <code>wsa:metadata</code> |
|
405 |
* element. |
|
406 |
* @param wsdlDocumentLocation URL for the WSDL document location for |
|
407 |
* the service. |
|
408 |
* @param referenceParameters Reference parameters to be associated |
|
409 |
* with the returned <code>EndpointReference</code> instance. |
|
410 |
* @param elements extension elements to be associated |
|
411 |
* with the returned <code>EndpointReference</code> instance. |
|
412 |
* @param attributes extension attributes to be associated |
|
413 |
* with the returned <code>EndpointReference</code> instance. |
|
414 |
* |
|
415 |
* @return the <code>W3CEndpointReference</code> created from |
|
416 |
* <code>serviceName</code>, <code>portName</code>, |
|
417 |
* <code>metadata</code>, <code>wsdlDocumentLocation</code> |
|
418 |
* and <code>referenceParameters</code>. This method |
|
419 |
* never returns <code>null</code>. |
|
420 |
* |
|
421 |
* @throws java.lang.IllegalStateException |
|
422 |
* <ul> |
|
423 |
* <li>If the <code>address</code>, <code>serviceName</code> and |
|
424 |
* <code>portName</code> are all <code>null</code>. |
|
425 |
* <li>If the <code>serviceName</code> service is <code>null</code> and the |
|
426 |
* <code>portName</code> is NOT <code>null</code>. |
|
427 |
* <li>If the <code>address</code> property is <code>null</code> and |
|
428 |
* the <code>serviceName</code> and <code>portName</code> do not |
|
429 |
* specify a valid endpoint published by the same Java EE |
|
430 |
* application. |
|
431 |
* <li>If the <code>serviceName</code>is NOT <code>null</code> |
|
432 |
* and is not present in the specified WSDL. |
|
433 |
* <li>If the <code>portName</code> port is not <code>null</code> and it |
|
434 |
* is not present in <code>serviceName</code> service in the WSDL. |
|
435 |
* <li>If the <code>wsdlDocumentLocation</code> is NOT <code>null</code> |
|
436 |
* and does not represent a valid WSDL. |
|
437 |
* <li>If the <code>wsdlDocumentLocation</code> is NOT <code>null</code> but |
|
438 |
* wsdli:wsdlLocation's namespace name cannot be got from the available |
|
439 |
* metadata. |
|
440 |
* </ul> |
|
441 |
* @throws WebServiceException If an error occurs while creating the |
|
442 |
* <code>W3CEndpointReference</code>. |
|
443 |
* @since JAX-WS 2.2 |
|
444 |
*/ |
|
445 |
public W3CEndpointReference createW3CEndpointReference(String address, |
|
446 |
QName interfaceName, QName serviceName, QName portName, |
|
447 |
List<Element> metadata, String wsdlDocumentLocation, List<Element> referenceParameters, |
|
448 |
List<Element> elements, Map<QName, String> attributes) { |
|
449 |
throw new UnsupportedOperationException("JAX-WS 2.2 implementation must override this default behaviour."); |
|
450 |
} |
|
451 |
||
452 |
/** |
|
453 |
* Creates and publishes an endpoint object with the specified |
|
454 |
* address, implementation object and web service features. |
|
455 |
* <code>Provider</code> implementations must override the |
|
456 |
* default implementation. |
|
457 |
* |
|
458 |
* @param address A URI specifying the address and transport/protocol |
|
459 |
* to use. A http: URI MUST result in the SOAP 1.1/HTTP |
|
460 |
* binding being used. Implementations may support other |
|
461 |
* URI schemes. |
|
462 |
* @param implementor A service implementation object to which |
|
463 |
* incoming requests will be dispatched. The corresponding |
|
464 |
* class MUST be annotated with all the necessary Web service |
|
465 |
* annotations. |
|
466 |
* @param features A list of WebServiceFeatures to configure on the |
|
467 |
* endpoint. Supported features not in the <code>features |
|
468 |
* </code> parameter will have their default values. |
|
469 |
* @return The newly created endpoint. |
|
470 |
* @since JAX-WS 2.2 |
|
471 |
*/ |
|
472 |
public Endpoint createAndPublishEndpoint(String address, |
|
473 |
Object implementor, WebServiceFeature ... features) { |
|
474 |
throw new UnsupportedOperationException("JAX-WS 2.2 implementation must override this default behaviour."); |
|
475 |
} |
|
476 |
||
477 |
/** |
|
478 |
* Creates an endpoint object with the provided binding, implementation |
|
479 |
* object and web service features. <code>Provider</code> implementations |
|
480 |
* must override the default implementation. |
|
481 |
* |
|
482 |
* @param bindingId A URI specifying the desired binding (e.g. SOAP/HTTP) |
|
483 |
* @param implementor A service implementation object to which |
|
484 |
* incoming requests will be dispatched. The corresponding |
|
485 |
* class MUST be annotated with all the necessary Web service |
|
486 |
* annotations. |
|
487 |
* @param features A list of WebServiceFeatures to configure on the |
|
488 |
* endpoint. Supported features not in the <code>features |
|
489 |
* </code> parameter will have their default values. |
|
490 |
* @return The newly created endpoint. |
|
491 |
* @since JAX-WS 2.2 |
|
492 |
*/ |
|
493 |
public Endpoint createEndpoint(String bindingId, Object implementor, |
|
494 |
WebServiceFeature ... features) { |
|
495 |
throw new UnsupportedOperationException("JAX-WS 2.2 implementation must override this default behaviour."); |
|
496 |
} |
|
497 |
||
498 |
/** |
|
499 |
* Creates an endpoint object with the provided binding, implementation |
|
500 |
* class, invoker and web service features. Containers typically use |
|
501 |
* this to create Endpoint objects. <code>Provider</code> |
|
502 |
* implementations must override the default implementation. |
|
503 |
* |
|
504 |
* @param bindingId A URI specifying the desired binding (e.g. SOAP/HTTP). |
|
505 |
* Can be null. |
|
506 |
* @param implementorClass A service implementation class that |
|
507 |
* MUST be annotated with all the necessary Web service |
|
508 |
* annotations. |
|
509 |
* @param invoker that does the actual invocation on the service instance. |
|
510 |
* @param features A list of WebServiceFeatures to configure on the |
|
511 |
* endpoint. Supported features not in the <code>features |
|
512 |
* </code> parameter will have their default values. |
|
513 |
* @return The newly created endpoint. |
|
514 |
* @since JAX-WS 2.2 |
|
515 |
*/ |
|
516 |
public Endpoint createEndpoint(String bindingId, Class<?> implementorClass, |
|
517 |
Invoker invoker, WebServiceFeature ... features) { |
|
518 |
throw new UnsupportedOperationException("JAX-WS 2.2 implementation must override this default behaviour."); |
|
519 |
} |
|
520 |
||
521 |
} |