Hi Julio, if exclude=true did work, this proved that your endpointInterface 
class didnt get loaded by CXF. The logic behind the scene is that CXF will try 
to load endpointInterface class using @WebService(endpointInterface ="") 
annotation, if it successfully gets the interface loaded, only methods defined 
in the interface marked with @WebMethod get published into WSDL. If CXF can not 
load endpointInterface class, all methods in the impl class will be published 
into WSDL unless there is an "exclude".

Cheers,
Jervis

-----Original Message-----
From: Julio Arias [mailto:[EMAIL PROTECTED]
Sent: 2007?7?13? 11:41
To: [email protected]
Subject: Re: Exposing methods


Hi Jim,

Thanks I found that property for the @WebMethod annotation too and it  
works fine. But is this a normal behavior to expose everything in the  
implementor, I thought it would only expose the methods on my interface.

On Jul 12, 2007, at 9:05 PM, Jim Ma wrote:

> Hi Julio,
>
> I think you can add @WebMethod(exclude=true)  for the setter method.
>
>    @WebMethod (exclude=true)
>     setUserManager(UserManager userManager)
>
> Cheers
>
> Jim
>
>
> Julio Arias wrote:
>> The dependencies setters from my service impl are getting expose  
>> in the WSDL even though I'm specifying the endpoint interface in  
>> the implementor. How can I hide this methods?
>>
>> I have the following code and config:
>>
>> + UserWebService.java
>>
>> @WebService(name = "UserService")
>> public interface UserWebService {
>>     @WebMethod
>>     User getUserById(@WebParam(name = "id") Long id);
>> }
>>
>> + UserWebServiceImpl.java
>>
>> @WebService(endpointInterface =  
>> "com.rbx.test.webservices.UserWebService", name = "UserService")
>> public class UserWebServiceImpl implements UserWebService {
>>
>>     private UserManager userManager;
>>
>>     public void setUserManager(UserManager userManager) {
>>         this.userManager = userManager;
>>     }
>>            public User getUserById(Long id) {
>>         return userManager.getUser(id);
>>     }
>> }
>>
>> + Endpoint config:
>>
>> <jaxws:endpoint id="userService" address="/UserService">
>>     <jaxws:implementor>
>>         <bean class="com.rbx.test.webservices.UserWebServiceImpl">
>>             <property name="userManager" ref="userManager"/>
>>         </bean>
>>     </jaxws:implementor>       </jaxws:endpoint>
>>
>>
>>
>>
>> Julio Arias
>> Java Developer
>> Roundbox Global : enterprise : technology : genius
>> ---------------------------------------------------------------------
>> Avenida 11 y Calle 7-9, Barrio Amón, San Jose, Costa Rica
>> tel: 404.567.5000 ext. 2001 | cell: 11.506.849.5981
>> email: [EMAIL PROTECTED] | www.rbxglobal.com
>> ---------------------------------------------------------------------
>>
>>




Julio Arias
Java Developer
Roundbox Global : enterprise : technology : genius
---------------------------------------------------------------------
Avenida 11 y Calle 7-9, Barrio Amón, San Jose, Costa Rica
tel: 404.567.5000 ext. 2001 | cell: 11.506.849.5981
email: [EMAIL PROTECTED] | www.rbxglobal.com
---------------------------------------------------------------------

----------------------------
IONA Technologies PLC (registered in Ireland)
Registered Number: 171387
Registered Address: The IONA Building, Shelbourne Road, Dublin 4, Ireland

Reply via email to