You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by rhalferty <ry...@cgifederal.com> on 2012/10/02 17:40:07 UTC

UsesJAXBContext

Does CXF implement the JAX-WS annotation @UsesJAXBContext?

@UsesJAXBContext(ContextFactory.class)

...

public class ContextFactory implements JAXBContextFactory {

    // Contexts that are being managed.  The name will be the context.
    //----------------------------------------------------------------
    private static Hashtable<String, Class> hContexts = new
Hashtable<String, Class>();
    private static JAXBRIContext jContext = null;
	
	@Override
	@NotNull
	public JAXBRIContext createJAXBContext(@NotNull SEIModel seiModel,
			@NotNull List<Class> classes, @NotNull List<TypeReference>
typeReferences)
			throws JAXBException {
		
		Class[] arg = hContexts.values().toArray(new
Class[hContexts.values().size()]);
		
	        jContext = JAXBRIContext.newInstance(arg, typeReferences,null,
	            seiModel.getTargetNamespace(), false, null );
		
		
        return jContext;
	}
}



--
View this message in context: http://cxf.547215.n5.nabble.com/UsesJAXBContext-tp5715367.html
Sent from the cxf-user mailing list archive at Nabble.com.