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.SOAPFaultText; 7 import org.apache.axis2.soap.impl.llom.SOAPFaultReasonImpl; 8 import org.apache.axis2.soap.impl.llom.SOAPProcessingException; 9 10 26 public class SOAP12FaultReasonImpl extends SOAPFaultReasonImpl{ 27 30 public SOAP12FaultReasonImpl(SOAPFault parent, OMXMLParserWrapper builder) { 31 super(parent, builder); 32 } 33 34 37 public SOAP12FaultReasonImpl(SOAPFault parent) throws SOAPProcessingException { 38 super(parent, true); 39 } 40 41 public void setSOAPText(SOAPFaultText soapFaultText) throws SOAPProcessingException { 42 if (!(soapFaultText instanceof SOAP12FaultTextImpl)) { 43 throw new SOAPProcessingException("Expecting SOAP 1.2 implementation of SOAP Fault Text. But received some other implementation"); 44 } 45 super.setSOAPText(soapFaultText); 46 } 47 48 protected void checkParent(OMElement parent) throws SOAPProcessingException { 49 if (!(parent instanceof SOAP12FaultImpl)) { 50 throw new SOAPProcessingException("Expecting SOAP 1.2 implementation of SOAP Fault as the parent. But received some other implementation"); 51 } 52 } 53 } 54 | Popular Tags |