use of javax.xml.ws.WebServiceClient in project tomee by apache.
the class JaxWsUtils method getWsdlLocation.
private static String getWsdlLocation(final Class<?> clazz) {
final WebService webService = clazz.getAnnotation(WebService.class);
if (webService != null) {
String wsdlLocation = webService.wsdlLocation().trim();
if (wsdlLocation.length() == 0) {
wsdlLocation = null;
}
return wsdlLocation;
}
final WebServiceClient webServiceClient = clazz.getAnnotation(WebServiceClient.class);
if (webServiceClient != null) {
String wsdlLocation = webServiceClient.wsdlLocation().trim();
if (wsdlLocation.length() == 0) {
wsdlLocation = null;
}
return wsdlLocation;
}
final WebServiceProvider webServiceProvider = clazz.getAnnotation(WebServiceProvider.class);
if (webServiceProvider != null) {
String wsdlLocation = webServiceProvider.wsdlLocation().trim();
if (wsdlLocation.length() == 0) {
wsdlLocation = null;
}
return wsdlLocation;
}
return null;
}
use of javax.xml.ws.WebServiceClient in project tomee by apache.
the class JaxWsUtils method getServiceQName.
public static QName getServiceQName(final Class<?> clazz) {
final WebService webService = clazz.getAnnotation(WebService.class);
if (webService != null) {
return getServiceQName(clazz, webService.targetNamespace(), webService.serviceName());
}
final WebServiceProvider webServiceProvider = clazz.getAnnotation(WebServiceProvider.class);
if (webServiceProvider != null) {
return getServiceQName(clazz, webServiceProvider.targetNamespace(), webServiceProvider.serviceName());
}
final WebServiceClient webServiceClient = clazz.getAnnotation(WebServiceClient.class);
if (webServiceClient != null) {
return getServiceQName(clazz, webServiceClient.targetNamespace(), webServiceClient.name());
}
throw new IllegalArgumentException("The " + clazz.getName() + " is not annotated");
}
Aggregations