You are viewing a plain text version of this content. The canonical link for it is here.
Posted to axis-cvs@ws.apache.org by de...@apache.org on 2005/05/20 08:06:32 UTC
svn commit: r171065 - in /webservices/axis/trunk/java/modules/core:
src/org/apache/axis/deployment/ src/org/apache/axis/description/
src/org/apache/axis/engine/ src/org/apache/axis/phaseresolver/
test/org/apache/axis/phaserule/
Author: deepal
Date: Thu May 19 23:06:31 2005
New Revision: 171065
URL: http://svn.apache.org/viewcvs?rev=171065&view=rev
Log:
fixing phase rule test case and Transport phases
Modified:
webservices/axis/trunk/java/modules/core/src/org/apache/axis/deployment/DeploymentParser.java
webservices/axis/trunk/java/modules/core/src/org/apache/axis/description/TransportInDescription.java
webservices/axis/trunk/java/modules/core/src/org/apache/axis/description/TransportOutDescription.java
webservices/axis/trunk/java/modules/core/src/org/apache/axis/engine/Phase.java
webservices/axis/trunk/java/modules/core/src/org/apache/axis/phaseresolver/PhaseHolder.java
webservices/axis/trunk/java/modules/core/src/org/apache/axis/phaseresolver/PhaseResolver.java
webservices/axis/trunk/java/modules/core/test/org/apache/axis/phaserule/InvalidPhaseRuleTest.java
webservices/axis/trunk/java/modules/core/test/org/apache/axis/phaserule/PhaseRuleTest.java
webservices/axis/trunk/java/modules/core/test/org/apache/axis/phaserule/PreDispatchPhaseRuleTest.java
Modified: webservices/axis/trunk/java/modules/core/src/org/apache/axis/deployment/DeploymentParser.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/org/apache/axis/deployment/DeploymentParser.java?rev=171065&r1=171064&r2=171065&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/org/apache/axis/deployment/DeploymentParser.java (original)
+++ webservices/axis/trunk/java/modules/core/src/org/apache/axis/deployment/DeploymentParser.java Thu May 19 23:06:31 2005
@@ -365,12 +365,10 @@
axisService.addParameter(parameter);
//axisService. .appParameter(parameter);
} else if (TYPEMAPPINGST.equals(ST)) {
- throw new UnsupportedOperationException();
- // todo this should implemnt latter
+ throw new UnsupportedOperationException("Type mapping dose not implemented yet ");
// processTypeMapping();
} else if (BEANMAPPINGST.equals(ST)) {
- throw new UnsupportedOperationException();
- // todo this should implemnt latter
+ throw new UnsupportedOperationException("Bean mapping dose not implemented yet ");
// processBeanMapping();
} else if (OPRATIONST.equals(ST)) {
OperationDescription operation = processOperation();
@@ -458,7 +456,6 @@
boolean END_PARAMETER = false;
String element = ""; // to store the paramater elemnt
- //todo this should change to support xsdany
try {
while (!END_PARAMETER) {
int eventType = pullparser.next();
@@ -518,8 +515,6 @@
} else {
ref_name = true;
throw new UnsupportedOperationException("This should be implmented");
- //TODO implement this
-
}
}
}
@@ -595,8 +590,6 @@
*
*/
public void processTypeMapping() throws DeploymentException {
- //todo complete this method
- // and modify to return a type mapping object
boolean END_TYPEMAPPING = false;
try {
while (!END_TYPEMAPPING) {
@@ -689,8 +682,6 @@
} else {
throw new UnsupportedOperationException(attname + " is not allowed in messageRecievr element");
}
- } else {
- //todo if user dose not specify the messageReciever then the defaullt one has to be used
}
}
@@ -719,8 +710,6 @@
*
*/
public void processBeanMapping() throws DeploymentException {
- //todo complete this method
- // and modify to return a type mapping object
boolean END_BEANMAPPING = false;
try {
while (!END_BEANMAPPING) {
@@ -766,13 +755,14 @@
if (ref_name) {
throw new DeploymentException("Module canot have both name and ref " + attvalue);
} else {
- //TODO implement this , boz this is not complete
// module.setRef(attvalue);
ref_name = true;
throw new UnsupportedOperationException("This should be implemented");
}
}
}
+ } if(!foundClass) {
+ throw new DeploymentException("Module Implemantation class dose not found");
}
boolean END_MODULE = false;
try {
@@ -802,7 +792,6 @@
} else {
throw new UnsupportedOperationException(ST + "elment is not allowed in module.xml");
}
- //todo has to be implemnt this
// complete implenatation
} else if (eventType == XMLStreamConstants.END_ELEMENT) {
String endtagname = pullparser.getLocalName();
@@ -1053,7 +1042,7 @@
throw new DeploymentException("parser Exception : un supported element" + ST);
}
//processStartElement();
- break;//todo this has to be chenfed only for testng
+ break;
}
}
} catch (XMLStreamException e) {
Modified: webservices/axis/trunk/java/modules/core/src/org/apache/axis/description/TransportInDescription.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/org/apache/axis/description/TransportInDescription.java?rev=171065&r1=171064&r2=171065&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/org/apache/axis/description/TransportInDescription.java (original)
+++ webservices/axis/trunk/java/modules/core/src/org/apache/axis/description/TransportInDescription.java Thu May 19 23:06:31 2005
@@ -18,6 +18,8 @@
import javax.xml.namespace.QName;
import org.apache.axis.transport.TransportListener;
+import org.apache.axis.engine.Phase;
+import org.apache.axis.phaseresolver.PhaseMetadata;
/**
* Represents a transport deployed in AXis2
@@ -51,6 +53,15 @@
protected TransportListener reciever;
+ //to store handler in inFlow
+ private Phase inPhase ;
+ //to store handler Fault in inFlow
+ private Phase faultPhase ;
+
+
+
+
+
/**
* Constructor AxisTransport
*
@@ -59,6 +70,8 @@
public TransportInDescription(QName name) {
paramInclude = new ParameterIncludeImpl();
this.name = name;
+ inPhase = new Phase(PhaseMetadata.TRANSPORT_PHASE);
+ faultPhase = new Phase(PhaseMetadata.TRANSPORT_PHASE);
}
/**
@@ -121,6 +134,22 @@
*/
public void setReciver(TransportListener receiver) {
reciever = receiver;
+ }
+
+ public Phase getInPhase() {
+ return inPhase;
+ }
+
+ public void setInPhase(Phase inPhase) {
+ this.inPhase = inPhase;
+ }
+
+ public Phase getFaultPhase() {
+ return faultPhase;
+ }
+
+ public void setFaultPhase(Phase faultPhase) {
+ this.faultPhase = faultPhase;
}
}
Modified: webservices/axis/trunk/java/modules/core/src/org/apache/axis/description/TransportOutDescription.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/org/apache/axis/description/TransportOutDescription.java?rev=171065&r1=171064&r2=171065&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/org/apache/axis/description/TransportOutDescription.java (original)
+++ webservices/axis/trunk/java/modules/core/src/org/apache/axis/description/TransportOutDescription.java Thu May 19 23:06:31 2005
@@ -18,6 +18,8 @@
import javax.xml.namespace.QName;
import org.apache.axis.transport.TransportSender;
+import org.apache.axis.engine.Phase;
+import org.apache.axis.phaseresolver.PhaseMetadata;
/**
* Represents a transport deployed in AXis2
@@ -40,7 +42,8 @@
*/
private Flow faultFlow;
-
+ private Phase outPhase;
+ private Phase faultPhase;
/**
* Field name
@@ -58,6 +61,8 @@
public TransportOutDescription(QName name) {
paramInclude = new ParameterIncludeImpl();
this.name = name;
+ outPhase = new Phase(PhaseMetadata.TRANSPORT_PHASE);
+ faultPhase = new Phase(PhaseMetadata.TRANSPORT_PHASE);
}
/**
@@ -124,6 +129,22 @@
public void setFaultFlow(Flow faultFlow) {
this.faultFlow = faultFlow;
+ }
+
+ public Phase getOutPhase() {
+ return outPhase;
+ }
+
+ public void setOutPhase(Phase outPhase) {
+ this.outPhase = outPhase;
+ }
+
+ public Phase getFaultPhase() {
+ return faultPhase;
+ }
+
+ public void setFaultPhase(Phase faultPhase) {
+ this.faultPhase = faultPhase;
}
}
Modified: webservices/axis/trunk/java/modules/core/src/org/apache/axis/engine/Phase.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/org/apache/axis/engine/Phase.java?rev=171065&r1=171064&r2=171065&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/org/apache/axis/engine/Phase.java (original)
+++ webservices/axis/trunk/java/modules/core/src/org/apache/axis/engine/Phase.java Thu May 19 23:06:31 2005
@@ -429,10 +429,10 @@
for (int i = 0; i < handlers.size(); i++) {
Handler temphandler = (Handler) handlers.get(i);
if (handler.getHandlerDesc().getRules().getAfter().equals(
- temphandler.getName().getLocalPart())) {
+ temphandler.getHandlerDesc().getName().getLocalPart())) {
after = i;
} else if (handler.getHandlerDesc().getRules().getBefore().equals(
- temphandler.getName().getLocalPart())) {
+ temphandler.getHandlerDesc().getName().getLocalPart())) {
before = i;
}
if ((after >= 0) && (before >= 0)) {
@@ -440,7 +440,7 @@
if (after > before) {
//TODO fix me Deepal , (have to check this)
throw new PhaseException("incorrect handler order for "
- + handler.getName());
+ + handler.getHandlerDesc().getName());
} else {
if (after + 1 <= handlers.size()) {
handlers.add(after + 1, handler);
Modified: webservices/axis/trunk/java/modules/core/src/org/apache/axis/phaseresolver/PhaseHolder.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/org/apache/axis/phaseresolver/PhaseHolder.java?rev=171065&r1=171064&r2=171065&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/org/apache/axis/phaseresolver/PhaseHolder.java (original)
+++ webservices/axis/trunk/java/modules/core/src/org/apache/axis/phaseresolver/PhaseHolder.java Thu May 19 23:06:31 2005
@@ -15,12 +15,12 @@
*/
package org.apache.axis.phaseresolver;
-import java.util.ArrayList;
-
import org.apache.axis.description.HandlerDescription;
-import org.apache.axis.description.TransportInDescription;
+import org.apache.axis.engine.Handler;
import org.apache.axis.engine.Phase;
+import java.util.ArrayList;
+
/**
* This class hold all the phases found in the service.xml and server.xml
@@ -34,6 +34,9 @@
this.phaseList = phases;
}
+ public PhaseHolder() {
+ }
+
/**
* Method isPhaseExist
*
@@ -67,6 +70,7 @@
+ " dose not exit in server.xml or refering to phase in diffrent flow");
}
}
+
/**
* this method is used to get the actual phase object given in the phase array list
*
@@ -83,138 +87,34 @@
return null;
}
-
- public void buildTransportChain(TransportInDescription trnsport, int chainType)
- throws PhaseException {
- /*try {
- HandlerDescription[] handlers;
+ /**
+ * This method is to build the transport phase , here load the corresponding handlers and added them
+ * in to correct phase
+ * @param phase
+ * @param handlers
+ * @throws PhaseException
+ */
+ public void buildTransportHandlerChain(Phase phase, ArrayList handlers) throws PhaseException {
+ try {
Class handlerClass = null;
Handler handler;
- switch (chainType) {
- case PhaseMetadata.IN_FLOW:
- {
- ArrayList inChain = new ArrayList();
- for (int i = 0; i < phasemetadatholder.size(); i++) {
- PhaseMetadata phase =
- (PhaseMetadata) phasemetadatholder.get(i);
- Phase axisPhase = new Phase(phase.getName());
- handlers = phase.getOrderedHandlers();
- for (int j = 0; j < handlers.length; j++) {
- try {
- handlerClass = Class.forName(handlers[j].getClassName(), true,
- Thread.currentThread().getContextClassLoader());
- handler =
- (Handler) handlerClass.newInstance();
- handler.init(handlers[j]);
- handlers[j].setHandler(handler);
- axisPhase.addHandler(handlers[j].getHandler());
- } catch (ClassNotFoundException e) {
- throw new PhaseException(e);
- } catch (IllegalAccessException e) {
- throw new PhaseException(e);
- } catch (InstantiationException e) {
- throw new PhaseException(e);
- }
- }
- inChain.add(axisPhase);
- }
- trnsport.setPhases(inChain, AxisConfiguration.INFLOW);
- break;
- }
- case PhaseMetadata.OUT_FLOW:
- {
- ArrayList outChain = new ArrayList();
- for (int i = 0; i < phasemetadatholder.size(); i++) {
- PhaseMetadata phase =
- (PhaseMetadata) phasemetadatholder.get(i);
- Phase axisPhase = new Phase(phase.getName());
- handlers = phase.getOrderedHandlers();
- for (int j = 0; j < handlers.length; j++) {
- try {
- handlerClass = Class.forName(handlers[j].getClassName(), true,
- Thread.currentThread().getContextClassLoader());
- handler =
- (Handler) handlerClass.newInstance();
- handler.init(handlers[j]);
- handlers[j].setHandler(handler);
- axisPhase.addHandler(handlers[j].getHandler());
- } catch (ClassNotFoundException e) {
- throw new PhaseException(e);
- } catch (IllegalAccessException e) {
- throw new PhaseException(e);
- } catch (InstantiationException e) {
- throw new PhaseException(e);
- }
- }
- outChain.add(axisPhase);
- }
- trnsport.setPhases(outChain, AxisConfiguration.OUTFLOW);
- break;
- }
- case PhaseMetadata.FAULT_IN_FLOW:
- {
- ArrayList faultChain = new ArrayList();
- for (int i = 0; i < phasemetadatholder.size(); i++) {
- PhaseMetadata phase =
- (PhaseMetadata) phasemetadatholder.get(i);
- Phase axisPhase = new Phase(phase.getName());
- handlers = phase.getOrderedHandlers();
- for (int j = 0; j < handlers.length; j++) {
- try {
- handlerClass = Class.forName(handlers[j].getClassName(), true,
- Thread.currentThread().getContextClassLoader());
- handler =
- (Handler) handlerClass.newInstance();
- handler.init(handlers[j]);
- handlers[j].setHandler(handler);
- axisPhase.addHandler(handlers[j].getHandler());
- } catch (ClassNotFoundException e) {
- throw new PhaseException(e);
- } catch (IllegalAccessException e) {
- throw new PhaseException(e);
- } catch (InstantiationException e) {
- throw new PhaseException(e);
- }
- }
- faultChain.add(axisPhase);
- }
- trnsport.setPhases(faultChain, AxisConfiguration.FAULT_IN_FLOW);
- break;
- }
- case PhaseMetadata.FAULT_OUT_FLOW:
- {
- ArrayList faultChain = new ArrayList();
- for (int i = 0; i < phasemetadatholder.size(); i++) {
- PhaseMetadata phase =
- (PhaseMetadata) phasemetadatholder.get(i);
- Phase axisPhase = new Phase(phase.getName());
- handlers = phase.getOrderedHandlers();
- for (int j = 0; j < handlers.length; j++) {
- try {
- handlerClass = Class.forName(handlers[j].getClassName(), true,
- Thread.currentThread().getContextClassLoader());
- handler =
- (Handler) handlerClass.newInstance();
- handler.init(handlers[j]);
- handlers[j].setHandler(handler);
- axisPhase.addHandler(handlers[j].getHandler());
- } catch (ClassNotFoundException e) {
- throw new PhaseException(e);
- } catch (IllegalAccessException e) {
- throw new PhaseException(e);
- } catch (InstantiationException e) {
- throw new PhaseException(e);
- }
- }
- faultChain.add(axisPhase);
- }
- trnsport.setPhases(faultChain, AxisConfiguration.FAULT_OUT_FLOW);
- break;
- }
+ for (int i = 0; i < handlers.size(); i++) {
+ HandlerDescription description = (HandlerDescription) handlers.get(i);
+ handlerClass = Class.forName(description.getClassName(), true,
+ Thread.currentThread().getContextClassLoader());
+ handler =
+ (Handler) handlerClass.newInstance();
+ handler.init(description);
+ description.setHandler(handler);
+ phase.addHandler(description.getHandler());
}
- } catch (AxisFault e) {
+ } catch (ClassNotFoundException e) {
throw new PhaseException(e);
- }*/
+ } catch (InstantiationException e) {
+ throw new PhaseException(e);
+ } catch (IllegalAccessException e) {
+ throw new PhaseException(e);
+ }
}
}
Modified: webservices/axis/trunk/java/modules/core/src/org/apache/axis/phaseresolver/PhaseResolver.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/org/apache/axis/phaseresolver/PhaseResolver.java?rev=171065&r1=171064&r2=171065&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/org/apache/axis/phaseresolver/PhaseResolver.java (original)
+++ webservices/axis/trunk/java/modules/core/src/org/apache/axis/phaseresolver/PhaseResolver.java Thu May 19 23:06:31 2005
@@ -278,54 +278,55 @@
* @throws PhaseException
*/
public void buildTranspotsChains() throws PhaseException {
- //TODO Fix me Deepal
-// HashMap axisTransportIn = axisConfig.getTransportsIn();
-// HashMap axisTransportOut = axisConfig.getTransportsOut();
-//
-// Collection colintrnsport = axisTransportIn.values();
-// for (Iterator iterator = colintrnsport.iterator();
-// iterator.hasNext();) {
-// TransportInDescription transport = (TransportInDescription) iterator.next();
-// buildINTransportChains(transport);
-// }
-//
-// Collection colouttrnsport = axisTransportOut.values();
-// for (Iterator iterator = colouttrnsport.iterator();
-// iterator.hasNext();) {
-// TransportOutDescription transport = (TransportOutDescription) iterator.next();
-// buildOutTransportChains(transport);
-// }
+ HashMap axisTransportIn = axisConfig.getTransportsIn();
+ HashMap axisTransportOut = axisConfig.getTransportsOut();
+
+ Collection colintrnsport = axisTransportIn.values();
+ for (Iterator iterator = colintrnsport.iterator();
+ iterator.hasNext();) {
+ TransportInDescription transport = (TransportInDescription) iterator.next();
+ buildINTransportChains(transport);
+ }
+
+ Collection colouttrnsport = axisTransportOut.values();
+ for (Iterator iterator = colouttrnsport.iterator();
+ iterator.hasNext();) {
+ TransportOutDescription transport = (TransportOutDescription) iterator.next();
+ buildOutTransportChains(transport);
+ }
}
private void buildINTransportChains(TransportInDescription transport)
throws PhaseException {
Flow flow = null;
+ Phase phase = null;
for (int type = 1; type < 4; type++) {
switch (type) {
case PhaseMetadata.IN_FLOW:
{
flow = transport.getInFlow();
+ phase = transport.getInPhase();
break;
}
case PhaseMetadata.FAULT_IN_FLOW:
{
flow = transport.getFaultFlow();
+ phase = transport.getFaultPhase();
break;
}
}
if (flow != null) {
- ArrayList phaseList = new ArrayList();
- phaseList.add(new Phase(PhaseMetadata.TRANSPORT_PHASE));
- phaseHolder = new PhaseHolder(phaseList);
+ ArrayList handlers = new ArrayList();
for (int j = 0; j < flow.getHandlerCount(); j++) {
HandlerDescription metadata = flow.getHandler(j);
metadata.getRules().setPhaseName(PhaseMetadata.TRANSPORT_PHASE);
- phaseHolder.addHandler(metadata);
- phaseHolder.addHandler(metadata);
+ handlers.add(metadata);
}
+ new PhaseHolder().buildTransportHandlerChain(phase, handlers);
+ }else {
+ continue;
}
- phaseHolder.buildTransportChain(transport, type);
}
}
@@ -339,31 +340,33 @@
private void buildOutTransportChains(TransportOutDescription transport)
throws PhaseException {
Flow flow = null;
+ Phase phase = null;
for (int type = 1; type < 5; type++) {
switch (type) {
case PhaseMetadata.OUT_FLOW:
{
flow = transport.getOutFlow();
+ phase = transport.getOutPhase();
break;
}
case PhaseMetadata.FAULT_OUT_FLOW:
{
flow = transport.getFaultFlow();
+ phase = transport.getFaultPhase();
break;
}
}
- if (flow != null) {
- ArrayList phaseList = new ArrayList();
- phaseList.add(new Phase(PhaseMetadata.TRANSPORT_PHASE));
- phaseHolder = new PhaseHolder(phaseList);
+ if (flow != null) {
+ ArrayList handlers = new ArrayList();
for (int j = 0; j < flow.getHandlerCount(); j++) {
HandlerDescription metadata = flow.getHandler(j);
metadata.getRules().setPhaseName(PhaseMetadata.TRANSPORT_PHASE);
- phaseHolder.addHandler(metadata);
+ handlers.add(metadata);
}
+ new PhaseHolder().buildTransportHandlerChain(phase, handlers);
+ }else {
+ continue;
}
- //TODO fix Me Deepal
- //phaseHolder.buildTransportChain(transport, type);
}
}
Modified: webservices/axis/trunk/java/modules/core/test/org/apache/axis/phaserule/InvalidPhaseRuleTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/test/org/apache/axis/phaserule/InvalidPhaseRuleTest.java?rev=171065&r1=171064&r2=171065&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/core/test/org/apache/axis/phaserule/InvalidPhaseRuleTest.java (original)
+++ webservices/axis/trunk/java/modules/core/test/org/apache/axis/phaserule/InvalidPhaseRuleTest.java Thu May 19 23:06:31 2005
@@ -1,12 +1,12 @@
package org.apache.axis.phaserule;
import org.apache.axis.AbstractTestCase;
+import org.apache.axis.phaseresolver.PhaseHolder;
import org.apache.axis.description.HandlerDescription;
import org.apache.axis.description.PhaseRule;
import org.apache.axis.engine.AxisConfiguration;
import org.apache.axis.engine.AxisConfigurationImpl;
import org.apache.axis.engine.Handler;
-import org.apache.axis.phaseresolver.PhaseHolder;
import javax.xml.namespace.QName;
import java.util.ArrayList;
Modified: webservices/axis/trunk/java/modules/core/test/org/apache/axis/phaserule/PhaseRuleTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/test/org/apache/axis/phaserule/PhaseRuleTest.java?rev=171065&r1=171064&r2=171065&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/core/test/org/apache/axis/phaserule/PhaseRuleTest.java (original)
+++ webservices/axis/trunk/java/modules/core/test/org/apache/axis/phaserule/PhaseRuleTest.java Thu May 19 23:06:31 2005
@@ -33,12 +33,14 @@
axisSytem = new AxisConfigurationImpl();
ArrayList inPhase = axisSytem.getInPhasesUptoAndIncludingPostDispatch();
- Handler han = null;//(Handler)Class.forName("org.apache.axis.handlers.AbstractHandler").newInstance();
+ Handler han = null;//(Handler)Class.forName("org.apache.axis.handlers.AbstractHandler",true, Thread.currentThread().getContextClassLoader()).newInstance();
PhaseHolder ph = new PhaseHolder(inPhase);
HandlerDescription hm = new HandlerDescription();
hm.setClassName("org.apache.axis.handlers.AbstractHandler");
- hm.setHandler(han);
+ Handler h1 = new PhaseRuleHandlers();
+ h1.init(hm);
+ hm.setHandler(h1);
hm.setName(new QName("H1"));
PhaseRule rule = new PhaseRule();
rule.setPhaseName("PreDispatch");
@@ -48,7 +50,9 @@
HandlerDescription hm1 = new HandlerDescription();
hm1.setClassName("org.apache.axis.handlers.AbstractHandler");
- hm1.setHandler(han);
+ Handler h2 = new PhaseRuleHandlers();
+ h2.init(hm1);
+ hm1.setHandler(h2);
hm1.setName(new QName("H2"));
PhaseRule rule1 = new PhaseRule();
rule1.setPhaseName("PreDispatch");
@@ -58,7 +62,9 @@
HandlerDescription hm2 = new HandlerDescription();
hm2.setClassName("org.apache.axis.handlers.AbstractHandler");
- hm2.setHandler(han);
+ Handler h3 = new PhaseRuleHandlers();
+ h3.init(hm2);
+ hm2.setHandler(h3);
hm2.setName(new QName("H3"));
PhaseRule rule2 = new PhaseRule();
rule2.setPhaseName("PreDispatch");
@@ -69,7 +75,9 @@
HandlerDescription hm3 = new HandlerDescription();
hm3.setClassName("org.apache.axis.handlers.AbstractHandler");
- hm3.setHandler(han);
+ Handler h4 = new PhaseRuleHandlers();
+ h4.init(hm3);
+ hm3.setHandler(h4);
hm3.setName(new QName("H4"));
PhaseRule rule3 = new PhaseRule();
rule3.setPhaseName("Dispatch");
Modified: webservices/axis/trunk/java/modules/core/test/org/apache/axis/phaserule/PreDispatchPhaseRuleTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/test/org/apache/axis/phaserule/PreDispatchPhaseRuleTest.java?rev=171065&r1=171064&r2=171065&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/core/test/org/apache/axis/phaserule/PreDispatchPhaseRuleTest.java (original)
+++ webservices/axis/trunk/java/modules/core/test/org/apache/axis/phaserule/PreDispatchPhaseRuleTest.java Thu May 19 23:06:31 2005
@@ -55,7 +55,9 @@
HandlerDescription pre = new HandlerDescription();
pre.setClassName("org.apache.axis.handlers.AbstractHandler");
- pre.setHandler(han);
+ Handler h1 = new PhaseRuleHandlers();
+ h1.init(pre);
+ pre.setHandler(h1);
pre.setName(new QName("pre-H1"));
PhaseRule pre_rule1 = new PhaseRule();
pre_rule1.setPhaseName("PreDispatch");
@@ -64,7 +66,9 @@
HandlerDescription pre2 = new HandlerDescription();
pre2.setClassName("org.apache.axis.handlers.AbstractHandler");
- pre2.setHandler(han);
+ Handler h2 = new PhaseRuleHandlers();
+ h2.init(pre2);
+ pre2.setHandler(h2);
pre2.setName(new QName("dispatch"));
PhaseRule prerule2 = new PhaseRule();
prerule2.setPhaseName("Dispatch");
@@ -74,7 +78,9 @@
HandlerDescription hm = new HandlerDescription();
hm.setClassName("org.apache.axis.handlers.AbstractHandler");
- hm.setHandler(han);
+ Handler h3 = new PhaseRuleHandlers();
+ h3.init(hm);
+ hm.setHandler(h3);
hm.setName(new QName("pre-H2"));
PhaseRule rule = new PhaseRule();
rule.setPhaseName("PreDispatch");
@@ -84,7 +90,9 @@
HandlerDescription hm1 = new HandlerDescription();
hm1.setClassName("org.apache.axis.handlers.AbstractHandler");
- hm1.setHandler(han);
+ Handler h4 = new PhaseRuleHandlers();
+ h4.init(hm1);
+ hm1.setHandler(h4);
hm1.setName(new QName("pre-H3"));
PhaseRule rule1 = new PhaseRule();
rule1.setPhaseName("PreDispatch");
@@ -94,7 +102,9 @@
HandlerDescription hm2 = new HandlerDescription();
hm2.setClassName("org.apache.axis.handlers.AbstractHandler");
- hm2.setHandler(han);
+ Handler h5 = new PhaseRuleHandlers();
+ h5.init(hm2);
+ hm2.setHandler(h5);
hm2.setName(new QName("H3"));
PhaseRule rule2 = new PhaseRule();
rule2.setPhaseName("PreDispatch");
@@ -105,7 +115,9 @@
HandlerDescription hm3 = new HandlerDescription();
hm3.setClassName("org.apache.axis.handlers.AbstractHandler");
- hm3.setHandler(han);
+ Handler h6 =new PhaseRuleHandlers();
+ h6.init(hm3);
+ hm3.setHandler(h6);
hm3.setName(new QName("H4"));
PhaseRule rule3 = new PhaseRule();
rule3.setPhaseName("PostDispatch");