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 sa...@apache.org on 2006/01/18 10:30:17 UTC
svn commit: r370090 - in /webservices/axis2/trunk/java/modules:
core/src/org/apache/axis2/deployment/
core/src/org/apache/axis2/description/ core/src/org/apache/axis2/engine/
core/src/org/apache/axis2/transport/http/ core/src/org/apache/axis2/util/
int...
Author: sanka
Date: Wed Jan 18 01:29:49 2006
New Revision: 370090
URL: http://svn.apache.org/viewcvs?rev=370090&view=rev
Log:
Some more refactoring in the Axis* Description classes
Modified:
webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/DeploymentEngine.java
webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/ModuleBuilder.java
webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/AxisDescription.java
webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/AxisService.java
webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/AxisService2WOM.java
webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/AxisServiceGroup.java
webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/InOnlyAxisOperation.java
webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/InOutAxisOperation.java
webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/PolicyInclude.java
webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/engine/AxisConfiguration.java
webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/http/HTTPTransportReceiver.java
webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/http/ListingAgent.java
webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/util/PolicyUtil.java
webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/HandlerFailureTest.java
Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/DeploymentEngine.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/DeploymentEngine.java?rev=370090&r1=370089&r2=370090&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/DeploymentEngine.java (original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/DeploymentEngine.java Wed Jan 18 01:29:49 2006
@@ -208,10 +208,7 @@
axisService.engageModule(module, axisConfig);
}
- HashMap operations = axisService.getOperations();
- Collection opCol = operations.values();
-
- for (Iterator iterator = opCol.iterator(); iterator.hasNext();) {
+ for (Iterator iterator = axisService.getOperations(); iterator.hasNext();) {
AxisOperation opDesc = (AxisOperation) iterator.next();
ArrayList modules = opDesc.getModuleRefs();
Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/ModuleBuilder.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/ModuleBuilder.java?rev=370090&r1=370089&r2=370090&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/ModuleBuilder.java (original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/ModuleBuilder.java Wed Jan 18 01:29:49 2006
@@ -97,14 +97,14 @@
Iterator policyElements = moduleElement.getChildrenWithName(new QName(POLICY_NS_URI, TAG_POLICY));
if (policyElements != null) {
- processPolicyElements(PolicyInclude.MODULE_POLICY, policyElements, module.getPolicyInclude());
+ processPolicyElements(PolicyInclude.AXIS_MODULE_POLICY, policyElements, module.getPolicyInclude());
}
// processing <wsp:PolicyReference> .. </..> elements
Iterator policyRefElements = moduleElement.getChildrenWithName(new QName(POLICY_NS_URI, TAG_POLICY_REF));
if (policyRefElements != null) {
- processPolicyRefElements(PolicyInclude.MODULE_POLICY, policyRefElements, module.getPolicyInclude());
+ processPolicyRefElements(PolicyInclude.AXIS_MODULE_POLICY, policyRefElements, module.getPolicyInclude());
}
// processing Parameters
Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/AxisDescription.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/AxisDescription.java?rev=370090&r1=370089&r2=370090&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/AxisDescription.java (original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/AxisDescription.java Wed Jan 18 01:29:49 2006
@@ -16,13 +16,14 @@
private PolicyInclude policyInclude;
- private HashMap children = new HashMap();
-
+ private HashMap children;
+
public AxisDescription() {
- parameterInclude = new ParameterIncludeImpl();
- policyInclude = new PolicyInclude(this);
- }
-
+ parameterInclude = new ParameterIncludeImpl();
+ policyInclude = new PolicyInclude(this);
+ children = new HashMap();
+ }
+
public void addParameter(Parameter param) throws AxisFault {
if (param == null) {
@@ -62,13 +63,10 @@
&& getParameter(parameterName).isLocked();
}
- public void setParent(AxisDescription parent) {
- this.parent = parent;
- if (parent.getChild(getKey()) == null
- || parent.getChild(getKey()) != this) {
- parent.addChild(this);
- }
- }
+
+ public void setParent(AxisDescription parent) {
+ this.parent = parent;
+ }
public AxisDescription getParent() {
return parent;
@@ -83,11 +81,12 @@
}
public void addChild(AxisDescription child) {
- children.put(child.getKey(), child);
- if (child.getParent() == null || child.getParent() != this) {
- child.setParent(this);
- }
- }
+ children.put(child.getKey(), child);
+ }
+
+ public void addChild(Object key, AxisDescription child) {
+ children.put(key, child);
+ }
public Iterator getChildren() {
return children.values().iterator();
@@ -96,6 +95,10 @@
public AxisDescription getChild(Object key) {
return (AxisDescription) children.get(key);
}
+
+ public void removeChild(Object key) {
+ children.remove(key);
+ }
public abstract Object getKey();
}
Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/AxisService.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/AxisService.java?rev=370090&r1=370089&r2=370090&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/AxisService.java (original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/AxisService.java Wed Jan 18 01:29:49 2006
@@ -24,6 +24,7 @@
import org.apache.axis2.engine.AxisConfiguration;
import org.apache.axis2.engine.MessageReceiver;
import org.apache.axis2.util.PolicyUtil;
+import org.apache.axis2.wsdl.builder.wsdl4j.WSDLPump;
import org.apache.axis2.wsdl.writer.WOMWriter;
import org.apache.axis2.wsdl.writer.WOMWriterFactory;
import org.apache.commons.logging.Log;
@@ -31,6 +32,7 @@
import org.apache.ws.commons.schema.XmlSchema;
import org.apache.wsdl.WSDLConstants;
import org.apache.wsdl.WSDLDescription;
+import org.apache.wsdl.impl.WSDLDescriptionImpl;
import javax.wsdl.Definition;
import javax.wsdl.Port;
@@ -52,7 +54,7 @@
private String fileName = "";
private HashMap operationsAliasesMap = null;
- private HashMap operations = new HashMap();
+// private HashMap operations = new HashMap();
// to store module ref at deploy time parsing
private ArrayList moduleRefs = new ArrayList();
@@ -182,7 +184,8 @@
}
}
- operations.put(axisOperation.getName(), axisOperation);
+// operations.put(axisOperation.getName(), axisOperation);
+ addChild(axisOperation);
operationsAliasesMap.put(axisOperation.getName().getLocalPart(), axisOperation);
}
@@ -251,7 +254,7 @@
// adding module operations
addModuleOperations(moduleref, axisConfig);
- Iterator operations = getOperations().values().iterator();
+ Iterator operations = getOperations();
while (operations.hasNext()) {
AxisOperation axisOperation = (AxisOperation) operations.next();
@@ -282,11 +285,11 @@
}
public void printWSDL(OutputStream out, String serviceURL) throws AxisFault {
- if (getWSDLDefinition() != null) {
- printUsingWSDLDefinition(out, serviceURL);
- } else {
+// if (getWSDLDefinition() != null) {
+// printUsingWSDLDefinition(out, serviceURL);
+// } else {
printUsingWOM(out, serviceURL);
- }
+// }
}
public void printUsingWSDLDefinition(OutputStream out, String serviceURL) throws AxisFault {
@@ -311,14 +314,12 @@
port.addExtensibilityElement(soapAddress);
}
}
-
- WSDLFactory.newInstance().newWSDLWriter().writeWSDL(wsdlDefinition, out);
+
+ WSDLFactory.newInstance().newWSDLWriter().writeWSDL(wsdlDefinition, out);
out.flush();
- } catch (WSDLException e) {
- throw new AxisFault(e);
- } catch (IOException e) {
- throw new AxisFault(e);
- }
+ } catch (Exception e) {
+ throw new AxisFault(e);
+ }
}
public void printUsingWOM(OutputStream out, String serviceURL) throws AxisFault {
@@ -328,7 +329,6 @@
WSDLDescription desc = axisService2WOM.generateWOM();
// populate it with policy information ..
- //TODO : This gives an NPE , Sanka pls fix that
PolicyUtil.populatePolicy(desc, this);
WOMWriter womWriter = WOMWriterFactory.createWriter(WSDLConstants.WSDL_1_1);
@@ -368,7 +368,7 @@
* Gets the control operation which are added by module like RM.
*/
public ArrayList getControlOperations() {
- Iterator op_itr = getOperations().values().iterator();
+ Iterator op_itr = getOperations();
ArrayList operationList = new ArrayList();
while (op_itr.hasNext()) {
@@ -418,7 +418,8 @@
* @return Returns AxisOperation.
*/
public AxisOperation getOperation(QName operationName) {
- AxisOperation axisOperation = (AxisOperation) operations.get(operationName);
+// AxisOperation axisOperation = (AxisOperation) operations.get(operationName);
+ AxisOperation axisOperation = (AxisOperation) getChild(operationName);
if (axisOperation == null) {
axisOperation = (AxisOperation) operationsAliasesMap.get(operationName.getLocalPart());
@@ -454,7 +455,8 @@
return null;
}
- AxisOperation operation = (AxisOperation) operations.get(new QName(soapAction));
+// AxisOperation operation = (AxisOperation) operations.get(new QName(soapAction));
+ AxisOperation operation = (AxisOperation) getChild(new QName(soapAction));
if (operation != null) {
return operation;
@@ -470,8 +472,8 @@
*
* @return Returns HashMap
*/
- public HashMap getOperations() {
- return operations;
+ public Iterator getOperations() {
+ return getChildren();
}
/*
@@ -484,7 +486,7 @@
* Gets only the published operations.
*/
public ArrayList getPublishedOperations() {
- Iterator op_itr = getOperations().values().iterator();
+ Iterator op_itr = getOperations();
ArrayList operationList = new ArrayList();
while (op_itr.hasNext()) {
Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/AxisService2WOM.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/AxisService2WOM.java?rev=370090&r1=370089&r2=370090&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/AxisService2WOM.java (original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/AxisService2WOM.java Wed Jan 18 01:29:49 2006
@@ -137,7 +137,7 @@
portType.setName(new QName(axisService.getName() + "Port"));
- Iterator operations = axisService.getOperations().values().iterator();
+ Iterator operations = axisService.getOperations();
while (operations.hasNext()) {
AxisOperation axisOperation = (AxisOperation) operations.next();
if (axisOperation.isControlOperation()) {
Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/AxisServiceGroup.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/AxisServiceGroup.java?rev=370090&r1=370089&r2=370090&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/AxisServiceGroup.java (original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/AxisServiceGroup.java Wed Jan 18 01:29:49 2006
@@ -50,10 +50,10 @@
/**
* Field services
*/
- private HashMap services;
+// private HashMap services;
public AxisServiceGroup() {
- services = new HashMap();
+// services = new HashMap();
moduleConfigmap = new HashMap();
engagedModules = new ArrayList();
}
@@ -102,7 +102,8 @@
}
service.setLastupdate();
- services.put(service.getName(), service);
+// services.put(service.getName(), service);
+ addChild(service);
}
public void addToengagedModules(QName moduleName) {
@@ -146,7 +147,8 @@
((AxisConfiguration) getParent()).notifyObservers(AxisEvent.SERVICE_DEPLOY, service);
}
- services.remove(name);
+// services.remove(name);
+ removeChild(name);
}
public AxisConfiguration getAxisDescription() {
@@ -166,7 +168,8 @@
}
public AxisService getService(String name) throws AxisFault {
- return (AxisService) services.get(name);
+// return (AxisService) services.get(name);
+ return (AxisService) getChild(name);
}
public ClassLoader getServiceGroupClassLoader() {
@@ -178,7 +181,8 @@
}
public Iterator getServices() {
- return services.values().iterator();
+// return services.values().iterator();
+ return getChildren();
}
public void setAxisDescription(AxisConfiguration axisDescription) {
Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/InOnlyAxisOperation.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/InOnlyAxisOperation.java?rev=370090&r1=370089&r2=370090&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/InOnlyAxisOperation.java (original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/InOnlyAxisOperation.java Wed Jan 18 01:29:49 2006
@@ -4,6 +4,7 @@
import org.apache.axis2.context.MessageContext;
import org.apache.axis2.context.OperationContext;
import org.apache.wsdl.WSDLConstants;
+import org.apache.wsdl.impl.WDSLPropertyImpl;
import javax.xml.namespace.QName;
import java.util.ArrayList;
@@ -15,7 +16,7 @@
*/
public class InOnlyAxisOperation extends AxisOperation {
private AxisMessage inFaultMessage;
- private AxisMessage inMessage;
+// private AxisMessage inMessage;
private AxisMessage outFaultMessage;
// this is just to store the chain , we don't use it
@@ -33,7 +34,8 @@
public void addMessage(AxisMessage message, String label) {
if (WSDLConstants.MESSAGE_LABEL_IN_VALUE.equals(label)) {
- inMessage = message;
+// inMessage = message;
+ addChild("inMessage", message);
} else {
throw new UnsupportedOperationException("Not yet implemented");
}
@@ -50,9 +52,12 @@
}
private void createMessage() {
- inMessage = new AxisMessage();
- inMessage.setDirection(WSDLConstants.WSDL_MESSAGE_DIRECTION_IN);
- inMessage.setParent(this);
+// inMessage = new AxisMessage();
+// inMessage.setDirection(WSDLConstants.WSDL_MESSAGE_DIRECTION_IN);
+// inMessage.setParent(this);
+ AxisMessage inMessage = new AxisMessage();
+ inMessage.setDirection(WSDLConstants.WSDL_MESSAGE_DIRECTION_IN);
+ inMessage.setParent(this);
inFaultMessage = new AxisMessage();
inFaultMessage.setParent(this);
@@ -61,11 +66,14 @@
outFaultMessage.setParent(this);
outPhase = new ArrayList();
+
+ addChild("inMessage", inMessage);
}
public AxisMessage getMessage(String label) {
if (WSDLConstants.MESSAGE_LABEL_IN_VALUE.equals(label)) {
- return inMessage;
+// return inMessage;
+ return (AxisMessage) getChild("inMessage");
} else {
throw new UnsupportedOperationException("In valid acess");
}
@@ -84,7 +92,7 @@
}
public ArrayList getRemainingPhasesInFlow() {
- return inMessage.getMessageFlow();
+ return ((AxisMessage) getChild("inMessage")).getMessageFlow();
}
public void setPhasesInFaultFlow(ArrayList list) {
@@ -100,6 +108,6 @@
}
public void setRemainingPhasesInFlow(ArrayList list) {
- inMessage.setMessageFlow(list);
+ ((AxisMessage) getChild("inMessage")).setMessageFlow(list);
}
}
Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/InOutAxisOperation.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/InOutAxisOperation.java?rev=370090&r1=370089&r2=370090&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/InOutAxisOperation.java (original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/InOutAxisOperation.java Wed Jan 18 01:29:49 2006
@@ -16,9 +16,9 @@
*/
public class InOutAxisOperation extends AxisOperation {
private AxisMessage inFaultMessage;
- private AxisMessage inMessage;
+// private AxisMessage inMessage;
private AxisMessage outFaultMessage;
- private AxisMessage outMessage;
+// private AxisMessage outMessage;
public InOutAxisOperation() {
super();
@@ -32,9 +32,11 @@
public void addMessage(AxisMessage message, String label) {
if (WSDLConstants.MESSAGE_LABEL_OUT_VALUE.equals(label)) {
- outMessage = message;
+// outMessage = message;
+ addChild("outMessage", message);
} else if (WSDLConstants.MESSAGE_LABEL_IN_VALUE.equals(label)) {
- inMessage = message;
+// inMessage = message;
+ addChild("inMessage", message);
} else {
throw new UnsupportedOperationException("Not yet implemented");
}
@@ -60,9 +62,14 @@
}
private void createMessages() {
- inMessage = new AxisMessage();
+// inMessage = new AxisMessage();
+// inMessage.setDirection(WSDLConstants.WSDL_MESSAGE_DIRECTION_IN);
+// inMessage.setParent(this);
+
+ AxisMessage inMessage = new AxisMessage();
inMessage.setDirection(WSDLConstants.WSDL_MESSAGE_DIRECTION_IN);
inMessage.setParent(this);
+ addChild("inMessage", inMessage);
inFaultMessage = new AxisMessage();
inFaultMessage.setParent(this);
@@ -70,16 +77,23 @@
outFaultMessage = new AxisMessage();
outFaultMessage.setParent(this);
- outMessage = new AxisMessage();
+// outMessage = new AxisMessage();
+// outMessage.setDirection(WSDLConstants.WSDL_MESSAGE_DIRECTION_OUT);
+// outMessage.setParent(this);
+
+ AxisMessage outMessage = new AxisMessage();
outMessage.setDirection(WSDLConstants.WSDL_MESSAGE_DIRECTION_OUT);
outMessage.setParent(this);
+ addChild("outMessage", outMessage);
+
+
}
public AxisMessage getMessage(String label) {
if (WSDLConstants.MESSAGE_LABEL_OUT_VALUE.equals(label)) {
- return outMessage;
+ return (AxisMessage) getChild("outMessage");
} else if (WSDLConstants.MESSAGE_LABEL_IN_VALUE.equals(label)) {
- return inMessage;
+ return (AxisMessage) getChild("inMessage");
} else {
throw new UnsupportedOperationException("Not yet implemented");
}
@@ -94,11 +108,11 @@
}
public ArrayList getPhasesOutFlow() {
- return outMessage.getMessageFlow();
+ return ((AxisMessage) getChild("outMessage")).getMessageFlow();
}
public ArrayList getRemainingPhasesInFlow() {
- return inMessage.getMessageFlow();
+ return ((AxisMessage) getChild("inMessage")).getMessageFlow();
}
public void setPhasesInFaultFlow(ArrayList list) {
@@ -110,10 +124,10 @@
}
public void setPhasesOutFlow(ArrayList list) {
- outMessage.setMessageFlow(list);
+ ((AxisMessage) getChild("outMessage")).setMessageFlow(list);
}
public void setRemainingPhasesInFlow(ArrayList list) {
- inMessage.setMessageFlow(list);
+ ((AxisMessage) getChild("inMessage")).setMessageFlow(list);
}
}
Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/PolicyInclude.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/PolicyInclude.java?rev=370090&r1=370089&r2=370090&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/PolicyInclude.java (original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/PolicyInclude.java Wed Jan 18 01:29:49 2006
@@ -28,36 +28,36 @@
public static final String ANON_POLICY = "anonymous";
public static final int AXIS_POLICY = 1;
+
+ public static final int AXIS_MODULE_POLICY = 2;
- public static final int AXIS_SERVICE_POLICY = 2;
+ public static final int AXIS_SERVICE_POLICY = 3;
- public static final int AXIS_OPERATION_POLICY = 14;
+ public static final int AXIS_OPERATION_POLICY = 4;
- public static final int AXIS_MESSAGE_POLICY = 15;
+ public static final int AXIS_MESSAGE_POLICY = 5;
- public static final int MODULE_POLICY = 3;
+ public static final int SERVICE_POLICY = 6;
- public static final int SERVICE_POLICY = 3;
+ public static final int PORT_POLICY = 7;
- public static final int PORT_POLICY = 4;
+ public static final int PORT_TYPE_POLICY = 8;
- public static final int PORT_TYPE_POLICY = 5;
+ public static final int BINDING_POLICY = 9;
- public static final int BINDING_POLICY = 6;
+ public static final int OPERATION_POLICY = 10;
- public static final int OPERATION_POLICY = 7;
+ public static final int BINDING_OPERATION_POLICY = 11;
- public static final int BINDING_OPERATION_POLICY = 8;
+ public static final int INPUT_POLICY = 12;
- public static final int INPUT_POLICY = 9;
+ public static final int OUTPUT_POLICY = 13;
- public static final int OUTPUT_POLICY = 10;
+ public static final int BINDING_INPUT_POLICY = 14;
- public static final int BINDING_INPUT_POLICY = 11;
+ public static final int BINDING_OUTPUT_POLICY = 15;
- public static final int BINDING_OUTPUT_POLICY = 12;
-
- public static final int MESSAGE_POLICY = 13;
+ public static final int MESSAGE_POLICY = 16;
private Policy policy = null;
Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/engine/AxisConfiguration.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/engine/AxisConfiguration.java?rev=370090&r1=370089&r2=370090&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/engine/AxisConfiguration.java (original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/engine/AxisConfiguration.java Wed Jan 18 01:29:49 2006
@@ -52,7 +52,7 @@
//to store mapping between default version to module name
private final HashMap nameToverionMap = new HashMap();
- private final HashMap serviceGroups = new HashMap();
+// private final HashMap serviceGroups = new HashMap();
private final HashMap transportsIn = new HashMap();
private final HashMap transportsOut = new HashMap();
@@ -188,7 +188,7 @@
while (services.hasNext()) {
description = (AxisService) services.next();
if (description.isUseDefaultChains()) {
- Iterator operations = description.getOperations().values().iterator();
+ Iterator operations = description.getOperations();
while (operations.hasNext()) {
AxisOperation operation = (AxisOperation) operations.next();
phasesinfo.setOperationPhases(operation);
@@ -205,7 +205,8 @@
axisServiceGroup.engageModule(getModule(moduleName));
}
- serviceGroups.put(axisServiceGroup.getServiceGroupName(), axisServiceGroup);
+// serviceGroups.put(axisServiceGroup.getServiceGroupName(), axisServiceGroup);
+ addChild(axisServiceGroup);
}
/**
@@ -495,11 +496,13 @@
}
public AxisServiceGroup getServiceGroup(String serviceNameAndGroupString) {
- return (AxisServiceGroup) serviceGroups.get(serviceNameAndGroupString);
+// return (AxisServiceGroup) serviceGroups.get(serviceNameAndGroupString);
+ return (AxisServiceGroup) getChild(serviceNameAndGroupString);
}
public Iterator getServiceGroups() {
- return serviceGroups.values().iterator();
+// return serviceGroups.values().iterator();
+ return getChildren();
}
// to get all the services in the system
@@ -543,18 +546,6 @@
public boolean isEngaged(QName moduleName) {
return engagedModules.contains(moduleName);
- }
-
- /**
- * Checks whether a given parameter is locked.
- *
- * @param parameterName
- * @return Returns boolean.
- */
- public boolean isParameterLocked(String parameterName) {
- Parameter parameter = getParameter(parameterName);
-
- return (parameter != null) && parameter.isLocked();
}
public void setGlobalOutPhase(ArrayList outPhases) {
Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/http/HTTPTransportReceiver.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/http/HTTPTransportReceiver.java?rev=370090&r1=370089&r2=370090&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/http/HTTPTransportReceiver.java (original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/http/HTTPTransportReceiver.java Wed Jan 18 01:29:49 2006
@@ -335,19 +335,18 @@
temp += "<h2>" + "Deployed services" + "</h2>";
for (Iterator it = serviceCollection.iterator(); it.hasNext();) {
- Map operations;
- Collection operationsList;
- AxisService axisService = (AxisService) it.next();
+
+ AxisService axisService = (AxisService) it.next();
- operations = axisService.getOperations();
- operationsList = operations.values();
+ Iterator iterator = axisService.getOperations();
+
temp += "<h3><a href=\""+ axisService.getName() + "?wsdl\">"+ axisService.getName() + "</a></h3>";
- if (operationsList.size() > 0) {
+ if (iterator.hasNext()) {
temp += "Available operations <ul>";
- for (Iterator iterator1 = operationsList.iterator(); iterator1.hasNext();) {
- AxisOperation axisOperation = (AxisOperation) iterator1.next();
+ for (; iterator.hasNext();) {
+ AxisOperation axisOperation = (AxisOperation) iterator.next();
temp += "<li>" + axisOperation.getName().getLocalPart() + "</li>";
}
Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/http/ListingAgent.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/http/ListingAgent.java?rev=370090&r1=370089&r2=370090&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/http/ListingAgent.java (original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/http/ListingAgent.java Wed Jan 18 01:29:49 2006
@@ -121,10 +121,7 @@
service.addParameter(new ParameterImpl(parameter.getName(), para));
}
- HashMap operation = service.getOperations();
- Collection op_col = operation.values();
-
- for (Iterator iterator = op_col.iterator(); iterator.hasNext();) {
+ for (Iterator iterator = service.getOperations(); iterator.hasNext();) {
AxisOperation axisOperation = (AxisOperation) iterator.next();
String op_name = axisOperation.getName().getLocalPart();
ArrayList operation_para = axisOperation.getParameters();
Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/util/PolicyUtil.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/util/PolicyUtil.java?rev=370090&r1=370089&r2=370090&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/util/PolicyUtil.java (original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/util/PolicyUtil.java Wed Jan 18 01:29:49 2006
@@ -23,6 +23,7 @@
import org.apache.axis2.description.AxisServiceGroup;
import org.apache.axis2.description.PolicyInclude;
import org.apache.axis2.engine.AxisConfiguration;
+import org.apache.axis2.wsdl.builder.wsdl4j.WSDLPump;
import org.apache.ws.policy.PolicyConstants;
import org.apache.ws.policy.PolicyReference;
import org.apache.wsdl.Component;
@@ -38,13 +39,16 @@
import org.apache.wsdl.extensions.ExtensionConstants;
import org.apache.wsdl.extensions.PolicyExtensibilityElement;
import org.apache.wsdl.extensions.impl.ExtensionFactoryImpl;
+import org.apache.wsdl.impl.WSDLDescriptionImpl;
import org.apache.wsdl.impl.WSDLProcessingException;
+import javax.wsdl.Definition;
import javax.xml.namespace.QName;
import java.util.Iterator;
import java.util.List;
public class PolicyUtil {
+
public static void populatePolicy(WSDLDescription description,
AxisService axisService) {
WSDLService wsdlService = description.getService(new QName(axisService
@@ -60,7 +64,7 @@
axisServiceGroup = (AxisServiceGroup) axisService.getParent();
- if (axisServiceGroup == null) {
+ if (axisServiceGroup != null) {
axisConfiguration = (AxisConfiguration) axisServiceGroup.getParent();
}
@@ -111,8 +115,8 @@
PolicyInclude policyInclude = axisService.getPolicyInclude();
List policyList = policyInclude
.getPolicyElements(PolicyInclude.PORT_TYPE_POLICY);
- addPolicyAsExtAttributes(description, policyList, wsdlInterface,
- policyInclude);
+// addPolicyAsExtAttributes(description, policyList, wsdlInterface,
+// policyInclude);
Iterator wsdlOperations = wsdlInterface.getOperations().values()
.iterator();
Modified: webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/HandlerFailureTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/HandlerFailureTest.java?rev=370090&r1=370089&r2=370090&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/HandlerFailureTest.java (original)
+++ webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/HandlerFailureTest.java Wed Jan 18 01:29:49 2006
@@ -170,7 +170,7 @@
result.serializeAndConsume(XMLOutputFactory.newInstance().createXMLStreamWriter(
System.out));
- fail("the test must fail due to bad service Name");
+ fail("the test must fail due to the intentional failure of the \"culprit\" handler");
} catch (AxisFault e) {
log.info(e.getMessage());
String message = e.getMessage();