本文整理汇总了Java中com.sun.xml.internal.ws.message.RootElementSniffer.getAttributes方法的典型用法代码示例。如果您正苦于以下问题:Java RootElementSniffer.getAttributes方法的具体用法?Java RootElementSniffer.getAttributes怎么用?Java RootElementSniffer.getAttributes使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.sun.xml.internal.ws.message.RootElementSniffer
的用法示例。
在下文中一共展示了RootElementSniffer.getAttributes方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: parse
import com.sun.xml.internal.ws.message.RootElementSniffer; //导入方法依赖的package包/类
/**
* Lazily parse the first element to obtain attribute values on it.
*/
private void parse() {
RootElementSniffer sniffer = new RootElementSniffer();
try {
bridge.marshal(jaxbObject,sniffer,null);
} catch (JAXBException e) {
// if it's due to us aborting the processing after the first element,
// we can safely ignore this exception.
//
// if it's due to error in the object, the same error will be reported
// when the readHeader() method is used, so we don't have to report
// an error right now.
nsUri = sniffer.getNsUri();
localName = sniffer.getLocalName();
atts = sniffer.getAttributes();
}
}
示例2: parse
import com.sun.xml.internal.ws.message.RootElementSniffer; //导入方法依赖的package包/类
/**
* Lazily parse the first element to obtain attribute values on it.
*/
private void parse() {
RootElementSniffer sniffer = new RootElementSniffer();
try {
bridge.marshal(jaxbObject,sniffer);
} catch (JAXBException e) {
// if it's due to us aborting the processing after the first element,
// we can safely ignore this exception.
//
// if it's due to error in the object, the same error will be reported
// when the readHeader() method is used, so we don't have to report
// an error right now.
nsUri = sniffer.getNsUri();
localName = sniffer.getLocalName();
atts = sniffer.getAttributes();
}
}