You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomee.apache.org by Maaku <ro...@gmail.com> on 2009/05/19 11:18:30 UTC
How to publish overloaded method in web service
I have an overloaded method in my class and I want to expose this as a web
service. When I try it I get
java.lang.IllegalArgumentException: An operation with name
[{http://xxx.com/wsdl}getLocations] already exists in this service
Is there a way to fix this without renaming one of the methods? Thanks
--
View this message in context: http://www.nabble.com/How-to-publish-overloaded-method-in-web-service-tp23612575p23612575.html
Sent from the OpenEJB User mailing list archive at Nabble.com.
Re: How to publish overloaded method in web service
Posted by Jean-Louis MONTEIRO <je...@atosorigin.com>.
Maaku wrote:
>
> I'm still getting the same error. Where can I find the generated WSDL?
>
As usually, you can get it using a browser with the deployed address
(available in OpenEJB logs) + "?wsdl"
Jean-Louis
--
View this message in context: http://www.nabble.com/How-to-publish-overloaded-method-in-web-service-tp23612575p23655314.html
Sent from the OpenEJB User mailing list archive at Nabble.com.
Re: How to publish overloaded method in web service
Posted by Maaku <ro...@gmail.com>.
I'm still getting the same error. Where can I find the generated WSDL?
bharath-5 wrote:
>
> I assume you use JAX-WS in which case you could customize the WSDL
> operation
> name (in the generated WDL) with the @WebMethod annotation.
>
> e.g.
>
> @WebMethod(operationName="doSomething")
> public int doSomething()
>
> @WebMethod(operationName="doSomethingMore")
> public int doSomething(int more)
>
> Thanks,
> Bharath
>
>
>
> On Tue, May 19, 2009 at 5:18 PM, Maaku <ro...@gmail.com> wrote:
>
>>
>> I have an overloaded method in my class and I want to expose this as a
>> web
>> service. When I try it I get
>>
>> java.lang.IllegalArgumentException: An operation with name
>> [{http://xxx.com/wsdl}getLocations <http://xxx.com/wsdl%7DgetLocations>]
>> already exists in this service
>>
>> Is there a way to fix this without renaming one of the methods? Thanks
>> --
>> View this message in context:
>> http://www.nabble.com/How-to-publish-overloaded-method-in-web-service-tp23612575p23612575.html
>> Sent from the OpenEJB User mailing list archive at Nabble.com.
>>
>>
>
>
--
View this message in context: http://www.nabble.com/How-to-publish-overloaded-method-in-web-service-tp23612575p23649308.html
Sent from the OpenEJB User mailing list archive at Nabble.com.
Re: How to publish overloaded method in web service
Posted by Bharath Ganesh <bh...@apache.org>.
I assume you use JAX-WS in which case you could customize the WSDL operation
name (in the generated WDL) with the @WebMethod annotation.
e.g.
@WebMethod(operationName="doSomething")
public int doSomething()
@WebMethod(operationName="doSomethingMore")
public int doSomething(int more)
Thanks,
Bharath
On Tue, May 19, 2009 at 5:18 PM, Maaku <ro...@gmail.com> wrote:
>
> I have an overloaded method in my class and I want to expose this as a web
> service. When I try it I get
>
> java.lang.IllegalArgumentException: An operation with name
> [{http://xxx.com/wsdl}getLocations <http://xxx.com/wsdl%7DgetLocations>]
> already exists in this service
>
> Is there a way to fix this without renaming one of the methods? Thanks
> --
> View this message in context:
> http://www.nabble.com/How-to-publish-overloaded-method-in-web-service-tp23612575p23612575.html
> Sent from the OpenEJB User mailing list archive at Nabble.com.
>
>