dispatchable OperationDescription list is incorrect
---------------------------------------------------
Key: AXIS2-3560
URL: https://issues.apache.org/jira/browse/AXIS2-3560
Project: Axis 2.0 (Axis2)
Issue Type: Bug
Components: jaxws
Reporter: Mike Rheinheimer
In the metadata module, the
org.apache.axis2.jaxws.description.impl.OperationDescriptionImpl.isJAXWSAsyncClientMethod()
has some incorrect logic at the end:
CURRENTLY:
if (methodName != null && returnTypeName != null) {
// REVIEW: Not sure the method MUST end with "Async"; I think it
can be customized.
answer = methodName.endsWith("Async")
&& (returnTypeName.equals(Response.class.getName()) ||
returnTypeName.equals(Future.class.getName()));
}
The returnTypeName, however, is always one of the forms:
javax.xml.ws.Response<some.other.MyClass>
java.util.concurrent.Future<some.other.MyClass>
Thus the check for returnTypeName.equals(Response.class.getName()) or
returnTypeName.equals(Future.class.getName()) will ALWAYS FAIL. Not only that,
the placement of the && and || and lack of perentheses means the statement is
interpreted as such:
answer = ( methodName.endsWith("Async")
&& (returnTypeName.equals(Response.class.getName()) ) ||
returnTypeName.equals(Future.class.getName()));
Ok, so the reason I'm not fixing this, is because the change over to this logic:
answer = methodName.endsWith("Async")
&& (((returnTypeName.indexOf(Response.class.getName()) ==
0) ||
returnTypeName.indexOf(Future.class.getName()) == 0));
caused much test breakage.
UNCOMMENT suite.addTestSuite(NonWrapTests.class); in JAXWSTest and fix the
logic in OperationDescriptionImpl.
I'll continue to look at this...
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]