Package com.sun.xml.ws.api
Enum SOAPVersion
- java.lang.Object
-
- java.lang.Enum<SOAPVersion>
-
- com.sun.xml.ws.api.SOAPVersion
-
- All Implemented Interfaces:
Serializable
,Comparable<SOAPVersion>
public enum SOAPVersion extends Enum<SOAPVersion>
Version of SOAP (1.1 and 1.2).This class defines various constants for SOAP 1.1 and SOAP 1.2, and also defines convenience methods to simplify the processing of multiple SOAP versions.
This constant alows you to do:
SOAPVersion version = ...; version.someOp(...);
As opposed to:if(binding is SOAP11) { doSomeOp11(...); } else { doSomeOp12(...); }
- Author:
- Kohsuke Kawaguchi
-
-
Field Summary
Fields Modifier and Type Field Description String
contentType
Content-type.QName
faultCodeClient
"{nsUri}Client" or "{nsUri}Sender"QName
faultCodeMustUnderstand
SOAP MustUnderstand FaultCode for this SOAP versionQName
faultCodeServer
"{nsUri}Server" or "{nsUri}Receiver"String
httpBindingId
Binding ID for SOAP/HTTP binding of this SOAP version.String
implicitRole
If the actor/role attribute is absent, this SOAP version assumes this value.Set<String>
implicitRoleSet
Singleton set that containsimplicitRole
.String
nsUri
SOAP envelope namespace URI.Set<String>
requiredRoles
This represents the roles required to be assumed by SOAP binding implementation.String
roleAttributeName
"role" (SOAP 1.2) or "actor" (SOAP 1.1)jakarta.xml.soap.MessageFactory
saajMessageFactory
Deprecated.jakarta.xml.soap.SOAPFactory
saajSoapFactory
Deprecated.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static SOAPVersion
from(EnvelopeStyle.Style style)
static SOAPVersion
from(EnvelopeStyleFeature f)
static SOAPVersion
fromHttpBinding(String binding)
ReturnsSOAPVersion
whosehttpBindingId
equals to the given string.static SOAPVersion
fromNsUri(String nsUri)
ReturnsSOAPVersion
whosensUri
equals to the given string.jakarta.xml.soap.MessageFactory
getMessageFactory()
jakarta.xml.soap.SOAPFactory
getSOAPFactory()
EnvelopeStyleFeature
toFeature()
String
toString()
static SOAPVersion
valueOf(String name)
Returns the enum constant of this type with the specified name.static SOAPVersion[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
SOAP_11
public static final SOAPVersion SOAP_11
-
SOAP_12
public static final SOAPVersion SOAP_12
-
-
Field Detail
-
httpBindingId
public final String httpBindingId
Binding ID for SOAP/HTTP binding of this SOAP version.Either
SOAPBinding.SOAP11HTTP_BINDING
orSOAPBinding.SOAP12HTTP_BINDING
-
nsUri
public final String nsUri
SOAP envelope namespace URI.
-
contentType
public final String contentType
Content-type. Either "text/xml" or "application/soap+xml".
-
faultCodeMustUnderstand
public final QName faultCodeMustUnderstand
SOAP MustUnderstand FaultCode for this SOAP version
-
saajMessageFactory
@Deprecated public final transient jakarta.xml.soap.MessageFactory saajMessageFactory
Deprecated.SAAJMessageFactory
for this SOAP version.
-
saajSoapFactory
@Deprecated public final transient jakarta.xml.soap.SOAPFactory saajSoapFactory
Deprecated.SAAJSOAPFactory
for this SOAP version.
-
implicitRole
public final String implicitRole
If the actor/role attribute is absent, this SOAP version assumes this value.
-
implicitRoleSet
public final Set<String> implicitRoleSet
Singleton set that containsimplicitRole
.
-
requiredRoles
public final Set<String> requiredRoles
This represents the roles required to be assumed by SOAP binding implementation.
-
roleAttributeName
public final String roleAttributeName
"role" (SOAP 1.2) or "actor" (SOAP 1.1)
-
faultCodeClient
public final QName faultCodeClient
"{nsUri}Client" or "{nsUri}Sender"
-
faultCodeServer
public final QName faultCodeServer
"{nsUri}Server" or "{nsUri}Receiver"
-
-
Method Detail
-
values
public static SOAPVersion[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (SOAPVersion c : SOAPVersion.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static SOAPVersion valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-
getSOAPFactory
public jakarta.xml.soap.SOAPFactory getSOAPFactory()
-
getMessageFactory
public jakarta.xml.soap.MessageFactory getMessageFactory()
-
toString
public String toString()
- Overrides:
toString
in classEnum<SOAPVersion>
-
fromHttpBinding
public static SOAPVersion fromHttpBinding(String binding)
ReturnsSOAPVersion
whosehttpBindingId
equals to the given string. This method does not perform input string validation.- Parameters:
binding
- for historical reason, we treat null asSOAP_11
, but you really shouldn't be passing null.- Returns:
- always non-null.
-
fromNsUri
public static SOAPVersion fromNsUri(String nsUri)
ReturnsSOAPVersion
whosensUri
equals to the given string. This method does not perform input string validation.- Parameters:
nsUri
- must not be null.- Returns:
- always non-null.
-
from
public static SOAPVersion from(EnvelopeStyleFeature f)
-
from
public static SOAPVersion from(EnvelopeStyle.Style style)
-
toFeature
public EnvelopeStyleFeature toFeature()
-
-