Details
-
Task
-
Status: Open
-
Minor
-
Resolution: Unresolved
-
None
-
None
Description
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)
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())
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.