001: /*
002: * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
003: * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
004: */
005:
006: package javax.xml.ws;
007:
008: import java.util.Map;
009: import javax.xml.ws.wsaddressing.W3CEndpointReference;
010: import org.w3c.dom.Element;
011:
012: /**
013: * The <code>BindingProvider</code> interface provides access to the
014: * protocol binding and associated context objects for request and
015: * response message processing.
016: *
017: * @since JAX-WS 2.0
018: *
019: * @see javax.xml.ws.Binding
020: **/
021: public interface BindingProvider {
022: /**
023: * Standard property: User name for authentication.
024: * <p>Type: <code>java.lang.String</code>
025: **/
026: public static final String USERNAME_PROPERTY = "javax.xml.ws.security.auth.username";
027:
028: /**
029: * Standard property: Password for authentication.
030: * <p>Type: <code>java.lang.String</code>
031: **/
032: public static final String PASSWORD_PROPERTY = "javax.xml.ws.security.auth.password";
033:
034: /**
035: * Standard property: Target service endpoint address. The
036: * URI scheme for the endpoint address specification MUST
037: * correspond to the protocol/transport binding for the
038: * binding in use.
039: * <p>Type: <code>java.lang.String</code>
040: **/
041: public static final String ENDPOINT_ADDRESS_PROPERTY = "javax.xml.ws.service.endpoint.address";
042:
043: /**
044: * Standard property: This boolean property is used by a service
045: * client to indicate whether or not it wants to participate in
046: * a session with a service endpoint. If this property is set to
047: * <code>true</code>, the service client indicates that it wants the session
048: * to be maintained. If set to <code>false</code>, the session is not maintained.
049: * The default value for this property is <code>false</code>.
050: * <p>Type: <code>java.lang.Boolean</code>
051: **/
052: public static final String SESSION_MAINTAIN_PROPERTY = "javax.xml.ws.session.maintain";
053:
054: /**
055: * Standard property for SOAPAction. This boolean property
056: * indicates whether or not the value of the
057: * <code>javax.xml.ws.soap.http.soapaction.uri</code> property
058: * is used for the value of the SOAPAction. The
059: * default value of this property is <code>false</code> indicating
060: * that the
061: * <code>javax.xml.ws.soap.http.soapaction.uri</code> property
062: * is not used for the value of the SOAPAction, however,
063: * if WS-Addressing is enabled, the default value is
064: * <code>true</code>.
065: *
066: * <p>Type: <code>java.lang.Boolean</code>
067: **/
068: public static final String SOAPACTION_USE_PROPERTY = "javax.xml.ws.soap.http.soapaction.use";
069:
070: /**
071: * Standard property for SOAPAction. Indicates the SOAPAction
072: * URI if the <code>javax.xml.ws.soap.http.soapaction.use</code>
073: * property is set to <code>true</code>. If WS-Addressing
074: * is enabled, this value will also be used for the value of the
075: * WS-Addressing Action header. If this property is not set,
076: * the default SOAPAction and WS-Addressing Action will be sent.
077: *
078: * <p>Type: <code>java.lang.String</code>
079: **/
080: public static final String SOAPACTION_URI_PROPERTY = "javax.xml.ws.soap.http.soapaction.uri";
081:
082: /**
083: * Get the context that is used to initialize the message context
084: * for request messages.
085: *
086: * Modifications to the request context do not affect the message context of
087: * either synchronous or asynchronous operations that have already been
088: * started.
089: *
090: * @return The context that is used in processing request messages.
091: **/
092: Map<String, Object> getRequestContext();
093:
094: /**
095: * Get the context that resulted from processing a response message.
096: *
097: * The returned context is for the most recently completed synchronous
098: * operation. Subsequent synchronous operation invocations overwrite the
099: * response context. Asynchronous operations return their response context
100: * via the Response interface.
101: *
102: * @return The context that resulted from processing the latest
103: * response messages.
104: **/
105: Map<String, Object> getResponseContext();
106:
107: /**
108: * Get the Binding for this binding provider.
109: *
110: * @return The Binding for this binding provider.
111: **/
112: Binding getBinding();
113:
114: /**
115: * Returns the <code>EndpointReference</code> associated with
116: * this <code>BindingProvider</code> instance.
117: * <p>
118: * If the Binding for this <code>bindingProvider</code> is
119: * either SOAP1.1/HTTP or SOAP1.2/HTTP, then a
120: * <code>W3CEndpointReference</code> MUST be returned.
121: *
122: * @return EndpointReference of the target endpoint associated with this
123: * <code>BindingProvider</code> instance.
124: *
125: * @throws java.lang.UnsupportedOperationException If this
126: * <code>BindingProvider</code> uses the XML/HTTP binding.
127: *
128: * @see W3CEndpointReference
129: *
130: * @since JAX-WS 2.1
131: */
132: public EndpointReference getEndpointReference();
133:
134: /**
135: * Returns the <code>EndpointReference</code> associated with
136: * this <code>BindingProvider</code> instance. The instance
137: * returned will be of type <code>clazz</code>.
138: *
139: * @param clazz Specifies the type of <code>EndpointReference</code>
140: * that MUST be returned.
141:
142: * @return EndpointReference of the target endpoint associated with this
143: * <code>BindingProvider</code> instance. MUST be of type
144: * <code>clazz</code>.
145:
146: * @throws WebServiceException If the Class <code>clazz</code>
147: * is not supported by this implementation.
148: * @throws java.lang.UnsupportedOperationException If this
149: * <code>BindingProvider</code> uses the XML/HTTP binding.
150: *
151: * @since JAX-WS 2.1
152: */
153: public <T extends EndpointReference> T getEndpointReference(
154: Class<T> clazz);
155: }
|