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 "Ravi Kumar (JIRA)" <ax...@ws.apache.org> on 2005/08/09 07:49:36 UTC
[jira] Created: (AXIS-2172) Java2WSDL, stopClasses and Interfaces
Java2WSDL, stopClasses and Interfaces
-------------------------------------
Key: AXIS-2172
URL: http://issues.apache.org/jira/browse/AXIS-2172
Project: Apache Axis
Type: Bug
Components: WSDL processing
Versions: 1.2.1
Environment: all platforms
Reporter: Ravi Kumar
Priority: Critical
For an interface, since getMethods is used instead of getDeclaredMethods, the methods need to be validated against stop classes ....
For instance:
Create a Stateless Session bean with one method
Call Java2Wsdl against it with allowedMethods set to "*"
The wsdl will have get getEJBHome and other lifecycle methods ....
The problem is in JavaServiceDesc..... The getMethods need to be changed
CURRENT
---------------
private Method[] getMethods(Class implClass) {
if (implClass.isInterface()){
// Returns all methods incl inherited
return implClass.getMethods();
} else {
return implClass.getDeclaredMethods();
}
}
CHANGE TO
-----------------
private Method[] getMethods(Class implClass) {
if (implClass.isInterface()){
// BEGIN BORLAND JBUILDER PATCH
// only return methods that are not part of start classes
List methodsList = new ArrayList();
Method[] methods = implClass.getMethods();
if (methods != null) {
for (int i = 0; i < methods.length; i++) {
String declaringClass = methods[i].getDeclaringClass().getName();
if (!declaringClass.startsWith("java.") &&
!declaringClass.startsWith("javax.")) {
methodsList.add(methods[i]);
}
}
}
return (Method[])methodsList.toArray(new Method[]{});
// Returns all methods incl inherited
// return implClass.getMethods();
// END BORLAND JBUILDER PATCH
} else {
return implClass.getDeclaredMethods();
}
}
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
[jira] Resolved: (AXIS-2172) Java2WSDL, stopClasses and Interfaces
Posted by "Davanum Srinivas (JIRA)" <ax...@ws.apache.org>.
[ http://issues.apache.org/jira/browse/AXIS-2172?page=all ]
Davanum Srinivas resolved AXIS-2172:
------------------------------------
Resolution: Fixed
Applied fix.
thanks,
dims
> Java2WSDL, stopClasses and Interfaces
> -------------------------------------
>
> Key: AXIS-2172
> URL: http://issues.apache.org/jira/browse/AXIS-2172
> Project: Apache Axis
> Type: Bug
> Components: WSDL processing
> Versions: 1.2.1
> Environment: all platforms
> Reporter: Ravi Kumar
> Priority: Critical
>
> For an interface, since getMethods is used instead of getDeclaredMethods, the methods need to be validated against stop classes ....
> For instance:
> Create a Stateless Session bean with one method
> Call Java2Wsdl against it with allowedMethods set to "*"
> The wsdl will have get getEJBHome and other lifecycle methods ....
> The problem is in JavaServiceDesc..... The getMethods need to be changed
> CURRENT
> ---------------
> private Method[] getMethods(Class implClass) {
> if (implClass.isInterface()){
> // Returns all methods incl inherited
> return implClass.getMethods();
> } else {
> return implClass.getDeclaredMethods();
> }
> }
> CHANGE TO
> -----------------
> private Method[] getMethods(Class implClass) {
> if (implClass.isInterface()){
> // BEGIN BORLAND JBUILDER PATCH
> // only return methods that are not part of start classes
> List methodsList = new ArrayList();
> Method[] methods = implClass.getMethods();
> if (methods != null) {
> for (int i = 0; i < methods.length; i++) {
> String declaringClass = methods[i].getDeclaringClass().getName();
> if (!declaringClass.startsWith("java.") &&
> !declaringClass.startsWith("javax.")) {
> methodsList.add(methods[i]);
> }
> }
> }
> return (Method[])methodsList.toArray(new Method[]{});
> // Returns all methods incl inherited
> // return implClass.getMethods();
> // END BORLAND JBUILDER PATCH
> } else {
> return implClass.getDeclaredMethods();
> }
> }
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira