Tuesday, March 4, 2008

Default web method parameter names are arg0, arg1,...

When creating a web service method with the Jax-WS annotations, not specifying the attribute name on the @WebParam annotation, results in your parameters being named arg1, arg2 etc in the created scheme, which is almost always an undesired behaviour.
Hence, always specify the name attribute, it might save you later on.
Example:

@WebMethod
public Customer getCustomer(@WebParam(name = "customerId") String customerId)

1 comment:

Anonymous said...

Allah razı olsun. :)