You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by di...@apache.org on 2006/05/18 05:43:32 UTC
svn commit: r407450 - in
/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2:
deployment/AxisConfigBuilder.java deployment/ModuleBuilder.java
deployment/ServiceBuilder.java description/AxisDescription.java
description/AxisModule.java
Author: dims
Date: Wed May 17 20:43:32 2006
New Revision: 407450
URL: http://svn.apache.org/viewvc?rev=407450&view=rev
Log:
- don't create policy stuff unless needed (lazy init)
- check if the iterators have any content before trying to process it
PS: With these changes, i can get version service to deploy and respond back to a soap request. Only thing that SHOULD and DOES FAIL is if we try to generate a "?wsdl"
Modified:
webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/AxisConfigBuilder.java
webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/ModuleBuilder.java
webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/ServiceBuilder.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/AxisModule.java
Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/AxisConfigBuilder.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/AxisConfigBuilder.java?rev=407450&r1=407449&r2=407450&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/AxisConfigBuilder.java (original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/AxisConfigBuilder.java Wed May 17 20:43:32 2006
@@ -112,7 +112,7 @@
Iterator policyElements = config_element.getChildrenWithName(new QName(POLICY_NS_URI,
TAG_POLICY));
- if (policyElements != null) {
+ if (policyElements != null && policyElements.hasNext()) {
processPolicyElements(PolicyInclude.AXIS_POLICY, policyElements, axisConfig.getPolicyInclude());
}
@@ -120,7 +120,7 @@
Iterator policyRefElements = config_element.getChildrenWithName(new QName(POLICY_NS_URI,
TAG_POLICY_REF));
- if (policyRefElements != null) {
+ if (policyRefElements != null && policyRefElements.hasNext()) {
processPolicyRefElements(PolicyInclude.AXIS_POLICY, policyElements, axisConfig.getPolicyInclude());
}
Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/ModuleBuilder.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/ModuleBuilder.java?rev=407450&r1=407449&r2=407450&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 May 17 20:43:32 2006
@@ -106,14 +106,14 @@
// processing <wsp:Policy> .. </..> elements
Iterator policyElements = moduleElement.getChildrenWithName(new QName(POLICY_NS_URI, TAG_POLICY));
- if (policyElements != null) {
+ if (policyElements != null && policyElements.hasNext()) {
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) {
+ if (policyRefElements != null && policyElements.hasNext()) {
processPolicyRefElements(PolicyInclude.AXIS_MODULE_POLICY, policyRefElements, module.getPolicyInclude());
}
Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/ServiceBuilder.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/ServiceBuilder.java?rev=407450&r1=407449&r2=407450&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/ServiceBuilder.java (original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/ServiceBuilder.java Wed May 17 20:43:32 2006
@@ -154,7 +154,7 @@
Iterator policyElements = service_element.getChildrenWithName(
new QName(POLICY_NS_URI, TAG_POLICY));
- if (policyElements != null) {
+ if (policyElements != null && policyElements.hasNext()) {
processPolicyElements(
PolicyInclude.AXIS_SERVICE_POLICY, policyElements,
service.getPolicyInclude());
@@ -164,7 +164,7 @@
Iterator policyRefElements = service_element.getChildrenWithName(
new QName(POLICY_NS_URI, TAG_POLICY_REF));
- if (policyRefElements != null) {
+ if (policyRefElements != null && policyRefElements.hasNext()) {
processPolicyRefElements(PolicyInclude.AXIS_SERVICE_POLICY,
policyRefElements, service.getPolicyInclude());
}
@@ -428,14 +428,14 @@
// processing <wsp:Policy> .. </..> elements
Iterator policyElements = operation.getChildrenWithName(new QName(POLICY_NS_URI, TAG_POLICY));
- if (policyElements != null) {
+ if (policyElements != null && policyElements.hasNext()) {
processPolicyElements(PolicyInclude.AXIS_OPERATION_POLICY, policyElements, op_descrip.getPolicyInclude());
}
// processing <wsp:PolicyReference> .. </..> elements
Iterator policyRefElements = operation.getChildrenWithName(new QName(POLICY_NS_URI, TAG_POLICY_REF));
- if (policyRefElements != null) {
+ if (policyRefElements != null && policyRefElements.hasNext()) {
processPolicyRefElements(PolicyInclude.AXIS_OPERATION_POLICY, policyRefElements, op_descrip.getPolicyInclude());
}
Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/AxisDescription.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/AxisDescription.java?rev=407450&r1=407449&r2=407450&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 May 17 20:43:32 2006
@@ -15,14 +15,13 @@
private ParameterInclude parameterInclude;
- private PolicyInclude policyInclude;
+ private PolicyInclude policyInclude = null;
private HashMap children;
public AxisDescription() {
parameterInclude = new ParameterIncludeImpl();
- policyInclude = new PolicyInclude(this);
children = new HashMap();
}
@@ -87,6 +86,9 @@
}
public PolicyInclude getPolicyInclude() {
+ if(policyInclude == null) {
+ policyInclude = new PolicyInclude(this);
+ }
return policyInclude;
}
Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/AxisModule.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/AxisModule.java?rev=407450&r1=407449&r2=407450&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/AxisModule.java (original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/AxisModule.java Wed May 17 20:43:32 2006
@@ -66,7 +66,7 @@
/*
* to store policies which are falid for any service for which the module is
*/
- private PolicyInclude policyInclude;
+ private PolicyInclude policyInclude = null;
// Small description about the module
private String moduleDescription;
@@ -78,7 +78,6 @@
*/
public AxisModule() {
operations = new HashMap();
- policyInclude = new PolicyInclude();
}
/**
@@ -255,6 +254,9 @@
}
public PolicyInclude getPolicyInclude() {
+ if(policyInclude == null) {
+ policyInclude = new PolicyInclude();
+ }
return policyInclude;
}