Search code examples
javaweb-servicesannotationsjax-ws

what would be default bindingName in WSDL


Like default service name in generated wsdl would be className+Service when we do not specify serviceName in @WebService annotation. I would like to know what the default binding name would be in generated WSDL from java class through wsgen?


Solution

  • According to JSR 224 Chapter 3, 3.8.1, the default is the services class name with a Binding suffix.

    The value of the name attribute of the wsdl:binding is not significant, by convention it contains the qualified name of the corresponding wsdl:portType suffixed with “Binding”

    And the port type name is defined as the service class names with a Service suffix.

    [...] the serviceName element of the WebService annotation are used to derive the service name. The value of the name attribute of the wsdl:service element is computed according to the JSR-181 [15] specification. It is given by the serviceName element of the WebService annotation, if present with a non-default value, otherwise the name of the implementation class with the “Service”suffix appended to it.