本文整理汇总了Java中com.sun.xml.internal.ws.message.EmptyMessageImpl类的典型用法代码示例。如果您正苦于以下问题:Java EmptyMessageImpl类的具体用法?Java EmptyMessageImpl怎么用?Java EmptyMessageImpl使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
EmptyMessageImpl类属于com.sun.xml.internal.ws.message包,在下文中一共展示了EmptyMessageImpl类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: create
import com.sun.xml.internal.ws.message.EmptyMessageImpl; //导入依赖的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
示例2: create
import com.sun.xml.internal.ws.message.EmptyMessageImpl; //导入依赖的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
示例3: createEmpty
import com.sun.xml.internal.ws.message.EmptyMessageImpl; //导入依赖的package包/类
/**
* Creates a {@link Message} that doesn't have any payload.
*/
public static Message createEmpty(SOAPVersion soapVersion) {
return new EmptyMessageImpl(soapVersion);
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:7,代码来源:Messages.java
示例4: getMessage
import com.sun.xml.internal.ws.message.EmptyMessageImpl; //导入依赖的package包/类
public Message getMessage(MessageHeaders headers, AttachmentSet attachments, WSBinding binding) {
return new EmptyMessageImpl(headers,attachments,binding.getSOAPVersion());
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:4,代码来源:LogicalMessageImpl.java
示例5: getMessage
import com.sun.xml.internal.ws.message.EmptyMessageImpl; //导入依赖的package包/类
public Message getMessage(HeaderList headers, AttachmentSet attachments, WSBinding binding) {
return new EmptyMessageImpl(headers,attachments,binding.getSOAPVersion());
}
开发者ID:alexkasko,项目名称:openjdk-icedtea7,代码行数:4,代码来源:LogicalMessageImpl.java
注:本文中的com.sun.xml.internal.ws.message.EmptyMessageImpl类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论