Refine search
/** * Retrieve a JAXBContext for marshalling and unmarshalling JAXB generated * types. * * @return a JAXBContext */ public static JAXBContext getJAXBContext() throws JAXBException { synchronized (ContextJAXBUtils.class) { if (jaxbContext == null || jaxbContextClasses == null) { Set<Class<?>> tmp = new HashSet<>(); JAXBContextCache.addPackage(tmp, ContextUtils.WSA_OBJECT_FACTORY.getClass().getPackage().getName(), ContextUtils.WSA_OBJECT_FACTORY.getClass().getClassLoader()); JAXBContextCache.scanPackages(tmp); CachedContextAndSchemas ccs = JAXBContextCache.getCachedContextAndSchemas(tmp, null, null, null, false); jaxbContextClasses = ccs.getClasses(); jaxbContext = ccs.getContext(); } } return jaxbContext; }
private static synchronized JAXBContext createContextForEPR() throws JAXBException { Reference<JAXBContext> rctx = ADDRESSING_CONTEXT.get(); JAXBContext ctx = rctx.get(); if (ctx == null) { ctx = JAXBContextCache.getCachedContextAndSchemas(ADDRESSING_CLASSES, null, null, null, true).getContext(); ADDRESSING_CONTEXT.set(new SoftReference<JAXBContext>(ctx)); } return ctx; } private static JAXBContext getJAXBContextForEPR() throws JAXBException {
for (Class<?> clz : classes) { if (clz.getName().endsWith("ObjectFactory") && checkObjectFactoryNamespaces(clz)) { return new CachedContextAndSchemas(context, cachedContextAndSchemasInternal.getClasses(), cachedContextAndSchemasInternal); context = createContext(classes, map, typeRefs); } catch (JAXBException ex) { boolean added = addJaxbObjectFactory(ex, classes); if (added) { try { return new CachedContextAndSchemas(context, classes, cachedContextAndSchemasInternal);
private static synchronized JAXBContext getContext() throws JAXBException { if (context == null || classes == null) { Set<Class<?>> c2 = new HashSet<>(); JAXBContextCache.addPackage(c2, PackageUtils.getPackageName(TLSClientParametersType.class), TLSClientParametersConfig.class.getClassLoader()); CachedContextAndSchemas ccs = JAXBContextCache.getCachedContextAndSchemas(c2, null, null, null, false); classes = ccs.getClasses(); context = ccs.getContext(); } return context; }
public JAXBContext createJAXBContext(Set<Class<?>> classes, String defaultNs) throws JAXBException { return createJAXBContextAndSchemas(classes, defaultNs).getContext(); }
throw new ServiceConstructionException(e1); ctx = cachedContextAndSchemas.getContext(); if (LOG.isLoggable(Level.FINE)) { LOG.log(Level.FINE, "CREATED_JAXB_CONTEXT", new Object[] {ctx, contextClasses}); Collection<DOMSource> schemas = getSchemas(); if (schemas == null || schemas.isEmpty()) { schemas = cachedContextAndSchemas.getSchemas(); if (schemas != null) { schemasFromCache = true; schemaInit.walk(); if (cachedContextAndSchemas != null && !schemasFromCache) { cachedContextAndSchemas.setSchemas(schemas);
private static synchronized JAXBContext createContextForEPR() throws JAXBException { Reference<JAXBContext> rctx = ADDRESSING_CONTEXT.get(); JAXBContext ctx = rctx.get(); if (ctx == null) { ctx = JAXBContextCache.getCachedContextAndSchemas(ADDRESSING_CLASSES, null, null, null, true).getContext(); ADDRESSING_CONTEXT.set(new SoftReference<JAXBContext>(ctx)); } return ctx; } private static JAXBContext getJAXBContextForEPR() throws JAXBException {
for (Class<?> clz : classes) { if (clz.getName().endsWith("ObjectFactory") && checkObjectFactoryNamespaces(clz)) { cachedContextAndSchemasInternal = null; } else { return new CachedContextAndSchemas(cachedContextAndSchemasInternal); context = createContext(classes, map, typeRefs); } catch (JAXBException ex) { boolean added = addJaxbObjectFactory(ex, classes); if (added) { try { return new CachedContextAndSchemas(context, classes, cachedContextAndSchemasInternal);
private static synchronized JAXBContext getContext() throws JAXBException { if (context == null || classes == null) { Set<Class<?>> c2 = new HashSet<>(); JAXBContextCache.addPackage(c2, PackageUtils.getPackageName(TLSClientParametersType.class), TLSClientParametersConfig.class.getClassLoader()); CachedContextAndSchemas ccs = JAXBContextCache.getCachedContextAndSchemas(c2, null, null, null, false); classes = ccs.getClasses(); context = ccs.getContext(); } return context; }
/** * Retrieve a JAXBContext for marshalling and unmarshalling JAXB generated * types. * * @return a JAXBContext */ public static JAXBContext getJAXBContext() throws JAXBException { synchronized (ContextJAXBUtils.class) { if (jaxbContext == null || jaxbContextClasses == null) { Set<Class<?>> tmp = new HashSet<>(); JAXBContextCache.addPackage(tmp, ContextUtils.WSA_OBJECT_FACTORY.getClass().getPackage().getName(), ContextUtils.WSA_OBJECT_FACTORY.getClass().getClassLoader()); JAXBContextCache.scanPackages(tmp); CachedContextAndSchemas ccs = JAXBContextCache.getCachedContextAndSchemas(tmp, null, null, null, false); jaxbContextClasses = ccs.getClasses(); jaxbContext = ccs.getContext(); } } return jaxbContext; }
private static synchronized JAXBContext createContextForEPR() throws JAXBException { Reference<JAXBContext> rctx = ADDRESSING_CONTEXT.get(); JAXBContext ctx = rctx.get(); if (ctx == null) { ctx = JAXBContextCache.getCachedContextAndSchemas(ADDRESSING_CLASSES, null, null, null, true).getContext(); ADDRESSING_CONTEXT.set(new SoftReference<JAXBContext>(ctx)); } return ctx; } private static JAXBContext getJAXBContextForEPR() throws JAXBException {
for (Class<?> clz : classes) { if (clz.getName().endsWith("ObjectFactory") && checkObjectFactoryNamespaces(clz)) { cachedContextAndSchemasInternal = null; } else { return new CachedContextAndSchemas(cachedContextAndSchemasInternal); context = createContext(classes, map, typeRefs); } catch (JAXBException ex) { boolean added = addJaxbObjectFactory(ex, classes); if (added) { try { return new CachedContextAndSchemas(context, classes, cachedContextAndSchemasInternal);
private static synchronized JAXBContext getContext() throws JAXBException { if (context == null || classes == null) { Set<Class<?>> c2 = new HashSet<Class<?>>(); JAXBContextCache.addPackage(c2, PackageUtils.getPackageName(TLSClientParametersType.class), TLSClientParametersConfig.class.getClassLoader()); CachedContextAndSchemas ccs = JAXBContextCache.getCachedContextAndSchemas(c2, null, null, null, false); classes = ccs.getClasses(); context = ccs.getContext(); } return context; }
/** * Retrieve a JAXBContext for marshalling and unmarshalling JAXB generated * types. * * @return a JAXBContext */ public static JAXBContext getJAXBContext() throws JAXBException { synchronized (ContextUtils.class) { if (jaxbContext == null || jaxbContextClasses == null) { Set<Class<?>> tmp = new HashSet<Class<?>>(); JAXBContextCache.addPackage(tmp, WSA_OBJECT_FACTORY.getClass().getPackage().getName(), WSA_OBJECT_FACTORY.getClass().getClassLoader()); JAXBContextCache.scanPackages(tmp); CachedContextAndSchemas ccs = JAXBContextCache.getCachedContextAndSchemas(tmp, null, null, null, false); jaxbContextClasses = ccs.getClasses(); jaxbContext = ccs.getContext(); } } return jaxbContext; }
private static synchronized JAXBContext createContextForEPR() throws JAXBException { Reference<JAXBContext> rctx = ADDRESSING_CONTEXT.get(); JAXBContext ctx = rctx.get(); if (ctx == null) { ctx = JAXBContextCache.getCachedContextAndSchemas(ADDRESSING_CLASSES, null, null, null, true).getContext(); ADDRESSING_CONTEXT.set(new SoftReference<JAXBContext>(ctx)); } return ctx; } private static JAXBContext getJAXBContextForEPR() throws JAXBException {
for (Class<?> clz : classes) { if (clz.getName().endsWith("ObjectFactory") && checkObjectFactoryNamespaces(clz)) { return new CachedContextAndSchemas(context, cachedContextAndSchemasInternal.getClasses(), cachedContextAndSchemasInternal); context = createContext(classes, map, typeRefs); } catch (JAXBException ex) { boolean added = addJaxbObjectFactory(ex, classes); if (added) { try { return new CachedContextAndSchemas(context, classes, cachedContextAndSchemasInternal);
private static synchronized JAXBContext getContext() throws JAXBException { if (context == null || classes == null) { Set<Class<?>> c2 = new HashSet<Class<?>>(); JAXBContextCache.addPackage(c2, PackageUtils.getPackageName(TLSClientParametersType.class), TLSClientParametersConfig.class.getClassLoader()); CachedContextAndSchemas ccs = JAXBContextCache.getCachedContextAndSchemas(c2, null, null, null, false); classes = ccs.getClasses(); context = ccs.getContext(); } return context; }
/** * Retrieve a JAXBContext for marshalling and unmarshalling JAXB generated * types. * * @return a JAXBContext */ public static JAXBContext getJAXBContext() throws JAXBException { synchronized (ContextUtils.class) { if (jaxbContext == null || jaxbContextClasses == null) { Set<Class<?>> tmp = new HashSet<Class<?>>(); JAXBContextCache.addPackage(tmp, WSA_OBJECT_FACTORY.getClass().getPackage().getName(), WSA_OBJECT_FACTORY.getClass().getClassLoader()); JAXBContextCache.scanPackages(tmp); CachedContextAndSchemas ccs = JAXBContextCache.getCachedContextAndSchemas(tmp, null, null, null, false); jaxbContextClasses = ccs.getClasses(); jaxbContext = ccs.getContext(); } } return jaxbContext; }
public SecurityTokenServiceProvider() throws Exception { Set<Class<?>> classes = new HashSet<>(); classes.add(ObjectFactory.class); classes.add(org.apache.cxf.ws.security.sts.provider.model.wstrust14.ObjectFactory.class); CachedContextAndSchemas cache = JAXBContextCache.getCachedContextAndSchemas(classes, null, null, null, false); jaxbContext = cache.getContext(); jaxbContextClasses = cache.getClasses(); }
tmp.addAll(jaxbClasses); JAXBContextCache.addPackage(tmp, PackageUtils.getPackageName(cls), cls == null ? getClass().getClassLoader() : cls.getClassLoader()); if (cls != null) { JAXBContextCache.scanPackages(tmp); JAXBContextCache.CachedContextAndSchemas ccs = JAXBContextCache.getCachedContextAndSchemas(tmp, null, null, null, false); jaxbClasses = ccs.getClasses(); jaxbContext = ccs.getContext(); } catch (JAXBException e) { throw new RuntimeException(e);