1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411
|
/*
* JBoss, Home of Professional Open Source
* Copyright 2005, JBoss Inc., and individual contributors as indicated
* by the @authors tag. See the copyright.txt in the distribution for a
* full listing of individual contributors.
*
* This is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation; either version 2.1 of
* the License, or (at your option) any later version.
*
* This software is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this software; if not, write to the Free
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
package javax.xml.ws.spi;
import javax.xml.namespace.QName;
import javax.xml.ws.WebServiceFeature;
import javax.xml.ws.Dispatch;
import javax.xml.ws.Service;
import javax.xml.ws.EndpointReference;
import javax.xml.bind.JAXBContext;
/**
* @author Heiko.Braun@jboss.com
* @version $Revision: 4632 $
*/
public abstract class ServiceDelegate21 extends ServiceDelegate
{
/**
* The getPort method returns a proxy. A service client
* uses this proxy to invoke operations on the target
* service endpoint. The <code>serviceEndpointInterface</code>
* specifies the service endpoint interface that is supported by
* the created dynamic proxy instance.
*
* @param portName Qualified name of the service endpoint in
* the WSDL service description
* @param serviceEndpointInterface Service endpoint interface
* supported by the dynamic proxy or instance
* @param features A list of WebServiceFeatures to configure on the
* proxy. Supported features not in the <code>features
* </code> parameter will have their default values.
* @return Object Proxy instance that
* supports the specified service endpoint
* interface
* @throws javax.xml.ws.WebServiceException This exception is thrown in the
* following cases:
* <UL>
* <LI>If there is an error in creation of
* the proxy
* <LI>If there is any missing WSDL metadata
* as required by this method
* <LI>If an illegal
* <code>serviceEndpointInterface</code>
* or <code>portName</code> is specified
* <LI>If a feature is enabled that is not compatible
* with this port or is unsupported.
* </UL>
* @see java.lang.reflect.Proxy
* @see java.lang.reflect.InvocationHandler
* @see javax.xml.ws.WebServiceFeature
*
* @since JAX-WS 2.1
**/
public abstract <T> T getPort(QName portName,
Class<T> serviceEndpointInterface, WebServiceFeature... features);
/**
* The getPort method returns a proxy.
* The parameter <code>endpointReference</code> specifies the
* endpoint that will be invoked by the returned proxy. If there
* are any reference parameters in the
* <code>endpointReference</code>, then those reference
* parameters MUST appear as SOAP headers, indicating them to be
* reference parameters, on all messages sent to the endpoint.
* The <code>endpointReference's</code> address MUST be used
* for invocations on the endpoint.
* The parameter <code>serviceEndpointInterface</code> specifies
* the service endpoint interface that is supported by the
* returned proxy.
* In the implementation of this method, the JAX-WS
* runtime system takes the responsibility of selecting a protocol
* binding (and a port) and configuring the proxy accordingly from
* the WSDL associated with this <code>Service</code> instance or
* from the WSDL Metadata from the <code>endpointReference</code>.
* If this <code>Service</code> instance has a WSDL and
* the <code>endpointReference</code>
* also has a WSDL, then the WSDL from this instance will be used.
* If this <code>Service</code> instance does not have a WSDL and
* the <code>endpointReference</code> does have a WSDL, then the
* WSDL from the <code>endpointReference</code> will be used.
* The returned proxy should not be reconfigured by the client.
* If this <code>Service</code> instance has a known proxy
* port that matches the information contained in
* the WSDL,
* then that proxy is returned, otherwise a WebServiceException
* is thrown.
* <p>
* Calling this method has the same behavior as the following
* <pre>
* port = service.getPort(portName, serviceEndpointInterface);
* </pre>
* where the <code>portName</code> is retrieved from the
* <code>wsaw:EndpontName</code> attribute of the
* <code>wsaw:ServiceName</code> element in the
* metadata of the <code>endpointReference</code> or from the
* <code>serviceEndpointInterface</code> and the WSDL
* associated with this <code>Service</code> instance.
* <br>
* See <a href="http://www.w3.org/TR/2006/CR-ws-addr-wsdl-20060529/">WS-Addressing - WSDL 1.0
* </a>.
*
* @param endpointReference The <code>EndpointReference</code>
* for the target service endpoint that will be invoked by the
* returned proxy.
* @param serviceEndpointInterface Service endpoint interface.
* @param features A list of WebServiceFeatures to configure on the
* proxy. Supported features not in the <code>features
* </code> parameter will have their default values.
* @return Object Proxy instance that supports the
* specified service endpoint interface.
* @throws javax.xml.ws.WebServiceException
* <UL>
* <LI>If there is an error during creation
* of the proxy.
* <LI>If there is any missing WSDL metadata
* as required by this method.
* <LI>If the <code>wsaw:EndpointName</code> is
* missing from the <code>endpointReference</code>
* or does not match a wsdl:Port
* in the WSDL metadata.
* <LI>If the <code>wsaw:ServiceName</code> in the
* <code>endpointReference</code> metadata does not
* match the <code>serviceName</code> of this
* <code>Service</code> instance.
* <LI>If an invalid
* <code>endpointReference</code>
* is specified.
* <LI>If an invalid
* <code>serviceEndpointInterface</code>
* is specified.
* <LI>If a feature is enabled that is not compatible
* with this port or is unsupported.
* </UL>
*
* @since JAX-WS 2.1
**/
public abstract <T> T getPort(EndpointReference endpointReference,
Class<T> serviceEndpointInterface, WebServiceFeature... features);
/**
* The getPort method returns a proxy. The parameter
* <code>serviceEndpointInterface</code> specifies the service
* endpoint interface that is supported by the returned proxy.
* In the implementation of this method, the JAX-WS
* runtime system takes the responsibility of selecting a protocol
* binding (and a port) and configuring the proxy accordingly.
* The returned proxy should not be reconfigured by the client.
*
* @param serviceEndpointInterface Service endpoint interface
* @param features An array of WebServiceFeatures to configure on the
* proxy. Supported features not in the <code>features
* </code> parameter will have their default values.
* @return Object instance that supports the
* specified service endpoint interface
* @throws javax.xml.ws.WebServiceException
* <UL>
* <LI>If there is an error during creation
* of the proxy
* <LI>If there is any missing WSDL metadata
* as required by this method
* <LI>If an illegal
* <code>serviceEndpointInterface</code>
* is specified
* <LI>If a feature is enabled that is not compatible
* with this port or is unsupported.
* </UL>
*
* @see WebServiceFeature
*
* @since JAX-WS 2.1
**/
public abstract <T> T getPort(Class<T> serviceEndpointInterface,
WebServiceFeature... features);
/**
* Creates a <code>Dispatch</code> instance for use with objects of
* the users choosing.
*
* @param portName Qualified name for the target service endpoint
* @param type The class of object used for messages or message
* payloads. Implementations are required to support
* javax.xml.transform.Source and javax.xml.soap.SOAPMessage.
* @param mode Controls whether the created dispatch instance is message
* or payload oriented, i.e. whether the user will work with complete
* protocol messages or message payloads. E.g. when using the SOAP
* protocol, this parameter controls whether the user will work with
* SOAP messages or the contents of a SOAP body. Mode MUST be MESSAGE
* when type is SOAPMessage.
* @param features A list of WebServiceFeatures to configure on the
* proxy. Supported features not in the <code>features
* </code> parameter will have their default values.
*
* @return Dispatch instance
* @throws javax.xml.ws.WebServiceException If any error in the creation of
* the <code>Dispatch</code> object or if a
* feature is enabled that is not compatible with
* this port or is unsupported.
*
* @see javax.xml.transform.Source
* @see javax.xml.soap.SOAPMessage
* @see WebServiceFeature
*
* @since JAX-WS 2.1
**/
public abstract <T> Dispatch<T> createDispatch(QName portName, Class<T> type,
Service.Mode mode, WebServiceFeature... features);
/**
* Creates a <code>Dispatch</code> instance for use with objects of
* the users choosing. If there
* are any reference parameters in the
* <code>endpointReference</code>, then those reference
* parameters MUST appear as SOAP headers, indicating them to be
* reference parameters, on all messages sent to the endpoint.
* The <code>endpointReference's</code> address MUST be used
* for invocations on the endpoint.
* In the implementation of this method, the JAX-WS
* runtime system takes the responsibility of selecting a protocol
* binding (and a port) and configuring the dispatch accordingly from
* the WSDL associated with this <code>Service</code> instance or
* from the WSDL Metadata from the <code>endpointReference</code>.
* If this <code>Service</code> instance has a WSDL and
* the <code>endpointReference</code>
* also has a WSDL, then the WSDL from this instance will be used.
* If this <code>Service</code> instance does not have a WSDL and
* the <code>endpointReference</code> does have a WSDL, then the
* WSDL from the <code>endpointReference</code> will be used.
* <p>
* This method behaves the same as calling
* <pre>
* dispatch = service.createDispatch(portName, type, mode, features);
* </pre>
* where the <code>portName</code> is retrieved from the
* <code>wsaw:EndpointName</code> attribute of the <code>wsaw:ServiceName</code>
* element in the
* metadata of the <code>endpointReference</code>.
* <br>
* See <a href="http://www.w3.org/TR/2006/CR-ws-addr-wsdl-20060529/">WS-Addressing - WSDL 1.0
* </a>.
*
* @param endpointReference The <code>EndpointReference</code>
* for the target service endpoint that will be invoked by the
* returned <code>Dispatch</code> object.
* @param type The class of object used to messages or message
* payloads. Implementations are required to support
* javax.xml.transform.Source and javax.xml.soap.SOAPMessage.
* @param mode Controls whether the created dispatch instance is message
* or payload oriented, i.e. whether the user will work with complete
* protocol messages or message payloads. E.g. when using the SOAP
* protocol, this parameter controls whether the user will work with
* SOAP messages or the contents of a SOAP body. Mode MUST be MESSAGE
* when type is SOAPMessage.
* @param features An array of WebServiceFeatures to configure on the
* proxy. Supported features not in the <code>features
* </code> parameter will have their default values.
*
* @return Dispatch instance
* @throws javax.xml.ws.WebServiceException
* <UL>
* <LI>If there is any missing WSDL metadata
* as required by this method.
* <li>If the <code>wsaw:ServiceName</code> element
* or the <code>wsaw:EndpointName</code> attribute
* is missing in the metdata of the
* <code>endpointReference</code>.
* <li>If the <code>wsaw:ServiceName</code> does not
* match the <code>serviceName</code> of this instance.
* <li>If the <code>wsaw:EndpointName</code> does not
* match a valid wsdl:Port in the WSDL metadata.
* <li>If any error in the creation of
* the <code>Dispatch</code> object.
* <li>if a feature is enabled that is not
* compatible with this port or is unsupported.
* </UL>
*
* @see javax.xml.transform.Source
* @see javax.xml.soap.SOAPMessage
* @see WebServiceFeature;
*
* @since JAX-WS 2.1
**/
public abstract <T> Dispatch<T> createDispatch(EndpointReference endpointReference,
Class<T> type, Service.Mode mode,
WebServiceFeature... features);
/**
* Creates a <code>Dispatch</code> instance for use with JAXB
* generated objects.
*
* @param portName Qualified name for the target service endpoint
* @param context The JAXB context used to marshall and unmarshall
* messages or message payloads.
* @param mode Controls whether the created dispatch instance is message
* or payload oriented, i.e. whether the user will work with complete
* protocol messages or message payloads. E.g. when using the SOAP
* protocol, this parameter controls whether the user will work with
* SOAP messages or the contents of a SOAP body.
* @param features A list of WebServiceFeatures to configure on the
* proxy. Supported features not in the <code>features
* </code> parameter will have their default values.
*
* @return Dispatch instance
* @throws javax.xml.ws.WebServiceException If any error in the creation of
* the <code>Dispatch</code> object or if a
* feature is enabled that is not compatible with
* this port or is unsupported.
*
* @see javax.xml.bind.JAXBContext
* @see WebServiceFeature
*
* @since JAX-WS 2.1
**/
public abstract Dispatch<Object> createDispatch(QName portName,
JAXBContext context, Service.Mode mode, WebServiceFeature... features);
/**
* Creates a <code>Dispatch</code> instance for use with JAXB
* generated objects. If there
* are any reference parameters in the
* <code>endpointReference</code>, then those reference
* parameters MUST appear as SOAP headers, indicating them to be
* reference parameters, on all messages sent to the endpoint.
* The <code>endpointReference's</code> address MUST be used
* for invocations on the endpoint.
* In the implementation of this method, the JAX-WS
* runtime system takes the responsibility of selecting a protocol
* binding (and a port) and configuring the dispatch accordingly from
* the WSDL associated with this <code>Service</code> instance or
* from the WSDL Metadata from the <code>endpointReference</code>.
* If this <code>Service</code> instance has a WSDL and
* the <code>endpointReference</code>
* also has a WSDL, then the WSDL from this instance will be used.
* If this <code>Service</code> instance does not have a WSDL and
* the <code>endpointReference</code> does have a WSDL, then the
* WSDL from the <code>endpointReference</code> will be used.
* <p>
* This method behavies the same as calling
* <pre>
* dispatch = service.createDispatch(portName, context, mode, features);
* </pre>
* where the <code>portName</code> is retrieved from the
* <code>wsaw:EndpointName</code> attribute of the <code>wsaw:ServiceName</code>
* element in the
* metadata of the <code>endpointReference</code>.
* <br>
* See <a href="http://www.w3.org/TR/2006/CR-ws-addr-wsdl-20060529/">WS-Addressing - WSDL 1.0
* </a>.
*
* @param endpointReference The <code>EndpointReference</code>
* for the target service endpoint that will be invoked by the
* returned <code>Dispatch</code> object.
* @param context The JAXB context used to marshall and unmarshall
* messages or message payloads.
* @param mode Controls whether the created dispatch instance is message
* or payload oriented, i.e. whether the user will work with complete
* protocol messages or message payloads. E.g. when using the SOAP
* protocol, this parameter controls whether the user will work with
* SOAP messages or the contents of a SOAP body.
* @param features An array of WebServiceFeatures to configure on the
* proxy. Supported features not in the <code>features
* </code> parameter will have their default values.
*
* @return Dispatch instance
* @throws javax.xml.ws.WebServiceException
* @throws javax.xml.ws.WebServiceException
* <UL>
* <li>If there is any missing WSDL metadata
* as required by this method.
* <li>If the <code>wsaw:ServiceName</code> element
* or the <code>wsaw:EndpointName</code> attribute
* is missing in the metdata of the
* <code>endpointReference</code>.
* <li>If the <code>wsaw:ServiceName</code> does not
* match the <code>serviceName</code> of this instance.
* <li>If the <code>wsaw:EndpointName</code> does not
* match a valid wsdl:Port in the WSDL metadata.
* <li>If any error in the creation of
* the <code>Dispatch</code> object.
* <li>if a feature is enabled that is not
* compatible with this port or is unsupported.
* </UL>
*
* @see javax.xml.bind.JAXBContext
* @see WebServiceFeature
*
* @since JAX-WS 2.1
**/
public abstract Dispatch<Object> createDispatch(EndpointReference endpointReference,
JAXBContext context, Service.Mode mode,
WebServiceFeature... features);
}
|