本文整理汇总了Java中com.sun.xml.internal.ws.message.AttachmentSetImpl类的典型用法代码示例。如果您正苦于以下问题:Java AttachmentSetImpl类的具体用法?Java AttachmentSetImpl怎么用?Java AttachmentSetImpl使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
AttachmentSetImpl类属于com.sun.xml.internal.ws.message包,在下文中一共展示了AttachmentSetImpl类的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: JAXBMessage
import com.sun.xml.internal.ws.message.AttachmentSetImpl; //导入依赖的package包/类
private JAXBMessage(XMLBridge bridge, Object jaxbObject, SOAPVersion soapVer) {
super(soapVer);
// TODO: think about a better way to handle BridgeContext
this.bridge = bridge;
this.rawContext = null;
this.jaxbObject = jaxbObject;
QName tagName = bridge.getTypeInfo().tagName;
this.nsUri = tagName.getNamespaceURI();
this.localName = tagName.getLocalPart();
this.attachmentSet = new AttachmentSetImpl();
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:12,代码来源:JAXBMessage.java
示例2: create
import com.sun.xml.internal.ws.message.AttachmentSetImpl; //导入依赖的package包/类
/**
* Creates a {@link Message} from an {@link Element} that represents
* the whole SOAP message.
*
* @param soapEnvelope
* The SOAP envelope element.
*/
public static Message create(Element soapEnvelope) {
SOAPVersion ver = SOAPVersion.fromNsUri(soapEnvelope.getNamespaceURI());
// find the headers
Element header = DOMUtil.getFirstChild(soapEnvelope, ver.nsUri, "Header");
HeaderList headers = null;
if(header!=null) {
for( Node n=header.getFirstChild(); n!=null; n=n.getNextSibling() ) {
if(n.getNodeType()==Node.ELEMENT_NODE) {
if(headers==null)
headers = new HeaderList(ver);
headers.add(Headers.create((Element)n));
}
}
}
// find the payload
Element body = DOMUtil.getFirstChild(soapEnvelope, ver.nsUri, "Body");
if(body==null)
throw new WebServiceException("Message doesn't have <S:Body> "+soapEnvelope);
Element payload = DOMUtil.getFirstChild(soapEnvelope, ver.nsUri, "Body");
if(payload==null) {
return new EmptyMessageImpl(headers, new AttachmentSetImpl(), ver);
} else {
return new DOMMessage(ver,headers,payload);
}
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:35,代码来源:Messages.java
示例3: setOutboundAttachments
import com.sun.xml.internal.ws.message.AttachmentSetImpl; //导入依赖的package包/类
protected AttachmentSet setOutboundAttachments() {
HashMap<String, DataHandler> attachments = (HashMap<String, DataHandler>)
getRequestContext().get(MessageContext.OUTBOUND_MESSAGE_ATTACHMENTS);
if (attachments != null) {
List<Attachment> alist = new ArrayList();
for (Map.Entry<String, DataHandler> att : attachments.entrySet()) {
DataHandlerAttachment dha = new DataHandlerAttachment(att.getKey(), att.getValue());
alist.add(dha);
}
return new AttachmentSetImpl(alist);
}
return new AttachmentSetImpl();
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:15,代码来源:DispatchImpl.java
示例4: JAXBMessage
import com.sun.xml.internal.ws.message.AttachmentSetImpl; //导入依赖的package包/类
private JAXBMessage(Bridge bridge, Object jaxbObject, SOAPVersion soapVer) {
super(soapVer);
// TODO: think about a better way to handle BridgeContext
this.bridge = bridge;
this.jaxbObject = jaxbObject;
QName tagName = bridge.getTypeReference().tagName;
this.nsUri = tagName.getNamespaceURI();
this.localName = tagName.getLocalPart();
this.attachmentSet = new AttachmentSetImpl();
}
开发者ID:alexkasko,项目名称:openjdk-icedtea7,代码行数:11,代码来源:JAXBMessage.java
示例5: create
import com.sun.xml.internal.ws.message.AttachmentSetImpl; //导入依赖的package包/类
/**
* Creates a {@link Message} from an {@link Element} that represents
* the whole SOAP message.
*
* @param soapEnvelope
* The SOAP envelope element.
*/
public static Message create(Element soapEnvelope) {
SOAPVersion ver = SOAPVersion.fromNsUri(soapEnvelope.getNamespaceURI());
// find the headers
Element header = DOMUtil.getFirstChild(soapEnvelope, ver.nsUri, "Header");
HeaderList headers = null;
if(header!=null) {
for( Node n=header.getFirstChild(); n!=null; n=n.getNextSibling() ) {
if(n.getNodeType()==Node.ELEMENT_NODE) {
if(headers==null)
headers = new HeaderList();
headers.add(Headers.create((Element)n));
}
}
}
// find the payload
Element body = DOMUtil.getFirstChild(soapEnvelope, ver.nsUri, "Body");
if(body==null)
throw new WebServiceException("Message doesn't have <S:Body> "+soapEnvelope);
Element payload = DOMUtil.getFirstChild(soapEnvelope, ver.nsUri, "Body");
if(payload==null) {
return new EmptyMessageImpl(headers, new AttachmentSetImpl(), ver);
} else {
return new DOMMessage(ver,headers,payload);
}
}
开发者ID:alexkasko,项目名称:openjdk-icedtea7,代码行数:35,代码来源:Messages.java
示例6: PayloadStreamReaderMessage
import com.sun.xml.internal.ws.message.AttachmentSetImpl; //导入依赖的package包/类
public PayloadStreamReaderMessage(XMLStreamReader reader, SOAPVersion soapVer) {
this(null, reader,new AttachmentSetImpl(), soapVer);
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:4,代码来源:PayloadStreamReaderMessage.java
示例7: PayloadSourceMessage
import com.sun.xml.internal.ws.message.AttachmentSetImpl; //导入依赖的package包/类
public PayloadSourceMessage(Source s, SOAPVersion soapVer) {
this(null, s, new AttachmentSetImpl(), soapVer);
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:4,代码来源:PayloadSourceMessage.java
示例8: decode
import com.sun.xml.internal.ws.message.AttachmentSetImpl; //导入依赖的package包/类
public void decode(InputStream in, String contentType, Packet packet) throws IOException {
decode(in, contentType, packet, new AttachmentSetImpl());
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:4,代码来源:StreamSOAPCodec.java
注:本文中的com.sun.xml.internal.ws.message.AttachmentSetImpl类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论