本文整理汇总了Java中org.apache.axis.MessageContext.setEncodingStyle方法的典型用法代码示例。如果您正苦于以下问题:Java MessageContext.setEncodingStyle方法的具体用法?Java MessageContext.setEncodingStyle怎么用?Java MessageContext.setEncodingStyle使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.apache.axis.MessageContext
的用法示例。
在下文中一共展示了MessageContext.setEncodingStyle方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createMessageContext
import org.apache.axis.MessageContext; //导入方法依赖的package包/类
protected MessageContext createMessageContext(InputStream configStream) {
EngineConfiguration engineConfig = new FileProvider(configStream);
AxisEngine engine = new AxisServer(engineConfig);
MessageContext context = new MessageContext(engine);
context.setEncodingStyle("");
context.setProperty(AxisEngine.PROP_DOMULTIREFS, Boolean.FALSE);
// the following two properties prevent xsd types from appearing in
// every single element in the serialized XML
context.setProperty(AxisEngine.PROP_EMIT_ALL_TYPES, Boolean.FALSE);
context.setProperty(AxisEngine.PROP_SEND_XSI, Boolean.FALSE);
return context;
}
示例2: toObject
import org.apache.axis.MessageContext; //导入方法依赖的package包/类
public static <T> T toObject(InputSource source, Class<T> javaClass, InputStream wsdd) throws SAXException {
// create a message context for the wsdd
EngineConfiguration engineConfig = new FileProvider(wsdd);
AxisClient axisClient = new AxisClient(engineConfig);
MessageContext messageContext = new MessageContext(axisClient);
messageContext.setEncodingStyle("");
messageContext.setProperty(AxisEngine.PROP_DOMULTIREFS, Boolean.FALSE);
ConfigurableObjectDeserializationContext desContext = new ConfigurableObjectDeserializationContext(
messageContext, source, javaClass);
return javaClass.cast(desContext.getValue());
}