1 package org.apache.axis2.soap.impl.llom.soap12; 2 3 import org.apache.axis2.om.OMElement; 4 import org.apache.axis2.om.OMXMLParserWrapper; 5 import org.apache.axis2.soap.SOAPFaultCode; 6 import org.apache.axis2.soap.SOAPFaultSubCode; 7 import org.apache.axis2.soap.SOAPFaultValue; 8 import org.apache.axis2.soap.impl.llom.SOAPFaultSubCodeImpl; 9 import org.apache.axis2.soap.impl.llom.SOAPProcessingException; 10 11 28 29 public class SOAP12FaultSubCodeImpl extends SOAPFaultSubCodeImpl{ 30 public SOAP12FaultSubCodeImpl(SOAPFaultCode parent) throws SOAPProcessingException { 32 super(parent, SOAP12Constants.SOAP_FAULT_SUB_CODE_LOCAL_NAME); 33 } 34 35 public SOAP12FaultSubCodeImpl(SOAPFaultCode parent, OMXMLParserWrapper builder) { 37 super(parent, SOAP12Constants.SOAP_FAULT_SUB_CODE_LOCAL_NAME, builder); 38 } 39 40 public SOAP12FaultSubCodeImpl(SOAPFaultSubCode parent) throws SOAPProcessingException { 41 super(parent, SOAP12Constants.SOAP_FAULT_SUB_CODE_LOCAL_NAME); 42 } 43 44 public SOAP12FaultSubCodeImpl(SOAPFaultSubCode parent, OMXMLParserWrapper builder) { 45 super(parent, SOAP12Constants.SOAP_FAULT_SUB_CODE_LOCAL_NAME, builder); 46 } 47 48 protected void checkParent(OMElement parent) throws SOAPProcessingException { 49 if (!((parent instanceof SOAP12FaultSubCodeImpl) || (parent instanceof SOAP12FaultCodeImpl))) { 50 throw new SOAPProcessingException("Expecting SOAP 1.2 implementation of SOAP FaultSubCode or SOAP FaultCodeValue as the parent. But received some other implementation"); 51 } 52 } 53 54 public void setSubCode(SOAPFaultSubCode subCode) throws SOAPProcessingException { 55 if (!(subCode instanceof SOAP12FaultSubCodeImpl)) { 56 throw new SOAPProcessingException("Expecting SOAP 1.2 implementation of SOAP Fault Sub Code. But received some other implementation"); 57 } 58 super.setSubCode(subCode); 59 } 60 61 public void setValue(SOAPFaultValue soapFaultSubCodeValue) throws SOAPProcessingException { 62 if (!(soapFaultSubCodeValue instanceof SOAP12FaultValueImpl)) { 63 throw new SOAPProcessingException("Expecting SOAP 1.2 implementation of SOAP Fault Value. But received some other implementation"); 64 } 65 super.setValue(soapFaultSubCodeValue); 66 } 67 } 68 | Popular Tags |