325N/A/*
325N/A * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
325N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
325N/A *
325N/A * This code is free software; you can redistribute it and/or modify it
325N/A * under the terms of the GNU General Public License version 2 only, as
325N/A * published by the Free Software Foundation. Oracle designates this
325N/A * particular file as subject to the "Classpath" exception as provided
325N/A * by Oracle in the LICENSE file that accompanied this code.
325N/A *
325N/A * This code is distributed in the hope that it will be useful, but WITHOUT
325N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
325N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
325N/A * version 2 for more details (a copy is included in the LICENSE file that
325N/A * accompanied this code).
325N/A *
325N/A * You should have received a copy of the GNU General Public License version
325N/A * 2 along with this work; if not, write to the Free Software Foundation,
325N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
325N/A *
325N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
325N/A * or visit www.oracle.com if you need additional information or have any
325N/A * questions.
325N/A */
325N/A
325N/Apackage javax.xml.ws;
325N/A
325N/Aimport java.util.Map;
325N/Aimport javax.xml.ws.wsaddressing.W3CEndpointReference;
325N/A
325N/A/**
325N/A * The <code>BindingProvider</code> interface provides access to the
325N/A * protocol binding and associated context objects for request and
325N/A * response message processing.
325N/A *
325N/A * @since JAX-WS 2.0
325N/A *
325N/A * @see javax.xml.ws.Binding
325N/A **/
325N/Apublic interface BindingProvider {
325N/A /**
325N/A * Standard property: User name for authentication.
325N/A * <p>Type: <code>java.lang.String</code>
325N/A **/
325N/A public static final String USERNAME_PROPERTY =
325N/A "javax.xml.ws.security.auth.username";
325N/A
325N/A /**
325N/A * Standard property: Password for authentication.
325N/A * <p>Type: <code>java.lang.String</code>
325N/A **/
325N/A public static final String PASSWORD_PROPERTY =
325N/A "javax.xml.ws.security.auth.password";
325N/A
325N/A /**
325N/A * Standard property: Target service endpoint address. The
325N/A * URI scheme for the endpoint address specification MUST
325N/A * correspond to the protocol/transport binding for the
325N/A * binding in use.
325N/A * <p>Type: <code>java.lang.String</code>
325N/A **/
325N/A public static final String ENDPOINT_ADDRESS_PROPERTY =
325N/A "javax.xml.ws.service.endpoint.address";
325N/A
325N/A /**
325N/A * Standard property: This boolean property is used by a service
325N/A * client to indicate whether or not it wants to participate in
325N/A * a session with a service endpoint. If this property is set to
325N/A * <code>true</code>, the service client indicates that it wants the session
325N/A * to be maintained. If set to <code>false</code>, the session is not maintained.
325N/A * The default value for this property is <code>false</code>.
325N/A * <p>Type: <code>java.lang.Boolean</code>
325N/A **/
325N/A public static final String SESSION_MAINTAIN_PROPERTY =
325N/A "javax.xml.ws.session.maintain";
325N/A
325N/A /**
325N/A * Standard property for SOAPAction. This boolean property
325N/A * indicates whether or not the value of the
325N/A * <code>javax.xml.ws.soap.http.soapaction.uri</code> property
325N/A * is used for the value of the SOAPAction. The
325N/A * default value of this property is <code>false</code> indicating
325N/A * that the
325N/A * <code>javax.xml.ws.soap.http.soapaction.uri</code> property
325N/A * is not used for the value of the SOAPAction, however,
325N/A * if WS-Addressing is enabled, the default value is
325N/A * <code>true</code>.
325N/A *
325N/A * <p>Type: <code>java.lang.Boolean</code>
325N/A **/
325N/A public static final String SOAPACTION_USE_PROPERTY =
325N/A "javax.xml.ws.soap.http.soapaction.use";
325N/A
325N/A /**
325N/A * Standard property for SOAPAction. Indicates the SOAPAction
325N/A * URI if the <code>javax.xml.ws.soap.http.soapaction.use</code>
325N/A * property is set to <code>true</code>. If WS-Addressing
325N/A * is enabled, this value will also be used for the value of the
325N/A * WS-Addressing Action header. If this property is not set,
325N/A * the default SOAPAction and WS-Addressing Action will be sent.
325N/A *
325N/A * <p>Type: <code>java.lang.String</code>
325N/A **/
325N/A public static final String SOAPACTION_URI_PROPERTY =
325N/A "javax.xml.ws.soap.http.soapaction.uri";
325N/A
325N/A /**
325N/A * Get the context that is used to initialize the message context
325N/A * for request messages.
325N/A *
325N/A * Modifications to the request context do not affect the message context of
325N/A * either synchronous or asynchronous operations that have already been
325N/A * started.
325N/A *
325N/A * @return The context that is used in processing request messages.
325N/A **/
325N/A Map<String, Object> getRequestContext();
325N/A
325N/A /**
325N/A * Get the context that resulted from processing a response message.
325N/A *
325N/A * The returned context is for the most recently completed synchronous
325N/A * operation. Subsequent synchronous operation invocations overwrite the
325N/A * response context. Asynchronous operations return their response context
325N/A * via the Response interface.
325N/A *
325N/A * @return The context that resulted from processing the latest
325N/A * response messages.
325N/A **/
325N/A Map<String, Object> getResponseContext();
325N/A
325N/A /**
325N/A * Get the Binding for this binding provider.
325N/A *
325N/A * @return The Binding for this binding provider.
325N/A **/
325N/A Binding getBinding();
325N/A
325N/A
325N/A
325N/A /**
325N/A * Returns the <code>EndpointReference</code> associated with
325N/A * this <code>BindingProvider</code> instance.
325N/A * <p>
325N/A * If the Binding for this <code>bindingProvider</code> is
325N/A * either SOAP1.1/HTTP or SOAP1.2/HTTP, then a
325N/A * <code>W3CEndpointReference</code> MUST be returned.
325N/A *
325N/A * @return EndpointReference of the target endpoint associated with this
325N/A * <code>BindingProvider</code> instance.
325N/A *
325N/A * @throws java.lang.UnsupportedOperationException If this
325N/A * <code>BindingProvider</code> uses the XML/HTTP binding.
325N/A *
325N/A * @see W3CEndpointReference
325N/A *
325N/A * @since JAX-WS 2.1
325N/A */
325N/A public EndpointReference getEndpointReference();
325N/A
325N/A
325N/A /**
325N/A * Returns the <code>EndpointReference</code> associated with
325N/A * this <code>BindingProvider</code> instance. The instance
325N/A * returned will be of type <code>clazz</code>.
325N/A *
325N/A * @param clazz Specifies the type of <code>EndpointReference</code>
325N/A * that MUST be returned.
325N/A
325N/A * @return EndpointReference of the target endpoint associated with this
325N/A * <code>BindingProvider</code> instance. MUST be of type
325N/A * <code>clazz</code>.
325N/A
325N/A * @throws WebServiceException If the Class <code>clazz</code>
325N/A * is not supported by this implementation.
325N/A * @throws java.lang.UnsupportedOperationException If this
325N/A * <code>BindingProvider</code> uses the XML/HTTP binding.
325N/A *
325N/A * @since JAX-WS 2.1
325N/A */
325N/A public <T extends EndpointReference> T getEndpointReference(Class<T> clazz);
325N/A}