1 package com.soapuser.soap.client.helper;
2
3 import org.apache.soap.SOAPException;
4
5 public class SoapClientHelperException extends Exception
6 {
7 private boolean fault;
8 private String code;
9 private String desc;
10 private SOAPException soapException;
11
12 // constructor when a server-side FAULT occured
13 public SoapClientHelperException( String code, String desc )
14 {
15 super( "Server-Side SOAP Fault ( FaultCode: " + code + " ) FaultDesc: " + desc );
16 fault = true;
17 this.code = code;
18 this.desc = desc;
19 }
20
21 // constructor when a genuine SOAPException is thrown
22 public SoapClientHelperException( SOAPException e )
23 {
24 super( e.getMessage() );
25 this.soapException = e;
26 }
27
28 // String msg constructor for the rest
29 public SoapClientHelperException( String s )
30 {
31 super( s );
32 }
33
34 public boolean isFault() {
35 return fault;
36 }
37 public String getCode() {
38 return code;
39 }
40 public String getDesc() {
41 return desc;
42 }
43 public SOAPException getSOAPException() {
44 return soapException;
45 }
46 }