Add a constructor to generated Service class for setting only WSDL location
---------------------------------------------------------------------------

                 Key: CXF-1056
                 URL: https://issues.apache.org/jira/browse/CXF-1056
             Project: CXF
          Issue Type: Improvement
          Components: Tooling
    Affects Versions: 2.0.1
         Environment: Windows XP, Maven 2.0.6
            Reporter: Ryan Moquin
            Priority: Minor


I noticed in the generated service classes that there is only a constructor 
which accepts no params and therefore uses the default WSDL and QName or one 
that you can pass in both and override.  When I have a WSDL on the file system, 
most of the time I want to load it off the classpath because I'll bundle it 
with my jar.  When the wsdl is on the filepath, wsdl2java will generate a 
hardcoded filename to the WSDL, which isn't very good for portability reasons.  
It would be nice if there was a constructor to ONLY pass in a WSDL URL but use 
the default QName.  I usually have to define the QName myself in the class 
creating the service class so that I am able to use the constructor to override 
the WSDL.

For example, part of a generated service class:

public InventoryService(URL wsdlLocation, QName serviceName) {
        super(wsdlLocation, serviceName);
    }

    public InventoryService() {
        super(WSDL_LOCATION, SERVICE);
    }

Would be nice to have:

public InventoryService(URL wsdlLocation, QName serviceName) {
        super(wsdlLocation, serviceName);
    }

public InventoryService(URL wsdlLocation) {
        super(wsdlLocation, SERVICE);
    }

    public InventoryService() {
        super(WSDL_LOCATION, SERVICE);
    }


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to