01: /*
02: * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
03: * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
04: */
05:
06: package javax.xml.ws.soap;
07:
08: import java.util.Set;
09: import javax.xml.ws.Binding;
10: import javax.xml.soap.SOAPFactory;
11: import javax.xml.soap.MessageFactory;
12:
13: /** The <code>SOAPBinding</code> interface is an abstraction for
14: * the SOAP binding.
15: *
16: * @since JAX-WS 2.0
17: **/
18: public interface SOAPBinding extends Binding {
19:
20: /**
21: * A constant representing the identity of the SOAP 1.1 over HTTP binding.
22: */
23: public static final String SOAP11HTTP_BINDING = "http://schemas.xmlsoap.org/wsdl/soap/http";
24:
25: /**
26: * A constant representing the identity of the SOAP 1.2 over HTTP binding.
27: */
28: public static final String SOAP12HTTP_BINDING = "http://www.w3.org/2003/05/soap/bindings/HTTP/";
29:
30: /**
31: * A constant representing the identity of the SOAP 1.1 over HTTP binding
32: * with MTOM enabled by default.
33: */
34: public static final String SOAP11HTTP_MTOM_BINDING = "http://schemas.xmlsoap.org/wsdl/soap/http?mtom=true";
35:
36: /**
37: * A constant representing the identity of the SOAP 1.2 over HTTP binding
38: * with MTOM enabled by default.
39: */
40: public static final String SOAP12HTTP_MTOM_BINDING = "http://www.w3.org/2003/05/soap/bindings/HTTP/?mtom=true";
41:
42: /** Gets the roles played by the SOAP binding instance.
43: *
44: * @return Set<String> The set of roles played by the binding instance.
45: **/
46: public Set<String> getRoles();
47:
48: /** Sets the roles played by the SOAP binding instance.
49: *
50: * @param roles The set of roles played by the binding instance.
51: * @throws WebServiceException On an error in the configuration of
52: * the list of roles.
53: **/
54: public void setRoles(Set<String> roles);
55:
56: /**
57: * Returns <code>true</code> if the use of MTOM is enabled.
58: *
59: * @return <code>true</code> if and only if the use of MTOM is enabled.
60: **/
61:
62: public boolean isMTOMEnabled();
63:
64: /**
65: * Enables or disables use of MTOM.
66: *
67: * @param flag A <code>boolean</code> specifying whether the use of MTOM should
68: * be enabled or disabled.
69: * @throws WebServiceException If the specified setting is not supported
70: * by this binding instance.
71: *
72: **/
73: public void setMTOMEnabled(boolean flag);
74:
75: /**
76: * Gets the SAAJ <code>SOAPFactory</code> instance used by this SOAP binding.
77: *
78: * @return SOAPFactory instance used by this SOAP binding.
79: **/
80: public SOAPFactory getSOAPFactory();
81:
82: /**
83: * Gets the SAAJ <code>MessageFactory</code> instance used by this SOAP binding.
84: *
85: * @return MessageFactory instance used by this SOAP binding.
86: **/
87: public MessageFactory getMessageFactory();
88: }
|