本文整理汇总了Java中javax.xml.bind.attachment.AttachmentUnmarshaller类的典型用法代码示例。如果您正苦于以下问题:Java AttachmentUnmarshaller类的具体用法?Java AttachmentUnmarshaller怎么用?Java AttachmentUnmarshaller使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
AttachmentUnmarshaller类属于javax.xml.bind.attachment包,在下文中一共展示了AttachmentUnmarshaller类的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: unmarshalWithBridge
import javax.xml.bind.attachment.AttachmentUnmarshaller; //导入依赖的package包/类
public static Object unmarshalWithBridge(QName qname,
Class<?> cls,
Annotation anns[],
Set<Type> ctxClasses,
Object source,
AttachmentUnmarshaller am) {
try {
com.github.cxfplus.jaxbplus.JAXBUtils.BridgeWrapper bridge = com.github.cxfplus.jaxbplus.JAXBUtils.createBridge(ctxClasses, qname, cls, anns);
if (source instanceof XMLStreamReader) {
//DOMUtils.writeXml(StaxUtils.read((XMLStreamReader)source), System.out);
return bridge.unmarshal((XMLStreamReader)source, am);
} else if (source instanceof InputStream) {
return bridge.unmarshal((InputStream)source);
} else if (source instanceof Node) {
return bridge.unmarshal((Node)source, am);
} else {
throw new Fault(new Message("UNKNOWN_SOURCE", LOG, source.getClass().getName()));
}
} catch (Exception ex) {
if (ex instanceof javax.xml.bind.MarshalException) {
javax.xml.bind.MarshalException marshalEx = (javax.xml.bind.MarshalException)ex;
Message faultMessage = new Message("MARSHAL_ERROR", LOG, marshalEx.getLinkedException()
.getMessage());
throw new Fault(faultMessage, ex);
} else {
throw new Fault(new Message("MARSHAL_ERROR", LOG, ex.getMessage()), ex);
}
}
}
示例2: unmarshal
import javax.xml.bind.attachment.AttachmentUnmarshaller; //导入依赖的package包/类
/**
* @since 2.0.3
*/
public final @NotNull T unmarshal(@NotNull XMLStreamReader in, @Nullable AttachmentUnmarshaller au) throws JAXBException {
Unmarshaller u = context.unmarshallerPool.take();
u.setAttachmentUnmarshaller(au);
return exit(unmarshal(u,in),u);
}
示例3: unmarshal
import javax.xml.bind.attachment.AttachmentUnmarshaller; //导入依赖的package包/类
@Override
public final T unmarshal(Node n, AttachmentUnmarshaller au) throws JAXBException {
//EndpointArgumentsBuilder.RpcLit.readRequest
throw new UnsupportedOperationException();
// return bridge.unmarshal(n, au);
}
示例4: unmarshal
import javax.xml.bind.attachment.AttachmentUnmarshaller; //导入依赖的package包/类
@Override
public T unmarshal(XMLStreamReader in, AttachmentUnmarshaller au) throws JAXBException {
return delegate.unmarshal(in, au);
}
示例5: unmarshal
import javax.xml.bind.attachment.AttachmentUnmarshaller; //导入依赖的package包/类
@Override
public final T unmarshal(Node n, AttachmentUnmarshaller au)
throws JAXBException {
return bridge.unmarshal(n, au);
}
示例6: unmarshal
import javax.xml.bind.attachment.AttachmentUnmarshaller; //导入依赖的package包/类
@Override
public final T unmarshal(Node n, AttachmentUnmarshaller au) throws JAXBException {
//EndpointArgumentsBuilder.RpcLit.readRequest
throw new UnsupportedOperationException();
// return bridge.unmarshal(n, au);
}
示例7: setAttachmentUnmarshaller
import javax.xml.bind.attachment.AttachmentUnmarshaller; //导入依赖的package包/类
public void setAttachmentUnmarshaller(AttachmentUnmarshaller u) {
unmarshaller.setAttachmentUnmarshaller(u);
}
示例8: getAttachmentUnmarshaller
import javax.xml.bind.attachment.AttachmentUnmarshaller; //导入依赖的package包/类
public AttachmentUnmarshaller getAttachmentUnmarshaller() {
return unmarshaller.getAttachmentUnmarshaller();
}
示例9: MTOMDecorator
import javax.xml.bind.attachment.AttachmentUnmarshaller; //导入依赖的package包/类
public MTOMDecorator(UnmarshallerImpl parent,XmlVisitor next, AttachmentUnmarshaller au) {
this.parent = parent;
this.next = next;
this.au = au;
}
示例10: getAttachmentUnmarshaller
import javax.xml.bind.attachment.AttachmentUnmarshaller; //导入依赖的package包/类
@Override
public AttachmentUnmarshaller getAttachmentUnmarshaller() {
return attachmentUnmarshaller;
}
示例11: setAttachmentUnmarshaller
import javax.xml.bind.attachment.AttachmentUnmarshaller; //导入依赖的package包/类
@Override
public void setAttachmentUnmarshaller(AttachmentUnmarshaller au) {
this.attachmentUnmarshaller = au;
}
示例12: unmarshal
import javax.xml.bind.attachment.AttachmentUnmarshaller; //导入依赖的package包/类
public DataHandler unmarshal(String cid) {
AttachmentUnmarshaller au = UnmarshallingContext.getInstance().parent.getAttachmentUnmarshaller();
// TODO: error check
return au.getAttachmentAsDataHandler(cid);
}
示例13: setAttachmentUnmarshaller
import javax.xml.bind.attachment.AttachmentUnmarshaller; //导入依赖的package包/类
public void setAttachmentUnmarshaller(AttachmentUnmarshaller au) {
throw new UnsupportedOperationException();
}
示例14: getAttachmentUnmarshaller
import javax.xml.bind.attachment.AttachmentUnmarshaller; //导入依赖的package包/类
public AttachmentUnmarshaller getAttachmentUnmarshaller() {
throw new UnsupportedOperationException();
}