KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > javax > xml > ws > soap > SOAPBinding


1 /*
2  * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
3  * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
4  */

5
6 package javax.xml.ws.soap;
7
8
9 import java.util.Set JavaDoc;
10 import javax.xml.ws.Binding;
11 import javax.xml.soap.SOAPFactory JavaDoc;
12 import javax.xml.soap.MessageFactory JavaDoc;
13
14 /** The <code>SOAPBinding</code> interface is an abstraction for
15  * the SOAP binding.
16  *
17  * @since JAX-WS 2.0
18 **/

19 public interface SOAPBinding extends Binding {
20
21   /**
22    * A constant representing the identity of the SOAP 1.1 over HTTP binding.
23    */

24   public static final String JavaDoc SOAP11HTTP_BINDING = "http://schemas.xmlsoap.org/wsdl/soap/http";
25
26   /**
27    * A constant representing the identity of the SOAP 1.2 over HTTP binding.
28    */

29   public static final String JavaDoc SOAP12HTTP_BINDING = "http://www.w3.org/2003/05/soap/bindings/HTTP/";
30
31   /**
32    * A constant representing the identity of the SOAP 1.1 over HTTP binding
33    * with MTOM enabled by default.
34    */

35   public static final String JavaDoc SOAP11HTTP_MTOM_BINDING = "http://schemas.xmlsoap.org/wsdl/soap/http?mtom=true";
36
37   /**
38    * A constant representing the identity of the SOAP 1.2 over HTTP binding
39    * with MTOM enabled by default.
40    */

41   public static final String JavaDoc SOAP12HTTP_MTOM_BINDING = "http://www.w3.org/2003/05/soap/bindings/HTTP/?mtom=true";
42     
43   
44   /** Gets the roles played by the SOAP binding instance.
45    *
46    * @return Set<String> The set of roles played by the binding instance.
47   **/

48   public Set JavaDoc<String JavaDoc> getRoles();
49
50   /** Sets the roles played by the SOAP binding instance.
51    *
52    * @param roles The set of roles played by the binding instance.
53    * @throws WebServiceException On an error in the configuration of
54    * the list of roles.
55   **/

56   public void setRoles(Set JavaDoc<String JavaDoc> roles);
57
58   /**
59    * Returns <code>true</code> if the use of MTOM is enabled.
60    *
61    * @return <code>true</code> if and only if the use of MTOM is enabled.
62   **/

63   
64   public boolean isMTOMEnabled();
65   
66   /**
67    * Enables or disables use of MTOM.
68    *
69    * @param flag A <code>boolean</code> specifying whether the use of MTOM should
70    * be enabled or disabled.
71    * @throws WebServiceException If the specified setting is not supported
72    * by this binding instance.
73    *
74    **/

75   public void setMTOMEnabled(boolean flag);
76   
77   /**
78    * Gets the SAAJ <code>SOAPFactory</code> instance used by this SOAP binding.
79    *
80    * @return SOAPFactory instance used by this SOAP binding.
81   **/

82   public SOAPFactory JavaDoc getSOAPFactory();
83   
84   /**
85    * Gets the SAAJ <code>MessageFactory</code> instance used by this SOAP binding.
86    *
87    * @return MessageFactory instance used by this SOAP binding.
88   **/

89   public MessageFactory JavaDoc getMessageFactory();
90 }
91
Popular Tags