Package com.sun.xml.bind.v2.runtime

Examples of com.sun.xml.bind.v2.runtime.JAXBContextImpl


            } catch (IOException e) {
                throw new ServiceConstructionException(new Message("SCHEMA_GEN_EXC", BUNDLE), e);
            }
   
            serviceInfo.setProperty(WSDLServiceBuilder.WSDL_SCHEMA_LIST, col);
            JAXBContextImpl riContext;
            if (context instanceof JAXBContextImpl) {
                riContext = (JAXBContextImpl) context;
            } else {
                // fall back if we're using another jaxb implementation
                try {
View Full Code Here


            map.put("com.sun.xml.bind.defaultNamespaceRemap", defaultNs);
        }
       
        JAXBContext ctx = JAXBContext.newInstance(classes.toArray(new Class[classes.size()]), map);
        if (ctx instanceof JAXBContextImpl) {
            JAXBContextImpl rictx = (JAXBContextImpl)ctx;
            if (rictx.getBeanInfo(EndpointReferenceType.class) != null) {
                //ws-addressing is used, lets add the specific types
                try {
                    classes.add(Class.forName("org.apache.cxf.ws.addressing.wsdl.ObjectFactory"));
                    classes.add(Class.forName("org.apache.cxf.ws.addressing.wsdl.AttributedQNameType"));
                    classes.add(Class.forName("org.apache.cxf.ws.addressing.wsdl.ServiceNameType"));
View Full Code Here

        }
    }
    private boolean hasSwaRef(JAXBDataBinding db) {
        JAXBContext context = db.getContext();
        if (context instanceof JAXBContextImpl) {
            JAXBContextImpl riCtx = (JAXBContextImpl) context;
           
            try {
                // We're using reflection here because this won't work on
                // JAXB < 2.0.5 and Java 6 ships with 2.0.2.  This means
                // SwA won't work correctly unless you're using at least
                // JAXB 2.0.5.
                Method m = riCtx.getClass().getMethod("hasSwaRef", new Class[0]);
               
                return (Boolean) m.invoke(riCtx, new Object[0]);
            } catch (Exception e) {
                LOG.log(Level.FINER, "Could not check hasSwaRef", e);
            }
View Full Code Here

                                  col,
                                 (Document)r.getNode(),
                                  r.getSystemId());
            }

            JAXBContextImpl riContext;
            if (context instanceof JAXBContextImpl) {
                riContext = (JAXBContextImpl)context;
            } else {
                // fall back if we're using another jaxb implementation
                try {
View Full Code Here

    public static JAXBContextImpl getJAXBContext() {
        synchronized(AnnotationParserFactoryImpl.class) {
            try {
                if(customizationContext==null)
                    customizationContext = new JAXBContextImpl(
                        new Class[] {
                            BindInfo.class, // for xs:annotation
                            BIClass.class,
                            BIConversion.User.class,
                            BIConversion.UserAdapter.class,
View Full Code Here

        JAXBDataBinding db = new JAXBDataBinding();
        Set<Class<?>> classes = new HashSet<Class<?>>();
        classes.add(ObjectFactory.class);
        JAXBContext ctx = db.createJAXBContext(classes);
        if (ctx instanceof JAXBContextImpl) {
            JAXBContextImpl rictx = (JAXBContextImpl)ctx;
            assertNotNull(rictx.getBeanInfo(TestJAXBClass.class));
        }
    }
View Full Code Here

                } catch (IOException e) {
                    throw new ServiceConstructionException(new Message("SCHEMA_GEN_EXC", LOG), e);
                }
            }
           
            JAXBContextImpl riContext;
            if (context instanceof JAXBContextImpl) {
                riContext = (JAXBContextImpl) context;
            } else {
                // fall back if we're using another jaxb implementation
                try {
View Full Code Here

/*  332 */       if (l != null) return l;
/*      */
/*  334 */       if (this.classResolver != null) {
/*  335 */         Class clazz = this.classResolver.resolveElementName(tag.uri, tag.local);
/*  336 */         if (clazz != null) {
/*  337 */           JAXBContextImpl enhanced = getJAXBContext().createAugmented(clazz);
/*  338 */           JaxBeanInfo bi = enhanced.getBeanInfo(clazz);
/*  339 */           return bi.getLoader(enhanced, true);
/*      */         }
/*      */       }
/*      */     } catch (RuntimeException e) {
/*  343 */       throw e;
View Full Code Here

/* 157 */       w.endElement();
/*     */     }
/*     */   }
/*     */
/*     */   public void buildChildElementUnmarshallers(UnmarshallerChain chain, QNameMap<ChildLoader> handlers) {
/* 162 */     JAXBContextImpl context = chain.context;
/*     */
/* 164 */     for (TypeRef e : this.prop.getTypes()) {
/* 165 */       JaxBeanInfo bi = context.getOrCreate((RuntimeTypeInfo)e.getTarget());
/*     */
/* 168 */       Loader l = bi.getLoader(context, !Modifier.isFinal(bi.jaxbType.getModifiers()));
/* 169 */       if (e.getDefaultValue() != null)
/* 170 */         l = new DefaultValueLoaderDecorator(l, e.getDefaultValue());
/* 171 */       if ((this.nillable) || (chain.context.allNillable))
View Full Code Here

/*     */   }
/*     */
/*     */   public static JAXBRIContext createContext(Class[] classes, Collection<TypeReference> typeRefs, Map<Class, Class> subclassReplacements, String defaultNsUri, boolean c14nSupport, RuntimeAnnotationReader ar, boolean xmlAccessorFactorySupport, boolean allNillable)
/*     */     throws JAXBException
/*     */   {
/* 139 */     return new JAXBContextImpl(classes, typeRefs, subclassReplacements, defaultNsUri, c14nSupport, ar, xmlAccessorFactorySupport, allNillable);
/*     */   }
View Full Code Here

TOP

Related Classes of com.sun.xml.bind.v2.runtime.JAXBContextImpl

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.