You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by sam wong <sa...@gmail.com> on 2009/08/13 10:43:00 UTC
how can only public some spring bean method as method!
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
Re: how can only public some spring bean method as method!
Posted by sam wong <sa...@gmail.com>.
good,
thanks Sagara
2009/8/13 Sagara Gunathunga <sa...@gmail.com>:
> 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<sa...@gmail.com> 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 <sa...@gmail.com>:
>>> 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<sa...@gmail.com> 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/
>
Re: how can only public some spring bean method as method!
Posted by Sagara Gunathunga <sa...@gmail.com>.
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<sa...@gmail.com> 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 <sa...@gmail.com>:
>> 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<sa...@gmail.com> 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/
Re: how can only public some spring bean method as method!
Posted by sam wong <sa...@gmail.com>.
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 <sa...@gmail.com>:
> 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<sa...@gmail.com> 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/
>
Re: how can only public some spring bean method as method!
Posted by Sagara Gunathunga <sa...@gmail.com>.
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<sa...@gmail.com> 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/