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