comment.add(doc);
}
// Generating constructor
// for e.g: public ExampleService()
JMethod constructor1 = cls.constructor(JMod.PUBLIC);
String constructor1Str = String.format("super(__getWsdlLocation(), %s);", serviceName);
constructor1.body().directStatement(constructor1Str);
// Generating constructor
// for e.g: public ExampleService(WebServiceFeature ... features)
if (options.target.isLaterThan(Options.Target.V2_2)) {
JMethod constructor2 = cls.constructor(JMod.PUBLIC);
constructor2.varParam(WebServiceFeature.class, "features");
String constructor2Str = String.format("super(__getWsdlLocation(), %s, features);", serviceName);
constructor2.body().directStatement(constructor2Str);
}
// Generating constructor
// for e.g: public ExampleService(URL wsdlLocation)
if (options.target.isLaterThan(Options.Target.V2_2)) {
JMethod constructor3 = cls.constructor(JMod.PUBLIC);
constructor3.param(URL.class, "wsdlLocation");
String constructor3Str = String.format("super(wsdlLocation, %s);", serviceName);
constructor3.body().directStatement(constructor3Str);
}
// Generating constructor
// for e.g: public ExampleService(URL wsdlLocation, WebServiceFeature ... features)
if (options.target.isLaterThan(Options.Target.V2_2)) {
JMethod constructor4 = cls.constructor(JMod.PUBLIC);
constructor4.param(URL.class, "wsdlLocation");
constructor4.varParam(WebServiceFeature.class, "features");
String constructor4Str = String.format("super(wsdlLocation, %s, features);", serviceName);
constructor4.body().directStatement(constructor4Str);
}
// Generating constructor
// for e.g: public ExampleService(URL wsdlLocation, QName serviceName)
JMethod constructor5 = cls.constructor(JMod.PUBLIC);
constructor5.param(URL.class, "wsdlLocation");
constructor5.param(QName.class, "serviceName");
constructor5.body().directStatement("super(wsdlLocation, serviceName);");
// Generating constructor
// for e.g: public ExampleService(URL, QName, WebServiceFeature ...)
if (options.target.isLaterThan(Options.Target.V2_2)) {
JMethod constructor6 = cls.constructor(JMod.PUBLIC);
constructor6.param(URL.class, "wsdlLocation");
constructor6.param(QName.class, "serviceName");
constructor6.varParam(WebServiceFeature.class, "features");
constructor6.body().directStatement("super(wsdlLocation, serviceName, features);");
}
//@WebService
JAnnotationUse webServiceClientAnn = cls.annotate(cm.ref(WebServiceClient.class));
writeWebServiceClientAnnotation(service, webServiceClientAnn);