1

I'm generating a WSDL from a Java class using the @WebService, @WebMethod and @WebParam annotations. The WSDL is generated, and includes output for @WebService and @WebMethod, but the @WebParam annotations appear to be ignored.

Here's one method declaration with this problem:

@WebMethod(action = "jmsServiceInitialise")
public boolean jmsServiceInitialise(
        @WebParam(name = "queue") String queueName, 
        @WebParam(name = "channel") String channel, 
        @WebParam(name = "hostname") String hostName, 
        @WebParam(name = "port") String port, 
        @WebParam(name = "requiresresponse") boolean requiresResponse) {
    log.info("jmsServiceInitialise " + queueName + ": started");
    // etc
    return returnValue;
}

The WSDL file contains no mention of any of the parameters, but the method is there. The method can be called as a web service, but the String parameter values are all null.

I originally encountered this problem in Eclipse, but have since replicated the problem with wsgen at the command line (Windows, JAX-WS RI 2.2.4-b01) and get the same result.

What am I missing?

Thanks.

Anon Gordon
  • 2,469
  • 4
  • 28
  • 34

1 Answers1

0

add @WebResult annotation to method, after @WebMethod annotation
and
make @WebMethod(operationName = "jmsServiceInitialise") instead of action

Ilya
  • 29,135
  • 19
  • 110
  • 158