This content has been marked as final.
Show 5 replies
-
1. Re: @WebService method argument names
schueffi Mar 6, 2008 4:10 AM (in response to rcarmichael)Hi
i think the solution should be somewhat like@WebMethod public int addNumbers( @WebParam(name = "myParamName1") int num1, @WebParam(name = "myParamName2") int num2 )
regards
Stefan Schueffler -
2. Re: @WebService method argument names
rcarmichael Mar 6, 2008 8:39 AM (in response to rcarmichael)That solution works perfectly, thank you for taking the time to respond.
- Ryan -
3. Re: @WebService method argument names
itsjewel Apr 23, 2008 6:56 AM (in response to rcarmichael)Isn't this a bug? Why should I annotate every parameters just to get a readable name? Is there any better workaround for this, so that Java parameters name directly got reflected to the generated wsdl without using @WebParam ?
-
4. Re: @WebService method argument names
joshua.dev Apr 23, 2008 7:26 AM (in response to rcarmichael)Sun's reference implementation for JAX-WS behaves identically so it's not a bug of JBossWS. It's inconvenient however and against the principle of sensible defaults, like for example @WebService taking the annotated interface (or class) name as the service name.
-
5. Re: @WebService method argument names
dlofthouse Apr 23, 2008 8:35 AM (in response to rcarmichael)"itsjewel" wrote:
Isn't this a bug?
This was a problem with Java 5 and before, the names assigned to parameters were not retained in the resulting .class files when you compile the class - this means at deployment time it is not possible to obtain the parameter name using reflection.
The @WebParam annotation is a workaround to get this information into the compiled .class file.