JBoss Community

WSDL path being used by generated CXF code

created by Anand Jayaraman in JBoss Web Services CXF - View the full discussion

Hi,

 

On running org.apache.cxf.tools.wsdlto.WSDLToJava it generates CXF stubs.

 

Code snippet of the generated code is shown below:

 

@WebServiceClient(name = "ExampleServiceCXFServiceService",
                  wsdlLocation = "file:D:/CVSMSTR8/Head/hello.wsdl",
                  targetNamespace = "http://ws.example.diamond.perotsystems.com/")
public class ExampleServiceCXFServiceService extends Service {

    public final static URL WSDL_LOCATION;
    public final static QName SERVICE = new QName("http://ws.example.diamond.perotsystems.com/", "ExampleServiceCXFServiceService");
    public final static QName ExampleServiceCXFServicePort = new QName("http://ws.example.diamond.perotsystems.com/", "ExampleServiceCXFServicePort");
    static {
        URL url = null;
        try {
            url = new URL("file:D:/CVSMSTR8/Head/hello.wsdl");
        } catch (MalformedURLException e) {
            System.err.println("Can not initialize the default wsdl from D:/CVSMSTR8/Head/hello.wsdl");
            // e.printStackTrace();
        }
        WSDL_LOCATION = url;
    }

 

 

The WSDL location is referenced in the generated code.

 

Is there a way to generate CXF stubs which do not use WSDL location?

 

Regards,

Anand

Reply to this message by going to Community

Start a new discussion in JBoss Web Services CXF at Community