metro-jax-ws icon indicating copy to clipboard operation
metro-jax-ws copied to clipboard

Expose QName serviceName as public static final

Open Tomas-Kraus opened this issue 2 years ago • 0 comments

I'd wish that wsimports generates the service name QName as a publicly accessible constant field in each generated @WebServiceClient. I think it should be permitted because QName is an immutable object.

We often use the constructor with specific WSDL URL javax.xml.ws.Service.Service(URL, QName) and I find we're always redefining the QName in our application code, where as the correct QName exists in the generated @WebServiceClient class

**Bar.java**@WebServiceClient(name = "HelloWorldService", targetNamespace = "http://foo.org/helloworld/v1", wsdlLocation = "file:/META-INF/wsdl/foo.wsdl") public class HelloWorldService
    extends Service
{

    public final static QName HELLOWORLDSERVICE_QNAME = new QName("http://foo.org/helloworld/v1", "HelloWorldService");

Source: https://github.com/javaee/metro-jax-ws/issues/1167 Author: glassfishrobot

Tomas-Kraus avatar Jun 02 '22 17:06 Tomas-Kraus