private boolean match(final String binding, final List bindings) { if (binding == null) { return bindings == null || bindings.isEmpty(); } else { if (bindings == null || bindings.isEmpty()) { return true; } else { final String actualBindingURI = JaxWsUtils.getBindingURI(binding); final Iterator iter = bindings.iterator(); while (iter.hasNext()) { final String bindingToken = (String) iter.next(); final String bindingURI = JaxWsUtils.getBindingURI(bindingToken); if (actualBindingURI.equals(bindingURI)) { return true; } } return false; } } }
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"); }
private static QName getServiceQName(final Class clazz, final String namespace, final String name) { return new QName(getNamespace(clazz, namespace), getServiceName(clazz, name)); }
private static QName getPortQName(Class<?> clazz, String namespace, String name, String portName) { return new QName(getNamespace(clazz, namespace), getPortName(clazz, name, portName)); }
public static String getServiceWsdlLocation(Class<?> clazz, ClassLoader loader) { String wsdlLocation = getWsdlLocation(clazz); if (wsdlLocation != null && !wsdlLocation.equals("")) { return wsdlLocation; } String serviceInterfaceClassName = getServiceInterface(clazz); if (serviceInterfaceClassName != null && !serviceInterfaceClassName.equals("")) { try { Class serviceInterfaceClass = loader.loadClass(serviceInterfaceClassName); return getWsdlLocation(serviceInterfaceClass); } catch (Exception e) { } } return null; }
if (JaxWsUtils.isWebService(clazz)) { String serviceName = JaxWsUtils.getServiceName(clazz); if (servletMapping == null) { servletMapping = new ServletMapping(); portComponent.setServiceEndpointInterface(JaxWsUtils.getServiceInterface(clazz)); portComponent.setWsdlPort(JaxWsUtils.getPortQName(clazz)); webserviceDescription.setWsdlFile(JaxWsUtils.getServiceWsdlLocation(clazz, webModule.getClassLoader())); portComponent.setWsdlService(serviceQName); } else { portComponent.setWsdlService(JaxWsUtils.getServiceQName(clazz)); portComponent.setProtocolBinding(JaxWsUtils.getBindingUriFromAnn(clazz));
public static String getName(Class<?> clazz) { WebService webService = clazz.getAnnotation(WebService.class); if (webService != null) { String sei = webService.endpointInterface(); if (sei != null && sei.trim().length() != 0) { try { Class seiClass = clazz.getClassLoader().loadClass(sei.trim()); return getNameFromInterface(seiClass); } catch (ClassNotFoundException e) { throw new RuntimeException("Unable to load SEI class: " + sei, e); } } return getName(clazz, webService.name()); } WebServiceProvider webServiceProvider = clazz.getAnnotation(WebServiceProvider.class); if (webServiceProvider != null) { return clazz.getName(); } throw new IllegalArgumentException("The " + clazz.getName() + " is not annotated"); }
private static String getNamespace(final Class clazz, final String namespace) { if (namespace == null || namespace.trim().length() == 0) { final Package pkg = clazz.getPackage(); if (pkg == null) { return null; } else { return getNamespace(pkg.getName()); } } else { return namespace.trim(); } }
try { Class<?> clazz = tempClassLoader.loadClass(servletClass); if (JaxWsUtils.isWebService(clazz)) { wrapper.setServletClass(WsServlet.class.getName()); if (getServlet(wrapper) != null) {
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"); }
if (!JaxWsUtils.isWebService(ejbClass)) { continue; webserviceDescription = webservices.getWebserviceDescriptionMap().get(JaxWsUtils.getServiceName(ejbClass)); if (webserviceDescription == null) { webserviceDescription = new WebserviceDescription(); if (JaxWsUtils.isWebService(ejbClass)) { webserviceDescription.setWebserviceDescriptionName(JaxWsUtils.getServiceName(ejbClass)); if (portComponent == null) { portComponent = new PortComponent(); if (webserviceDescription.getPortComponentMap().containsKey(JaxWsUtils.getPortQName(ejbClass).getLocalPart())) { portComponent.setPortComponentName(JaxWsUtils.getPortQName(ejbClass).getLocalPart()); portComponent.setProtocolBinding(JaxWsUtils.getBindingUriFromAnn(ejbClass)); if (JaxWsUtils.isWebService(ejbClass)) { if (portComponent.getWsdlPort() == null) { portComponent.setWsdlPort(JaxWsUtils.getPortQName(ejbClass)); webserviceDescription.setWsdlFile(JaxWsUtils.getServiceWsdlLocation(ejbClass, ejbModule.getClassLoader())); portComponent.setWsdlService(serviceQName); } else { portComponent.setWsdlService(JaxWsUtils.getServiceQName(ejbClass)); portComponent.setProtocolBinding(JaxWsUtils.getBindingUriFromAnn(ejbClass));
public static String getServiceWsdlLocation(final Class<?> clazz, final ClassLoader loader) { final String wsdlLocation = getWsdlLocation(clazz); if (wsdlLocation != null && !wsdlLocation.equals("")) { return wsdlLocation; } final String serviceInterfaceClassName = getServiceInterface(clazz); if (serviceInterfaceClassName != null && !serviceInterfaceClassName.equals("")) { try { final Class serviceInterfaceClass = loader.loadClass(serviceInterfaceClassName); return getWsdlLocation(serviceInterfaceClass); } catch (final Exception e) { // no-op } } return null; }
private static QName getPortQName(final Class<?> clazz, final String namespace, final String name, final String portName) { return new QName(getNamespace(clazz, namespace), getPortName(clazz, name, portName)); }
public static String getName(final Class<?> clazz) { final WebService webService = clazz.getAnnotation(WebService.class); if (webService != null) { final String sei = webService.endpointInterface(); if (sei != null && sei.trim().length() != 0) { try { final Class seiClass = clazz.getClassLoader().loadClass(sei.trim()); return getNameFromInterface(seiClass); } catch (final ClassNotFoundException e) { throw new OpenEJBRuntimeException("Unable to load SEI class: " + sei, e); } } return getName(clazz, webService.name()); } final WebServiceProvider webServiceProvider = clazz.getAnnotation(WebServiceProvider.class); if (webServiceProvider != null) { return clazz.getName(); } throw new IllegalArgumentException("The " + clazz.getName() + " is not annotated"); }
private static String getNamespace(final Class clazz, final String namespace) { if (namespace == null || namespace.trim().length() == 0) { final Package pkg = clazz.getPackage(); if (pkg == null) { return null; } else { return getNamespace(pkg.getName()); } } else { return namespace.trim(); } }
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"); }
if (JaxWsUtils.isWebService(clazz)) { final String serviceName = JaxWsUtils.getServiceName(clazz); if (servletMapping == null) { servletMapping = new ServletMapping(); portComponent.setServiceEndpointInterface(JaxWsUtils.getServiceInterface(clazz)); portComponent.setWsdlPort(JaxWsUtils.getPortQName(clazz)); webserviceDescription.setWsdlFile(JaxWsUtils.getServiceWsdlLocation(clazz, webModule.getClassLoader())); portComponent.setWsdlService(serviceQName); } else { portComponent.setWsdlService(JaxWsUtils.getServiceQName(clazz)); portComponent.setProtocolBinding(JaxWsUtils.getBindingUriFromAnn(clazz));
private boolean match(final String binding, final List bindings) { if (binding == null) { return bindings == null || bindings.isEmpty(); } else { if (bindings == null || bindings.isEmpty()) { return true; } else { final String actualBindingURI = JaxWsUtils.getBindingURI(binding); final Iterator iter = bindings.iterator(); while (iter.hasNext()) { final String bindingToken = (String) iter.next(); final String bindingURI = JaxWsUtils.getBindingURI(bindingToken); if (actualBindingURI.equals(bindingURI)) { return true; } } return false; } } }
public static String getServiceWsdlLocation(final Class<?> clazz, final ClassLoader loader) { final String wsdlLocation = getWsdlLocation(clazz); if (wsdlLocation != null && !wsdlLocation.equals("")) { return wsdlLocation; } final String serviceInterfaceClassName = getServiceInterface(clazz); if (serviceInterfaceClassName != null && !serviceInterfaceClassName.equals("")) { try { final Class serviceInterfaceClass = loader.loadClass(serviceInterfaceClassName); return getWsdlLocation(serviceInterfaceClass); } catch (final Exception e) { // no-op } } return null; }
private static QName getServiceQName(final Class clazz, final String namespace, final String name) { return new QName(getNamespace(clazz, namespace), getServiceName(clazz, name)); }