1 /* |
1 /* |
2 * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. Oracle designates this |
7 * published by the Free Software Foundation. Oracle designates this |
34 import javax.xml.namespace.QName; |
34 import javax.xml.namespace.QName; |
35 import javax.xml.soap.Detail; |
35 import javax.xml.soap.Detail; |
36 import javax.xml.soap.SOAPException; |
36 import javax.xml.soap.SOAPException; |
37 import javax.xml.soap.SOAPFault; |
37 import javax.xml.soap.SOAPFault; |
38 import javax.xml.ws.WebServiceException; |
38 import javax.xml.ws.WebServiceException; |
39 import javax.xml.ws.soap.SOAPFaultException; |
|
40 import java.util.Iterator; |
39 import java.util.Iterator; |
41 |
40 |
42 /** |
41 /** |
43 * This class represents SOAP1.1 Fault. This class will be used to marshall/unmarshall a soap fault using JAXB. |
42 * This class represents SOAP1.1 Fault. This class will be used to marshall/unmarshall a soap fault using JAXB. |
44 * <p/> |
43 * <p/> |
100 SOAP11Fault(QName code, String reason, String actor, Element detailObject) { |
99 SOAP11Fault(QName code, String reason, String actor, Element detailObject) { |
101 this.faultcode = code; |
100 this.faultcode = code; |
102 this.faultstring = reason; |
101 this.faultstring = reason; |
103 this.faultactor = actor; |
102 this.faultactor = actor; |
104 if (detailObject != null) { |
103 if (detailObject != null) { |
105 if("".equals(detailObject.getNamespaceURI()) && "detail".equals(detailObject.getLocalName())){ |
104 if ((detailObject.getNamespaceURI() == null || |
|
105 "".equals(detailObject.getNamespaceURI())) && "detail".equals(detailObject.getLocalName())) { |
106 detail = new DetailType(); |
106 detail = new DetailType(); |
107 for(Element detailEntry : DOMUtil.getChildElements(detailObject)){ |
107 for(Element detailEntry : DOMUtil.getChildElements(detailObject)) { |
108 detail.getDetails().add(detailEntry); |
108 detail.getDetails().add(detailEntry); |
109 } |
109 } |
110 }else{ |
110 } else { |
111 detail = new DetailType(detailObject); |
111 detail = new DetailType(detailObject); |
112 } |
112 } |
113 } |
113 } |
114 } |
114 } |
115 |
115 |