Andreas Veithen created AXIS-2881:
-------------------------------------
Summary: Reduce coupling between org.apache.axis.client.Stub and
generated code
Key: AXIS-2881
URL: https://issues.apache.org/jira/browse/AXIS-2881
Project: Axis
Issue Type: Task
Components: Basic Architecture
Reporter: Andreas Veithen
Priority: Minor
Fix For: 1.5
org.apache.axis.client.Stub has several protected attributes that are set using
methods declared by Stub and that are used in the generated code to configure
the Call. The generated code looks as follows (see the createCall method):
org.apache.axis.client.Call _call = super._createCall();
if (super.maintainSessionSet) {
_call.setMaintainSession(super.maintainSession);
}
if (super.cachedUsername != null) {
_call.setUsername(super.cachedUsername);
}
if (super.cachedPassword != null) {
_call.setPassword(super.cachedPassword);
}
if (super.cachedEndpoint != null) {
_call.setTargetEndpointAddress(super.cachedEndpoint);
}
if (super.cachedTimeout != null) {
_call.setTimeout(super.cachedTimeout);
}
if (super.cachedPortName != null) {
_call.setPortName(super.cachedPortName);
}
java.util.Enumeration keys = super.cachedProperties.keys();
while (keys.hasMoreElements()) {
java.lang.String key = (java.lang.String) keys.nextElement();
_call.setProperty(key, super.cachedProperties.get(key));
}
This code could actually be included in Stub#_createCall (as noted in a TODO
item in that method), and the attributes in the Stub class could be made
private. This would reduce the coupling between the Stub class and the
generated code. E.g. the usage of java.net.URL as the type of the
cachedEndpoint attribute causes issues for non-HTTP URLs because of the
requirement to configure a custom URLStreamHandler. This could be easily fixed
by replacing java.net.URL with java.net.URI (or String). However, because of
the strong coupling with the generated code, this is not possible without
breaking compatibility with code generated by previous Axis versions. Therefore
this can only be changed in the next major release.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]