1 package org.apache.axis2.soap.impl.llom.soap11; 2 3 import org.apache.axis2.om.OMElement; 4 import org.apache.axis2.om.OMOutput; 5 import org.apache.axis2.om.OMXMLParserWrapper; 6 import org.apache.axis2.soap.*; 7 import org.apache.axis2.soap.impl.llom.SOAPFaultImpl; 8 import org.apache.axis2.soap.impl.llom.SOAPProcessingException; 9 10 import javax.xml.stream.XMLStreamException; 11 12 13 29 public class SOAP11FaultImpl extends SOAPFaultImpl { 30 33 34 public SOAP11FaultImpl(SOAPBody parent, Exception e) throws SOAPProcessingException { 35 super(parent, e); 36 } 37 38 public SOAP11FaultImpl(SOAPBody parent, OMXMLParserWrapper builder) { 39 super(parent, builder); 40 } 41 42 48 public SOAP11FaultImpl(SOAPBody parent) throws SOAPProcessingException { 49 super(parent); 50 51 } 52 53 protected SOAPFaultDetail getNewSOAPFaultDetail(SOAPFault fault) throws SOAPProcessingException { 54 return new SOAP11FaultDetailImpl(fault); 55 } 56 57 public void serializeWithCache(OMOutput omOutput) throws XMLStreamException { 58 super.serializeWithCache(omOutput); 59 } 60 61 public void serialize(OMOutput omOutput) throws XMLStreamException { 62 super.serialize(omOutput); 63 } 64 65 public void setCode(SOAPFaultCode soapFaultCode) throws SOAPProcessingException { 66 if (!(soapFaultCode instanceof SOAP11FaultCodeImpl)) { 67 throw new SOAPProcessingException("Expecting SOAP 1.1 implementation of SOAP Fault Code. But received some other implementation"); 68 } 69 super.setCode(soapFaultCode); 70 } 71 public void setReason(SOAPFaultReason reason) throws SOAPProcessingException { 72 if (!(reason instanceof SOAP11FaultReasonImpl)) { 73 throw new SOAPProcessingException("Expecting SOAP 1.1 implementation of SOAP Fault Reason. But received some other implementation"); 74 } 75 super.setReason(reason); 76 } 77 public void setNode(SOAPFaultNode node) throws SOAPProcessingException { 79 if (!(node instanceof SOAP11FaultNodeImpl)) { 80 throw new SOAPProcessingException("Expecting SOAP 1.1 implementation of SOAP Fault Node. But received some other implementation"); 81 } 82 super.setNode(node); 83 } 84 public void setRole(SOAPFaultRole role) throws SOAPProcessingException { 85 if (!(role instanceof SOAP11FaultRoleImpl)) { 86 throw new SOAPProcessingException("Expecting SOAP 1.1 implementation of SOAP Fault Role. But received some other implementation"); 87 } 88 super.setRole(role); 89 } 90 91 protected void checkParent(OMElement parent) throws SOAPProcessingException { 92 if (!(parent instanceof SOAP11BodyImpl)) { 93 throw new SOAPProcessingException("Expecting SOAP 1.1 implementation of SOAP Body as the parent. But received some other implementation"); 94 } 95 } 96 97 public void setDetail(SOAPFaultDetail detail) throws SOAPProcessingException { 98 if (!(detail instanceof SOAP11FaultDetailImpl)) { 99 throw new SOAPProcessingException("Expecting SOAP 1.1 implementation of SOAP Fault Detail. But received some other implementation"); 100 } 101 super.setDetail(detail); 102 } 103 104 } 105 | Popular Tags |