I created a web service using JAX-WS in RSA 7.5 and Websphere 7 using bottom-up approach. When I open the WSDL in SOAP UI, then the arguments section is appearing like this:
You put the @XMLElement(required=true)
above the variables in your class that are being returned from your service. I just learned about that option about a month ago. So right above where you declare empName put the tag and required.
To rename the parameters of your service use the @WebParam(name="
in front of each input variable to the service.
For example, if you have a service method called get(String name)
it would look something like get(@WebParam(name = "name") String name)
You are correct, now that I read your comment again. The services I support use Objects in the input and output, which is why I put the XMLElement tag in the class of those objects.
You need to put the tag in the class that declares your variables that are passed in or returned to the service. If those happen to be declared in your service class that is fine. The main point is that you put that XMLElement tag above the variable declaration, versus putting it on a getter or setter.
This tutorial shows some examples of the usage. JAXB tutorial