Hi Deepal, I believe the method you are refering to is intended to be used only for Service Enpdoint Interfaces and not service implementations, but I need to double check that. If it is used for service implementations, then on the server side it would only be in the non-DescriptionBuilderComposite path, which is only used for testing and will eventually be removed.
You are correct that, for a service implementation (which does not reference an endpoint interface via @WebService.endpointInterface) then all public methods other than those inherited from java.lang.Object should be exposed. So, for a service implementation, the code you added below would be correct. However, since this particular method is used only for interfaces (and not service implementations) that additional code is not necessary. An important thing to note is that the DescriptionBuilderComposite MUST be used on the server side to construct the ServiceDescription hierachy. In other words, you MUST NOT use a service implementation class to construct the ServiceDescription on the server side (that factory method is for testing only and will eventually be removed). You will see logic within "if (isDBC)" constructs that do the processing you descrbed below for service implementations which do not reference an endpointInterface (with the additional related rules from JSR-181 regarding @WebMethod annotations, method visibility and such). Regarding your last question "And I didnt see in the spce (may be I have missed) saying that all the method should be public in the service impl class , so please point me to the spec where you have such a restriction.", I suspect the above answered your question, but in case not: JSR-181 v2.0 2/27/05, page 13, Section 3.1 "Service Implementation Bean", last bullet says "If the implemtnation bean does not specify a service endpoint interface ... [and other rules regarding @WebMethod omitted] ... all public methods .... will be exposed." So, all methods on a service implementation DO NOT need to be public, but any that are to be exposed as Web Service operations must be public. Thanks, Jeff IBM Software Group - WebSphere Web Services Development Phone: 512-838-4587 or Tie Line 678-4587 Internet e-mail and Sametime ID: [EMAIL PROTECTED] Deepal Jayasinghe <[EMAIL PROTECTED]> 02/19/2007 02:15 AM Please respond to [email protected] To "[email protected]" <[email protected]> cc Subject [Axis2] Issue in metadata module Hi Dev; I went though the metadata module to find out how to create AxisService using a ServiceImpl class there I faced few issues in EndpointInterfaceDescriptionImpl class. - in line 210 there is a method to process operations in the ServiceImpl class and that returns all the method in the class including the method in the java.lang.Object class , so is there a reason for doing that. We can fix that changing the method as follows; private static Method[] getSEIMethods(Class sei) { // Per JSR-181 all methods on the SEI are mapped to operations regardless // of whether they include an @WebMethod annotation. That annotation may // be present to customize the mapping, but is not required (p14) Method[] seiMethods = sei.getMethods(); ArrayList methodList = new ArrayList(); if (sei != null) { for (Method method:seiMethods) { if(method.getDeclaringClass().getName().equals("java.lang.Object")){ continue; } methodList.add(method); if (!Modifier.isPublic(method.getModifiers())) { // JSR-181 says methods must be public (p14) // TODO NLS ExceptionFactory.makeWebServiceException("SEI methods must be public"); } // TODO: other validation per JSR-181 } } return (Method[])methodList.toArray(new Method[methodList.size()]); // return seiMethods; } - And I didnt see in the spce (may be I have missed) saying that all the method should be public in the service impl class , so please point me to the spec where you have such a restriction. Thanks Deepal --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
