本文整理了Java中org.apache.axiom.soap.SOAPHeader.getHeaderBlocksWithNSURI()
方法的一些代码示例,展示了SOAPHeader.getHeaderBlocksWithNSURI()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。SOAPHeader.getHeaderBlocksWithNSURI()
方法的具体详情如下:
包路径:org.apache.axiom.soap.SOAPHeader
类名称:SOAPHeader
方法名:getHeaderBlocksWithNSURI
[英]Return all the Headers that has the Namespace URI to given NS URI.
[中]将所有具有命名空间URI的头返回给给定的NS URI。
代码示例来源:origin: apache/axis2-java
/**
* Sets a mustUnderstand attribute on all headers that are found with the appropriate
* addressing namespace.
*/
private void processMustUnderstandProperty() {
if (addMustUnderstandAttribute) {
List headers = header.getHeaderBlocksWithNSURI(addressingNamespace);
for (int i = 0, size = headers.size(); i < size; i++) {
SOAPHeaderBlock soapHeaderBlock = (SOAPHeaderBlock)headers.get(i);
soapHeaderBlock.setMustUnderstand(true);
if (LoggingControl.debugLoggingAllowed && log.isTraceEnabled()) {
log.trace(
"processMustUnderstandProperty: Setting mustUnderstand=true on: " +
soapHeaderBlock.getLocalName());
}
}
}
}
代码示例来源:origin: org.apache.synapse/synapse-core
/**
* Removes Submission and Final WS-Addressing headers and return the SOAPEnvelope from the given
* message context
*
* @param axisMsgCtx the Axis2 Message context
* @return the resulting SOAPEnvelope
*/
public static SOAPEnvelope removeAddressingHeaders(
org.apache.axis2.context.MessageContext axisMsgCtx) {
SOAPEnvelope env = axisMsgCtx.getEnvelope();
SOAPHeader soapHeader = env.getHeader();
ArrayList addressingHeaders;
if (soapHeader != null) {
addressingHeaders =
soapHeader.getHeaderBlocksWithNSURI(AddressingConstants.Submission.WSA_NAMESPACE);
if (addressingHeaders != null && addressingHeaders.size() != 0) {
detachAddressingInformation(addressingHeaders);
} else {
addressingHeaders =
soapHeader.getHeaderBlocksWithNSURI(AddressingConstants.Final.WSA_NAMESPACE);
if (addressingHeaders != null && addressingHeaders.size() != 0) {
detachAddressingInformation(addressingHeaders);
}
}
}
return env;
}
代码示例来源:origin: wso2/wso2-synapse
/**
* Removes Submission and Final WS-Addressing headers and return the SOAPEnvelope from the given
* message context
*
* @param axisMsgCtx the Axis2 Message context
* @return the resulting SOAPEnvelope
*/
public static SOAPEnvelope removeAddressingHeaders(
org.apache.axis2.context.MessageContext axisMsgCtx) {
SOAPEnvelope env = axisMsgCtx.getEnvelope();
SOAPHeader soapHeader = env.getHeader();
ArrayList addressingHeaders;
if (soapHeader != null) {
addressingHeaders =
soapHeader.getHeaderBlocksWithNSURI(AddressingConstants.Submission.WSA_NAMESPACE);
if (addressingHeaders != null && addressingHeaders.size() != 0) {
detachAddressingInformation(addressingHeaders);
} else {
addressingHeaders =
soapHeader.getHeaderBlocksWithNSURI(AddressingConstants.Final.WSA_NAMESPACE);
if (addressingHeaders != null && addressingHeaders.size() != 0) {
detachAddressingInformation(addressingHeaders);
}
}
}
return env;
}
代码示例来源:origin: wso2/carbon-identity-framework
List headerBlocks = soapHeader.getHeaderBlocksWithNSURI(WSConstants.WSSE_NS);
代码示例来源:origin: org.wso2.carbon.identity/org.wso2.carbon.security.mgt
List headerBlocks = soapHeader.getHeaderBlocksWithNSURI(WSConstants.WSSE_NS);
代码示例来源:origin: org.wso2.carbon.identity.framework/org.wso2.carbon.security.mgt
List headerBlocks = soapHeader.getHeaderBlocksWithNSURI(WSConstants.WSSE_NS);
代码示例来源:origin: holodeck-b2b/Holodeck-B2B
.getHeaderBlocksWithNSURI(WSS_NAMESPACE_URI);
if (secHeaders == null || secHeaders.isEmpty())
return null; // No security headers in message
代码示例来源:origin: apache/axis2-java
header = factory.createSOAPHeader(envelope);
}else{
ArrayList addressingHeaders = header.getHeaderBlocksWithNSURI(addressingNamespace);
if(addressingHeaders!=null && !addressingHeaders.isEmpty()){
existingWSAHeaders = new ArrayList(addressingHeaders.size());
代码示例来源:origin: org.apache.rampart/rampart-core
ArrayList secHeaders = header.getHeaderBlocksWithNSURI(WSConstants.WSSE_NS);
代码示例来源:origin: org.apache.synapse/synapse-core
if (header != null) {
removeFromHeaderList(header.
getHeaderBlocksWithNSURI(""));
if (header != null) {
removeFromHeaderList(header.
getHeaderBlocksWithNSURI(qName.getNamespaceURI()));
代码示例来源:origin: holodeck-b2b/Holodeck-B2B
final SOAPHeader header = SOAPenv.getHeader();
if (header != null) {
final ArrayList<?> wsseHdrs = header.getHeaderBlocksWithNSURI(SecurityConstants.WSS_NAMESPACE_URI);
wsseHdrs.stream().map(h -> (SOAPHeaderBlock) h)
.filter(soapHdr -> Utils.isNullOrEmpty(soapHdr.getRole())
代码示例来源:origin: wso2/wso2-synapse
if (header != null) {
removeFromHeaderList(header.
getHeaderBlocksWithNSURI(""));
if (header != null) {
removeFromHeaderList(header.
getHeaderBlocksWithNSURI(qName.getNamespaceURI()));
代码示例来源:origin: org.apache.rampart/rampart-core
if (part.getName() == null) {
ArrayList headerList = header.getHeaderBlocksWithNSURI(part.getNamespace());
代码示例来源:origin: org.apache.rampart/rampart-core
ArrayList headerBlocks = header.getHeaderBlocksWithNSURI(WSConstants.WSSE_NS);
SOAPHeaderBlock secHeader = null;
内容来源于网络,如有侵权,请联系作者删除!