Author: nagy
Date: Wed Feb 24 17:42:31 2010
New Revision: 915889
URL: http://svn.apache.org/viewvc?rev=915889&view=rev
Log:
Patch for AXIS2-4632. Added ability for EndpointInterfaceDesc to respect
LegacyWebmethod property if set from Manifest.mf
Contributor: Nikhil Thaker
Modified:
axis/axis2/java/core/trunk/modules/metadata/src/org/apache/axis2/jaxws/description/impl/EndpointInterfaceDescriptionImpl.java
Modified:
axis/axis2/java/core/trunk/modules/metadata/src/org/apache/axis2/jaxws/description/impl/EndpointInterfaceDescriptionImpl.java
URL:
http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/metadata/src/org/apache/axis2/jaxws/description/impl/EndpointInterfaceDescriptionImpl.java?rev=915889&r1=915888&r2=915889&view=diff
==============================================================================
---
axis/axis2/java/core/trunk/modules/metadata/src/org/apache/axis2/jaxws/description/impl/EndpointInterfaceDescriptionImpl.java
(original)
+++
axis/axis2/java/core/trunk/modules/metadata/src/org/apache/axis2/jaxws/description/impl/EndpointInterfaceDescriptionImpl.java
Wed Feb 24 17:42:31 2010
@@ -41,6 +41,7 @@
import javax.xml.namespace.QName;
import org.apache.axis2.AxisFault;
+import org.apache.axis2.context.ConfigurationContext;
import org.apache.axis2.description.AxisOperation;
import org.apache.axis2.description.AxisOperationFactory;
import org.apache.axis2.description.AxisService;
@@ -790,7 +791,7 @@
if (WSToolingUtils.hasValue(getNewRulesFlag())) {
if (newRulesFlag.equalsIgnoreCase("false")) {
if (log.isDebugEnabled()){
- log.debug("EndpointInterfaceDescriptionImpl: System
property USE_LEGACY_WEB_METHOD_RULES set to false" );
+ log.debug("EndpointInterfaceDescriptionImpl: System or
Manifest property USE_LEGACY_WEB_METHOD_RULES set to false" );
}
newSunBehavior =
isNewSunBehavior(MDQConstants.USE_LEGACY_WEB_METHOD_RULES);
}
@@ -868,7 +869,7 @@
return versionValid;
}
- private static String getNewRulesFlag () {
+ private String getNewRulesFlag () {
if (newRulesFlag != null) {
return newRulesFlag;
@@ -878,6 +879,8 @@
newRulesFlag = (String) AccessController.doPrivileged(
new PrivilegedExceptionAction() {
public Object run() {
+ //System property takes precedence over manifest
property.
+ //So first lets check for system property.
return
(System.getProperty(MDQConstants.USE_LEGACY_WEB_METHOD_RULES));
}
});
@@ -887,7 +890,38 @@
log.debug("Exception getting USE_LEGACY_WEB_METHOD_RULES
system property: " +e.getException());
}
}
-
+ //System property not set, so let return the manifest property.
+ if(!WSToolingUtils.hasValue(newRulesFlag)){
+ if (log.isDebugEnabled()){
+ log.debug("EndpointInterfaceDescriptionImpl: system property
'"+MDQConstants.USE_LEGACY_WEB_METHOD_RULES + "' not set" );
+ }
+ ConfigurationContext configContext =
getEndpointDescription().getServiceDescription().getAxisConfigContext();
+ if(configContext!=null){
+ if (log.isDebugEnabled()){
+ log.debug("EndpointInterfaceDescriptionImpl: Reading
Manifest property '"+ MDQConstants.USE_MANIFEST_LEGACY_WEB_METHOD_RULES+"'" );
+ }
+ String param
=(String)configContext.getProperty(MDQConstants.USE_MANIFEST_LEGACY_WEB_METHOD_RULES);
+ if(param == null){
+ if (log.isDebugEnabled()){
+ log.debug("EndpointInterfaceDescriptionImpl: Manifest
property '"+ MDQConstants.USE_MANIFEST_LEGACY_WEB_METHOD_RULES+ "' not set" );
+ }
+ }else{
+ if (log.isDebugEnabled()){
+ log.debug("EndpointInterfaceDescriptionImpl: Manifest
property '"+ MDQConstants.USE_MANIFEST_LEGACY_WEB_METHOD_RULES+ "' is set" );
+ }
+ newRulesFlag = param;
+ }
+ }else{
+ if (log.isDebugEnabled()){
+ log.debug("EndpointInterfaceDescriptionImpl: Unable to
Read Manifest property '"+
MDQConstants.USE_MANIFEST_LEGACY_WEB_METHOD_RULES+"'" );
+ log.debug("EndpointInterfaceDescriptionImpl:
AxisConfigContext was null" );
+ }
+ }
+ }else{
+ if (log.isDebugEnabled()){
+ log.debug("EndpointInterfaceDescriptionImpl: system property
'"+MDQConstants.USE_LEGACY_WEB_METHOD_RULES + "' set" );
+ }
+ }
return newRulesFlag;
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]