1 16 package org.apache.axis2.engine; 17 18 import org.apache.axis2.addressing.EndpointReference; 19 import org.apache.axis2.context.ConfigurationContext; 20 import org.apache.axis2.context.MessageContext; 21 import org.apache.axis2.description.HandlerDescription; 22 import org.apache.axis2.handlers.AbstractHandler; 23 24 import javax.xml.namespace.QName ; 25 26 29 public class DispatchPostConditionsEvaluator extends AbstractHandler implements Handler { 30 33 public static final QName NAME = 34 new QName ("http://axis.ws.apache.org", "DispatchPostConditionsEvaluator"); 35 36 39 private ConfigurationContext engineContext; 40 41 public DispatchPostConditionsEvaluator() { 42 init(new HandlerDescription(NAME)); 43 } 44 45 51 public final void invoke(MessageContext msgctx) throws AxisFault { 52 EndpointReference toEPR = msgctx.getTo(); 53 if (msgctx.getServiceContext() == null) { 54 throw new AxisFault("Service Not found EPR is " + ((toEPR!= null)?toEPR.getAddress():"")); 55 } 56 57 if (msgctx.getServiceContext() != null && msgctx.getOperationContext() == null) { 58 throw new AxisFault("Operation Not found EPR is " + ((toEPR!= null)?toEPR.getAddress():"") + " and WSA Action = "+ msgctx.getWSAAction()); 59 } 60 61 } 62 63 } 64 | Popular Tags |