1 /* 2 * Copyright 2006 the original author or authors. 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 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.soap12; 18 19 import java.util.Iterator; 20 import java.util.Locale; 21 import javax.xml.namespace.QName; 22 23 import org.springframework.ws.soap.SoapFault; 24 25 /** 26 * Subinterface of <code>SoapFault</code> that exposes SOAP 1.2 functionality. Necessary because SOAP 1.1 differs from 27 * SOAP 1.2 with respect to SOAP Faults. 28 * 29 * @author Arjen Poutsma 30 * @since 1.0.0 31 */ 32 public interface Soap12Fault extends SoapFault { 33 34 /** 35 * Returns an iteration over the fault subcodes. The subcodes are returned in order: from top to bottom. 36 * 37 * @return an Iterator that contains <code>QNames</code> representing the fault subcodes 38 */ 39 Iterator getFaultSubcodes(); 40 41 /** 42 * Adds a fault subcode this fault. 43 * 44 * @param subcode the qualified name of the subcode 45 */ 46 void addFaultSubcode(QName subcode); 47 48 /** Returns the fault node. Optional. */ 49 String getFaultNode(); 50 51 /** Sets the fault node. */ 52 void setFaultNode(String uri); 53 54 /** Sets the specified fault reason text. */ 55 void setFaultReasonText(Locale locale, String text); 56 57 /** Returns the reason associated with the given language. */ 58 String getFaultReasonText(Locale locale); 59 60 }