01: /*
02: * Copyright 2002-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.remoting.jaxrpc;
18:
19: import javax.xml.namespace.QName;
20: import javax.xml.rpc.soap.SOAPFaultException;
21:
22: import org.springframework.remoting.soap.SoapFaultException;
23:
24: /**
25: * Spring SoapFaultException adapter for the JAX-RPC
26: * {@link javax.xml.rpc.soap.SOAPFaultException} class.
27: *
28: * @author Juergen Hoeller
29: * @since 2.5
30: */
31: public class JaxRpcSoapFaultException extends SoapFaultException {
32:
33: /**
34: * Constructor for JaxRpcSoapFaultException.
35: * @param original the original JAX-RPC SOAPFaultException to wrap
36: */
37: public JaxRpcSoapFaultException(SOAPFaultException original) {
38: super (original.getMessage(), original);
39: }
40:
41: /**
42: * Return the wrapped JAX-RPC SOAPFaultException.
43: */
44: public final SOAPFaultException getOriginalException() {
45: return (SOAPFaultException) getCause();
46: }
47:
48: public String getFaultCode() {
49: return getOriginalException().getFaultCode().toString();
50: }
51:
52: public QName getFaultCodeAsQName() {
53: return getOriginalException().getFaultCode();
54: }
55:
56: public String getFaultString() {
57: return getOriginalException().getFaultString();
58: }
59:
60: public String getFaultActor() {
61: return getOriginalException().getFaultActor();
62: }
63:
64: }
|