本文整理汇总了Java中org.apache.cxf.jaxrs.provider.JAXBElementProvider类的典型用法代码示例。如果您正苦于以下问题:Java JAXBElementProvider类的具体用法?Java JAXBElementProvider怎么用?Java JAXBElementProvider使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
JAXBElementProvider类属于org.apache.cxf.jaxrs.provider包,在下文中一共展示了JAXBElementProvider类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: service
import org.apache.cxf.jaxrs.provider.JAXBElementProvider; //导入依赖的package包/类
@Module
public static EjbModule service() throws Exception {
final EjbModule module = new EjbModule(new EjbJar(), new OpenejbJar());
final EnterpriseBean bean = new SingletonBean(AdvancedBean.class).localBean();
module.getEjbJar().addEnterpriseBean(bean);
final Resources resources = new Resources();
final Service feature = new Service("xml", null);
feature.setClassName(JAXBElementProvider.class.getName());
feature.getProperties().put("eventHandler", "$handler");
resources.getService().add(feature);
final Service handler = new Service("handler", null);
handler.setClassName(MyValidator.class.getName());
resources.getService().add(handler);
module.initResources(resources);
final PojoDeployment e = new PojoDeployment();
e.setClassName("jaxrs-application");
e.getProperties().setProperty("cxf.jaxrs.providers", "xml");
module.getOpenejbJar().getPojoDeployment().add(e);
return module;
}
开发者ID:apache,项目名称:tomee,代码行数:27,代码来源:AdvancedProviderConfigTest.java
示例2: getProviders
import org.apache.cxf.jaxrs.provider.JAXBElementProvider; //导入依赖的package包/类
@SuppressWarnings({ "rawtypes", "unchecked" })
private static List<?> getProviders() {
List result = new ArrayList();
JAXBElementProvider provider = new JAXBElementProvider();
provider.setSingleJaxbContext(true);
provider.setExtraClass(TRANSFER_CLASSES);
result.add(provider);
return result;
}
开发者ID:williamgrosset,项目名称:OSCAR-ConCert,代码行数:10,代码来源:BaseRestServiceTest.java
示例3: getProvider
import org.apache.cxf.jaxrs.provider.JAXBElementProvider; //导入依赖的package包/类
public static List<Object> getProvider() {
List<Object> providers = new ArrayList<Object>();
providers.add(new JSONProvider<Object>());
providers.add(new JAXBElementProvider<Object>());
providers.add(new MultipartProvider());
providers.add(new XPathProvider<Object>());
providers.add(new DataBindingProvider<Object>());
providers.add(new BinaryDataProvider<Object>());
providers.add(new JacksonJaxbJsonProvider());
return providers;
}
开发者ID:billchen198318,项目名称:bamboobsc,代码行数:12,代码来源:CxfServerBean.java
示例4: getEjbModule
import org.apache.cxf.jaxrs.provider.JAXBElementProvider; //导入依赖的package包/类
protected EjbModule getEjbModule(String pojoDeploymentClassName, String ejbModuleId) throws Exception {
final EjbModule module = new EjbModule(new EjbJar(), new OpenejbJar());
if (ejbModuleId != null) {
module.setModuleId(ejbModuleId);
}
final EnterpriseBean bean = new SingletonBean(LogginTestBean.class).localBean();
module.getEjbJar().addEnterpriseBean(bean);
final Resources resources = new Resources();
final Service feature = new Service("xml", null);
feature.setClassName(JAXBElementProvider.class.getName());
feature.getProperties().put("eventHandler", "$handler");
resources.getService().add(feature);
module.initResources(resources);
if (pojoDeploymentClassName != null) {
final PojoDeployment e = new PojoDeployment();
e.setClassName(pojoDeploymentClassName);
e.getProperties().setProperty("cxf.jaxrs.providers", "xml");
module.getOpenejbJar().getPojoDeployment().add(e);
}
return module;
}
开发者ID:apache,项目名称:tomee,代码行数:30,代码来源:LoggingJAXRSCommons.java
示例5: getJaxbProvider
import org.apache.cxf.jaxrs.provider.JAXBElementProvider; //导入依赖的package包/类
public JAXBElementProvider<?> getJaxbProvider() {
return jaxbProvider == null
? defaultJAXBProvider()
: jaxbProvider;
}
开发者ID:apache,项目名称:syncope,代码行数:6,代码来源:SyncopeClientFactoryBean.java
示例6: setJaxbProvider
import org.apache.cxf.jaxrs.provider.JAXBElementProvider; //导入依赖的package包/类
public SyncopeClientFactoryBean setJaxbProvider(final JAXBElementProvider<?> jaxbProvider) {
this.jaxbProvider = jaxbProvider;
return this;
}
开发者ID:apache,项目名称:syncope,代码行数:5,代码来源:SyncopeClientFactoryBean.java
示例7: providers
import org.apache.cxf.jaxrs.provider.JAXBElementProvider; //导入依赖的package包/类
@GET
public boolean providers() {
final JAXBElementProvider<?> mbr = JAXBElementProvider.class.cast(providers.getMessageBodyReader(Pojo.class, Pojo.class, new Annotation[0], MediaType.APPLICATION_XML_TYPE));
return MyValidator.class.isInstance(Reflections.get(mbr, "eventHandler"));
}
开发者ID:apache,项目名称:tomee,代码行数:6,代码来源:AdvancedProviderConfigTest.java
注:本文中的org.apache.cxf.jaxrs.provider.JAXBElementProvider类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论