本文整理了Java中javax.jws.WebService.name()
方法的一些代码示例,展示了WebService.name()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。WebService.name()
方法的具体详情如下:
包路径:javax.jws.WebService
类名称:WebService
方法名:name
暂无
代码示例来源:origin: opensourceBIM/BIMserver
public SService(SServicesMap servicesMap, SourceCodeFetcher sourceCodeFetcher, Class<? extends PublicInterface> interfaceClass) {
this.servicesMap = servicesMap;
this.sourceCodeFetcher = sourceCodeFetcher;
this.interfaceClass = interfaceClass;
this.nameSpace = interfaceClass.getAnnotation(WebService.class).targetNamespace();
this.fullName = interfaceClass.getAnnotation(WebService.class).targetNamespace() + "." + interfaceClass.getAnnotation(WebService.class).name();
this.simpleName = interfaceClass.getAnnotation(WebService.class).name();
}
代码示例来源:origin: org.apache.cxf/cxf-rt-frontend-jaxws
if (!StringUtils.isEmpty(service.name())) {
name = service.name();
if (!StringUtils.isEmpty(service.name()) && name == null) {
name = service.name();
代码示例来源:origin: org.apache.cxf/cxf-rt-frontend-jaxws
String name = webService.name();
if (name.length() == 0) {
name = seiClass.getSimpleName();
代码示例来源:origin: org.apache.cxf/cxf-rt-frontend-jaxws
name = wsAnnotations.get(x).name();
代码示例来源:origin: com.carecon.fabric3/fabric3-binding-ws
/**
* Returns the WSDL port type name according to JAX-WS/JSR-181 rules.
*
* @param annotation the WebService annotation on the endpoint implementation
* @param serviceClass the endpoint implementation
* @param namespace the namespace
* @return the port type name
*/
private QName getPortTypeName(WebService annotation, Class<?> serviceClass, String namespace) {
String portTypeName = annotation.name();
if (portTypeName.length() < 1) {
portTypeName = serviceClass.getSimpleName();
}
return new QName(namespace, portTypeName);
}
代码示例来源:origin: org.apache.openejb/openejb-core
private static String getNameFromInterface(final Class<?> intf) {
final WebService webService = intf.getAnnotation(WebService.class);
if (webService != null) {
return getName(intf, webService.name());
}
throw new IllegalArgumentException("The " + intf.getName() + " is not annotated");
}
代码示例来源:origin: org.apache.geronimo.ext.openejb/openejb-core
private static String getNameFromInterface(Class<?> intf) {
WebService webService = intf.getAnnotation(WebService.class);
if (webService != null) {
return getName(intf, webService.name());
}
throw new IllegalArgumentException("The " + intf.getName() + " is not annotated");
}
代码示例来源:origin: com.microsoft.bingads/microsoft.bingads
private QName getServiceQname(Class serviceInterface) {
WebService webServiceAnnotation = (WebService) serviceInterface.getAnnotation(WebService.class);
String serviceName = webServiceAnnotation.name();
if (serviceName.startsWith("I")) {
serviceName = serviceName.substring(1);
}
QName qName = new QName(webServiceAnnotation.targetNamespace(), serviceName);
return qName;
}
代码示例来源:origin: org.apache.tomee/openejb-core
private static String getNameFromInterface(final Class<?> intf) {
final WebService webService = intf.getAnnotation(WebService.class);
if (webService != null) {
return getName(intf, webService.name());
}
throw new IllegalArgumentException("The " + intf.getName() + " is not annotated");
}
代码示例来源:origin: BingAds/BingAds-Java-SDK
private QName getServiceQname(Class serviceInterface) {
WebService webServiceAnnotation = (WebService) serviceInterface.getAnnotation(WebService.class);
String serviceName = webServiceAnnotation.name();
if (serviceName.startsWith("I")) {
serviceName = serviceName.substring(1);
}
QName qName = new QName(webServiceAnnotation.targetNamespace(), serviceName);
return qName;
}
代码示例来源:origin: org.apache.openejb/openejb-core
public static QName getPortType(final Class<?> seiClass) {
final WebService webService = seiClass.getAnnotation(WebService.class);
if (webService != null) {
String localName = webService.name();
if (localName == null || localName.length() == 0) {
localName = seiClass.getSimpleName();
}
final String namespace = webService.targetNamespace();
return new QName(getNamespace(seiClass, namespace), localName);
}
return null;
}
代码示例来源:origin: org.apache.tomee/openejb-core
public static QName getPortType(final Class<?> seiClass) {
final WebService webService = seiClass.getAnnotation(WebService.class);
if (webService != null) {
String localName = webService.name();
if (localName == null || localName.length() == 0) {
localName = seiClass.getSimpleName();
}
final String namespace = webService.targetNamespace();
return new QName(getNamespace(seiClass, namespace), localName);
}
return null;
}
代码示例来源:origin: org.apache.geronimo.ext.openejb/openejb-core
public static QName getPortType(Class<?> seiClass) {
WebService webService = seiClass.getAnnotation(WebService.class);
if (webService != null) {
String localName = webService.name();
if (localName == null || localName.length() == 0) {
localName = seiClass.getSimpleName();
}
String namespace = webService.targetNamespace();
return new QName(getNamespace(seiClass, namespace), localName);
}
return null;
}
代码示例来源:origin: org.apache.geronimo.ext.openejb/openejb-client
public <T> T getPort(Class<T> serviceEndpointInterface) {
T t = serviceDelegate.getPort(serviceEndpointInterface);
QName qname = null;
if (serviceEndpointInterface.isAnnotationPresent(WebService.class)) {
WebService webService = serviceEndpointInterface.getAnnotation(WebService.class);
String targetNamespace = webService.targetNamespace();
String name = webService.name();
if (targetNamespace != null && targetNamespace.length() > 0 && name != null && name.length() > 0) {
qname = new QName(targetNamespace, name);
}
}
setProperties((BindingProvider) t, qname);
return t;
}
代码示例来源:origin: org.jboss.ws/jbossws-common
public static String getUrlPatternByWebService(Class<?> beanClass){
String urlPattern = null;
WebService webServiceAnnotation = (WebService)beanClass.getAnnotation(WebService.class);
if (webServiceAnnotation != null)
{
String name = webServiceAnnotation.name();
urlPattern = !isEmpty(name) ? name : beanClass.getSimpleName();
String serviceName = webServiceAnnotation.serviceName();
if (!isEmpty(serviceName))
{
urlPattern = serviceName + "/" + urlPattern;
}
}
return urlPattern;
}
代码示例来源:origin: org.apache.openejb/openejb-core
public static QName getPortQName(final Class<?> clazz) {
final WebService webService = clazz.getAnnotation(WebService.class);
if (webService != null) {
return getPortQName(clazz, webService.targetNamespace(), webService.name(), webService.portName());
}
final WebServiceProvider webServiceProvider = clazz.getAnnotation(WebServiceProvider.class);
if (webServiceProvider != null) {
return getPortQName(clazz, webServiceProvider.targetNamespace(), null, webServiceProvider.portName());
}
throw new IllegalArgumentException("The " + clazz.getName() + " is not annotated");
}
代码示例来源:origin: org.apache.tomee/openejb-core
public static QName getPortQName(final Class<?> clazz) {
final WebService webService = clazz.getAnnotation(WebService.class);
if (webService != null) {
return getPortQName(clazz, webService.targetNamespace(), webService.name(), webService.portName());
}
final WebServiceProvider webServiceProvider = clazz.getAnnotation(WebServiceProvider.class);
if (webServiceProvider != null) {
return getPortQName(clazz, webServiceProvider.targetNamespace(), null, webServiceProvider.portName());
}
throw new IllegalArgumentException("The " + clazz.getName() + " is not annotated");
}
代码示例来源:origin: org.apache.geronimo.ext.openejb/openejb-core
public static QName getPortQName(Class<?> clazz) {
WebService webService = clazz.getAnnotation(WebService.class);
if (webService != null) {
return getPortQName(clazz, webService.targetNamespace(), webService.name(), webService.portName());
}
WebServiceProvider webServiceProvider = clazz.getAnnotation(WebServiceProvider.class);
if (webServiceProvider != null) {
return getPortQName(clazz, webServiceProvider.targetNamespace(), null, webServiceProvider.portName());
}
throw new IllegalArgumentException("The " + clazz.getName() + " is not annotated");
}
代码示例来源:origin: org.apache.axis2/axis2-metadata
public String getAnnoWebServiceName() {
if (webService_Name == null) {
if (getAnnoWebService() != null
&& !DescriptionUtils.isEmpty(getAnnoWebService().name())) {
webService_Name = getAnnoWebService().name();
} else {
// Per the JSR 181 Specification, the default
// is the simple name of the class.
webService_Name = DescriptionUtils.getSimpleJavaClassName(dbc.getClassName());
}
}
return webService_Name;
}
代码示例来源:origin: org.apache.axis2/axis2-metadata
public static WebServiceAnnot createFromAnnotation(Annotation annotation) {
WebServiceAnnot returnAnnot = null;
if (annotation != null && annotation instanceof javax.jws.WebService) {
javax.jws.WebService ws = (javax.jws.WebService) annotation;
return new WebServiceAnnot(ws.name(),
ws.targetNamespace(),
ws.serviceName(),
ws.wsdlLocation(),
ws.endpointInterface(),
ws.portName());
}
return returnAnnot;
}
内容来源于网络,如有侵权,请联系作者删除!