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.*; 6 import org.apache.axis2.soap.impl.llom.SOAPFaultImpl; 7 import org.apache.axis2.soap.impl.llom.SOAPProcessingException; 8 9 10 26 public class SOAP12FaultImpl extends SOAPFaultImpl { 27 30 31 public SOAP12FaultImpl(SOAPBody parent, Exception e) throws SOAPProcessingException { 32 super(parent, e); 33 } 34 35 public SOAP12FaultImpl(SOAPBody parent, OMXMLParserWrapper builder) { 36 super(parent, builder); 37 } 38 39 45 public SOAP12FaultImpl(SOAPBody parent) throws SOAPProcessingException { 46 super(parent); 47 } 48 49 protected SOAPFaultDetail getNewSOAPFaultDetail(SOAPFault fault) { 50 return new SOAP12FaultDetailImpl(fault); 51 52 } 53 54 public void setCode(SOAPFaultCode soapFaultCode) throws SOAPProcessingException { 55 if (!(soapFaultCode instanceof SOAP12FaultCodeImpl)) { 56 throw new SOAPProcessingException("Expecting SOAP 1.2 implementation of SOAP Fault Code. But received some other implementation"); 57 } 58 super.setCode(soapFaultCode); 59 } 60 61 62 public void setReason(SOAPFaultReason reason) throws SOAPProcessingException { 63 if (!(reason instanceof SOAP12FaultReasonImpl)) { 64 throw new SOAPProcessingException("Expecting SOAP 1.2 implementation of SOAP Fault Reason. But received some other implementation"); 65 } 66 super.setReason(reason); 67 } 68 69 public void setNode(SOAPFaultNode node) throws SOAPProcessingException { 70 if (!(node instanceof SOAP12FaultNodeImpl)) { 71 throw new SOAPProcessingException("Expecting SOAP 1.2 implementation of SOAP Fault Node. But received some other implementation"); 72 } 73 super.setNode(node); 74 } 75 76 public void setRole(SOAPFaultRole role) throws SOAPProcessingException { 77 if (!(role instanceof SOAP12FaultRoleImpl)) { 78 throw new SOAPProcessingException("Expecting SOAP 1.2 implementation of SOAP Fault Role. But received some other implementation"); 79 } 80 super.setRole(role); 81 } 82 83 public void setDetail(SOAPFaultDetail detail) throws SOAPProcessingException { 84 if (!(detail instanceof SOAP12FaultDetailImpl)) { 85 throw new SOAPProcessingException("Expecting SOAP 1.2 implementation of SOAP Fault Detail. But received some other implementation"); 86 } 87 super.setDetail(detail); 88 } 89 90 protected void checkParent(OMElement parent) throws SOAPProcessingException { 91 if (!(parent instanceof SOAP12BodyImpl)) { 92 throw new SOAPProcessingException("Expecting SOAP 1.2 implementation of SOAP Body as the parent. But received some other implementation"); 93 } 94 } 95 } 96 | Popular Tags |