Hi,
That's what i have mentioned in my last reply . Normally all the
public method on Spring bean will expose as  a web service operations.
If you don't want to  expose any particular method, you can define it
as a exclude operation in service.xml file then that particular method
 will not expose as a web service operation.

say you don't want to expose getUserAccountManager(..) and
setUserAccountManager(..)  methods as web service operations,then you
can have following service.xml

<serviceGroup>
 <service name="DataSetServiceEnquiry" scope="transportsession">
   <description>
       simple spring example
   </description>
   <parameter 
name="ServiceObjectSupplier">org.apache.axis2.extensions.spring.receivers.SpringServletContextObjectSupplier</parameter>
   <parameter name="SpringBeanName">dataSetServiceEnquiry</parameter>
   <!--
       <messageReceivers>
               <messageReceiver mep="http://www.w3.org/2004/08/wsdl/in-out";
class="org.apache.axis2.rpc.receivers.RPCMessageReceiver"/>
       </messageReceivers>
  -->
   <operation name="login">
       <messageReceiver
class="org.apache.axis2.rpc.receivers.RPCMessageReceiver"/>
   </operation>
   <operation name="getLoginMsg">
       <messageReceiver
class="org.apache.axis2.rpc.receivers.RPCMessageReceiver"/>
   </operation>

<excludeOperations>
                       <operation>getUserAccountManager</operation>
                       <operation>setUserAccountManager</operation>
</excludeOperations>

</service>
</serviceGroup>

you can read more about service.xml file from here [1]  , HTH

[1] - http://wso2.org/library/2060


Thanks ,



On Thu, Aug 13, 2009 at 3:02 PM, sam wong<[email protected]> wrote:
> Dear Sagara,
>
> how about I just only public some method as web server method?
> how to write services.xml?
>
>
>
> another question:  where is the full structure  services.xml ?
>
>
> Thanks
> Sam Wong
>
>
>
> 2009/8/13 Sagara Gunathunga <[email protected]>:
>> Hi Sam,
>>
>> In the service.xml file you can exclude unwanted operations using
>> using "excludeOperations" as follows.
>>
>> <excludeOperations>
>>                        <operation>getUserAccountManager</operation>
>>                        <operation>setUserAccountManager</operation>
>> </excludeOperations>
>>
>> Thanks ,
>>
>>
>> On Thu, Aug 13, 2009 at 2:13 PM, sam wong<[email protected]> wrote:
>>> Hi,All
>>>
>>> I have a spring Bean with many many method.
>>>
>>>
>>> but some method i don't want to public as  WebService Method.
>>> like:
>>>    public IUserAccountManager getUserAccountManager() {
>>>        return userAccountManager;
>>>    }
>>>    public void setUserAccountManager(IUserAccountManager 
>>> userAccountManager) {
>>>        this.userAccountManager = userAccountManager;
>>>    }
>>>
>>>
>>> when i use c# client, I still can see this method too...
>>> what should i do?
>>>
>>>
>>>
>>> the follow is my services.xml:
>>> <serviceGroup>
>>>  <service name="DataSetServiceEnquiry" scope="transportsession">
>>>    <description>
>>>        simple spring example
>>>    </description>
>>>    <parameter 
>>> name="ServiceObjectSupplier">org.apache.axis2.extensions.spring.receivers.SpringServletContextObjectSupplier</parameter>
>>>    <parameter name="SpringBeanName">dataSetServiceEnquiry</parameter>
>>>    <!--
>>>        <messageReceivers>
>>>                <messageReceiver mep="http://www.w3.org/2004/08/wsdl/in-out";
>>> class="org.apache.axis2.rpc.receivers.RPCMessageReceiver"/>
>>>        </messageReceivers>
>>>   -->
>>>    <operation name="login">
>>>        <messageReceiver
>>> class="org.apache.axis2.rpc.receivers.RPCMessageReceiver"/>
>>>    </operation>
>>>    <operation name="getLoginMsg">
>>>        <messageReceiver
>>> class="org.apache.axis2.rpc.receivers.RPCMessageReceiver"/>
>>>    </operation>
>>> </service>
>>> </serviceGroup>
>>>
>>>
>>>
>>>
>>>
>>> Thanks,
>>> Sam Wong
>>>
>>
>>
>>
>> --
>> Sagara Gunathunga
>>
>> Blog - http://ssagara.blogspot.com
>> Web - http://sagaras.awardspace.com/
>>
>



-- 
Sagara Gunathunga

Blog - http://ssagara.blogspot.com
Web - http://sagaras.awardspace.com/

Reply via email to