01: /*
02: * Copyright 2007 the original author or authors.
03: *
04: * Licensed under the Apache License, Version 2.0 (the "License");
05: * you may not use this file except in compliance with the License.
06: * You may obtain a copy of the License at
07: *
08: * http://www.apache.org/licenses/LICENSE-2.0
09: *
10: * Unless required by applicable law or agreed to in writing, software
11: * distributed under the License is distributed on an "AS IS" BASIS,
12: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13: * See the License for the specific language governing permissions and
14: * limitations under the License.
15: */
16:
17: package org.springframework.ws.soap.server.endpoint.annotation;
18:
19: import javax.xml.namespace.QName;
20:
21: import org.springframework.ws.soap.SoapBody;
22: import org.springframework.ws.soap.soap11.Soap11Body;
23:
24: /**
25: * Enumeration that represents the standard SOAP Fault codes for use with the JDK 1.5+ {@link SoapFault} annotation.
26: *
27: * @author Arjen Poutsma
28: * @since 1.0.0
29: */
30: public enum FaultCode {
31:
32: /**
33: * Constant used to indicate that a fault must be created with a custom fault code. When this value is used, the
34: * <code>customFaultCode</code> string property must be used on {@link SoapFault}.
35: * <p/>
36: * Note that custom Fault Codes are only supported on SOAP 1.1.
37: *
38: * @see SoapFault#customFaultCode()
39: * @see Soap11Body#addFault(javax.xml.namespace.QName,String,java.util.Locale)
40: */
41: CUSTOM(new QName("CUSTOM")),
42:
43: /**
44: * Constant used to indicate that a <code>Client</code> fault must be created.
45: *
46: * @see SoapBody#addClientOrSenderFault(String,java.util.Locale)
47: */
48: CLIENT(new QName("CLIENT")),
49:
50: /**
51: * Constant <code>QName</code> used to indicate that a <code>Receiver</code> fault must be created.
52: *
53: * @see SoapBody#addServerOrReceiverFault(String,java.util.Locale)
54: */
55: RECEIVER(new QName("RECEIVER")),
56:
57: /**
58: * Constant <code>QName</code> used to indicate that a <code>Sender</code> fault must be created.
59: *
60: * @see SoapBody#addServerOrReceiverFault(String,java.util.Locale)
61: */
62: SENDER(new QName("SENDER")),
63:
64: /**
65: * Constant <code>QName</code> used to indicate that a <code>Server</code> fault must be created.
66: *
67: * @see SoapBody#addClientOrSenderFault(String,java.util.Locale)
68: */
69: SERVER(new QName("SERVER"));
70:
71: private final QName value;
72:
73: private FaultCode(QName value) {
74: this .value = value;
75: }
76:
77: public QName value() {
78: return value;
79: }
80:
81: }
|