本文整理了Java中org.openmobster.core.common.XMLUtilities.marshal()
方法的一些代码示例,展示了XMLUtilities.marshal()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XMLUtilities.marshal()
方法的具体详情如下:
包路径:org.openmobster.core.common.XMLUtilities
类名称:XMLUtilities
方法名:marshal
[英]Serializes the specified Object into an XML representation
[中]将指定的对象序列化为XML表示形式
代码示例来源:origin: org.openmobster.core/dataService
private String prepareServiceResponse(Response beanResponse)
{
Map<String, String> responseAttributes = new HashMap<String, String>();
if(beanResponse != null)
{
String[] cour = beanResponse.getNames();
if(cour != null)
{
for(String name: cour)
{
responseAttributes.put(name, beanResponse.getAttribute(name));
}
}
}
return XMLUtilities.marshal(responseAttributes);
}
}
代码示例来源:origin: org.openmobster.core/push-apn
encode(notification.getMetaDataAsString(Constants.message),"UTF-8"));
Map<String,String> extras = (Map<String,String>)notification.getMetaData(Constants.extras);
String extrasStr = XMLUtilities.marshal(extras);
commandBuilder.append(Constants.separator+Constants.extras+"="+URLEncoder.encode(extrasStr,"UTF-8"));
代码示例来源:origin: org.openmobster.core/services
private void sendChannelEvent(List<ChannelBeanMetaData> allUpdates)
{
String channel = this.channelRegistration.getUri();
BusMessage message = new BusMessage();
message.setBusUri(channel);
message.setSenderUri(channel);
ChannelEvent event = new ChannelEvent();
event.setChannel(channel);
event.setAttribute(ChannelEvent.metadata, allUpdates);
message.setAttribute(ChannelEvent.event, XMLUtilities.marshal(event));
Bus.sendMessage(message);
}
}
代码示例来源:origin: org.openmobster.core/common
String busMessageXml = XMLUtilities.marshal(busMessage);
内容来源于网络,如有侵权,请联系作者删除!