1 package org.apache.axis2.soap.impl.llom.soap11; 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 import org.apache.axis2.soap.impl.llom.soap12.SOAP12Constants; 11 12 29 30 public class SOAP11FaultSubCodeImpl extends SOAPFaultSubCodeImpl{ 31 public SOAP11FaultSubCodeImpl(SOAPFaultCode parent) throws SOAPProcessingException { 33 super(parent, SOAP12Constants.SOAP_FAULT_SUB_CODE_LOCAL_NAME); 34 } 35 36 public SOAP11FaultSubCodeImpl(SOAPFaultCode parent, OMXMLParserWrapper builder) { 38 super(parent, SOAP12Constants.SOAP_FAULT_SUB_CODE_LOCAL_NAME, builder); 39 } 40 41 public SOAP11FaultSubCodeImpl(SOAPFaultSubCode parent) throws SOAPProcessingException { 42 super(parent, SOAP12Constants.SOAP_FAULT_SUB_CODE_LOCAL_NAME); 43 } 44 45 public SOAP11FaultSubCodeImpl(SOAPFaultSubCode parent, OMXMLParserWrapper builder) { 46 super(parent, SOAP12Constants.SOAP_FAULT_SUB_CODE_LOCAL_NAME, builder); 47 } 48 49 protected void checkParent(OMElement parent) throws SOAPProcessingException { 50 if (!(parent instanceof SOAP11FaultSubCodeImpl) || (parent instanceof SOAP11FaultCodeImpl)) { 51 throw new SOAPProcessingException("Expecting SOAP 1.1 implementation of SOAP FaultSubCode or SOAP FaultCode as the parent. But received some other implementation"); 52 } 53 } 54 55 public void setSubCode(SOAPFaultSubCode subCode) throws SOAPProcessingException { 56 if (!(subCode instanceof SOAP11FaultSubCodeImpl)) { 57 throw new SOAPProcessingException("Expecting SOAP 1.1 implementation of SOAP Fault Sub Code. But received some other implementation"); 58 } 59 super.setSubCode(subCode); 60 } 61 62 public void setValue(SOAPFaultValue soapFaultSubCodeValue) throws SOAPProcessingException { 63 if (!(soapFaultSubCodeValue instanceof SOAP11FaultValueImpl)) { 64 throw new SOAPProcessingException("Expecting SOAP 1.1 implementation of SOAP Fault Value. But received some other implementation"); 65 } 66 super.setValue(soapFaultSubCodeValue); 67 } 68 69 70 } 71 | Popular Tags |