本文整理了Java中org.apache.cxf.message.Message.removeContent()
方法的一些代码示例,展示了Message.removeContent()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Message.removeContent()
方法的具体详情如下:
包路径:org.apache.cxf.message.Message
类名称:Message
方法名:removeContent
[英]Removes a content from a message. If some contents are completely consumed, removing them is a good idea
[中]从邮件中删除内容。如果一些内容被完全消耗,移除它们是一个好主意
代码示例来源:origin: org.apache.cxf/cxf-rt-transports-http
@Override
public void close(Message msg) throws IOException {
super.close(msg);
if (msg.getExchange() == null) {
return;
}
Message m = msg.getExchange().getInMessage();
if (m == null) {
return;
}
InputStream is = m.getContent(InputStream.class);
if (is != null) {
try {
is.close();
m.removeContent(InputStream.class);
} catch (IOException ioex) {
//ignore
}
}
}
}
代码示例来源:origin: apache/cxf
public <T> void removeContent(Class<T> format) {
message.removeContent(format);
}
代码示例来源:origin: org.apache.cxf/cxf-rt-bindings-http
public void handleMessage(Message message) throws Fault {
message.removeContent(XMLStreamWriter.class);
}
});
代码示例来源:origin: org.apache.cxf/cxf-core
public <T> void removeContent(Class<T> format) {
message.removeContent(format);
}
代码示例来源:origin: org.apache.cxf/cxf-api
public <T> void removeContent(Class<T> format) {
message.removeContent(format);
}
代码示例来源:origin: org.apache.cxf/cxf-rt-frontend-jaxws
private void setFaultMessage(MessageContext mc, Exception exception) {
Message msg = ((WrappedMessageContext)mc).getWrappedMessage();
msg.setContent(Exception.class, exception);
msg.removeContent(XMLStreamReader.class);
msg.removeContent(Source.class);
代码示例来源:origin: apache/cxf
private void closeInput(Message message) {
InputStream is = message.getContent(InputStream.class);
if (is != null) {
try {
is.close();
message.removeContent(InputStream.class);
} catch (IOException ioex) {
//ignore
}
}
}
代码示例来源:origin: org.apache.cxf/cxf-api
private void closeInput(Message message) {
InputStream is = message.getContent(InputStream.class);
if (is != null) {
try {
is.close();
message.removeContent(InputStream.class);
} catch (IOException ioex) {
//ignore
}
}
}
代码示例来源:origin: org.apache.camel/camel-cxf
private void closeInput(Message message) {
InputStream is = message.getContent(InputStream.class);
if (is != null) {
try {
is.close();
message.removeContent(InputStream.class);
} catch (IOException ioex) {
//ignore
}
}
}
}
代码示例来源:origin: org.apache.cxf/cxf-core
private void closeInput(Message message) {
InputStream is = message.getContent(InputStream.class);
if (is != null) {
try {
is.close();
message.removeContent(InputStream.class);
} catch (IOException ioex) {
//ignore
}
}
}
代码示例来源:origin: org.apache.cxf/cxf-rt-frontend-jaxws
origMessage = message.getContent(SOAPMessage.class);
message.setContent(XMLStreamReader.class, reader);
message.removeContent(SOAPMessage.class);
} else if (domWriter.getCurrentFragment() != null) {
DocumentFragment frag = domWriter.getCurrentFragment();
message.removeContent(XMLStreamReader.class);
if (reader != null) {
StaxUtils.copy(reader, origWriter);
代码示例来源:origin: org.apache.cxf/cxf-bundle-jaxrs
private void closeInput(Message message) {
InputStream is = message.getContent(InputStream.class);
if (is != null) {
try {
is.close();
message.removeContent(InputStream.class);
} catch (IOException ioex) {
//ignore
}
}
}
代码示例来源:origin: org.apache.cxf/cxf-rt-frontend-jaxws
origMessage = message.getContent(SOAPMessage.class);
message.setContent(XMLStreamReader.class, reader);
message.removeContent(SOAPMessage.class);
} else if (domWriter.getDocument().getDocumentElement() != null) {
Source source = new DOMSource(domWriter.getDocument());
message.removeContent(XMLStreamReader.class);
if (reader != null) {
StaxUtils.copy(reader, origWriter);
代码示例来源:origin: org.apache.cxf/cxf-rt-transports-http
outMessage.removeContent(OutputStream.class);
if (cachingForRetransmission && cachedStream != null) {
cachedStream.close();
代码示例来源:origin: org.openehealth.ipf.commons/ipf-commons-ihe-ws
@Override
public void handleMessage(Message message) throws Fault {
StringPayloadHolder payloadHolder = message.getContent(StringPayloadHolder.class);
if (payloadHolder != null) {
payloadHolder.remove(PayloadType.HTTP);
}
message.removeContent(InputStream.class);
}
}
代码示例来源:origin: apache/cxf
public void handleMessage(Message mc) throws Fault {
try {
XMLStreamWriter xtw = mc.getContent(XMLStreamWriter.class);
if (xtw != null) {
xtw.writeEndDocument();
xtw.flush();
xtw.close();
}
OutputStream os = (OutputStream) mc.get(OUTPUT_STREAM_HOLDER);
if (os != null) {
mc.setContent(OutputStream.class, os);
}
mc.removeContent(XMLStreamWriter.class);
} catch (XMLStreamException e) {
throw new Fault(e);
}
}
代码示例来源:origin: org.apache.cxf/cxf-api
public void handleMessage(Message message) throws Fault {
XMLStreamReader xtr = message.getContent(XMLStreamReader.class);
if (xtr != null && !MessageUtils.getContextualBoolean(message, STAX_IN_NOCLOSE, false)) {
StaxUtils.close(xtr);
message.removeContent(XMLStreamReader.class);
}
}
}
代码示例来源:origin: org.apache.cxf/cxf-bundle-jaxrs
public void handleMessage(Message message) throws Fault {
XMLStreamReader xtr = message.getContent(XMLStreamReader.class);
if (xtr != null && !MessageUtils.getContextualBoolean(message, STAX_IN_NOCLOSE, false)) {
StaxUtils.close(xtr);
message.removeContent(XMLStreamReader.class);
}
}
}
代码示例来源:origin: org.apache.cxf/cxf-core
public void handleMessage(Message message) throws Fault {
XMLStreamReader xtr = message.getContent(XMLStreamReader.class);
if (xtr != null && !MessageUtils.getContextualBoolean(message, STAX_IN_NOCLOSE, false)) {
try {
StaxUtils.close(xtr);
} catch (XMLStreamException ex) {
throw new Fault(ex);
}
message.removeContent(XMLStreamReader.class);
}
}
}
代码示例来源:origin: apache/cxf
public void handleMessage(Message message) throws Fault {
XMLStreamReader xtr = message.getContent(XMLStreamReader.class);
if (xtr != null && !MessageUtils.getContextualBoolean(message, STAX_IN_NOCLOSE, false)) {
try {
StaxUtils.close(xtr);
} catch (XMLStreamException ex) {
throw new Fault(ex);
}
message.removeContent(XMLStreamReader.class);
}
}
}
内容来源于网络,如有侵权,请联系作者删除!