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.SOAPFault; 6 import org.apache.axis2.soap.SOAPFaultSubCode; 7 import org.apache.axis2.soap.SOAPFaultValue; 8 import org.apache.axis2.soap.impl.llom.SOAPFaultCodeImpl; 9 import org.apache.axis2.soap.impl.llom.SOAPProcessingException; 10 11 27 public class SOAP12FaultCodeImpl extends SOAPFaultCodeImpl{ 28 31 39 public SOAP12FaultCodeImpl(SOAPFault parent, OMXMLParserWrapper builder) { 40 super(parent, builder); 41 } 42 43 47 public SOAP12FaultCodeImpl(SOAPFault parent) throws SOAPProcessingException { 48 super(parent, true); 49 } 50 51 52 53 public void setSubCode(SOAPFaultSubCode subCode) throws SOAPProcessingException { 54 if (!(subCode instanceof SOAP12FaultSubCodeImpl)) { 55 throw new SOAPProcessingException("Expecting SOAP 1.2 implementation of SOAP Fault Sub Code. But received some other implementation"); 56 } 57 super.setSubCode(subCode); 58 } 59 60 public void setValue(SOAPFaultValue value) throws SOAPProcessingException { 61 if (!(value instanceof SOAP12FaultValueImpl)) { 62 throw new SOAPProcessingException("Expecting SOAP 1.2 implementation of SOAP Fault Value. But received some other implementation"); 63 } 64 super.setValue(value); 65 } 66 67 protected void checkParent(OMElement parent) throws SOAPProcessingException { 68 if (!(parent instanceof SOAP12FaultImpl)) { 69 throw new SOAPProcessingException("Expecting SOAP 1.2 implementation of SOAP Fault as the parent. But received some other implementation"); 70 } 71 } 72 } 73 | Popular Tags |