本文整理了Java中org.apache.axiom.soap.SOAPHeader.examineAllHeaderBlocks()
方法的一些代码示例,展示了SOAPHeader.examineAllHeaderBlocks()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。SOAPHeader.examineAllHeaderBlocks()
方法的具体详情如下:
包路径:org.apache.axiom.soap.SOAPHeader
类名称:SOAPHeader
方法名:examineAllHeaderBlocks
[英]Returns an iterator over all the SOAPHeaderBlock objects in this SOAPHeaderobject.
[中]返回此SOAPHeaderobject中所有SOAPHeaderBlock对象的迭代器。
代码示例来源:origin: apache/axis2-java
/**
* Returns an <code>Iterator</code> over all the <code>SOAPHeaderElement</code> objects in this
* <code>SOAPHeader</code> object.
*
* @return an <code>Iterator</code> object over all the <code>SOAPHeaderElement</code> objects
* contained by this <code>SOAPHeader</code>
*/
public Iterator examineAllHeaderElements() {
Collection elements = new ArrayList();
for (Iterator iterator = omTarget.examineAllHeaderBlocks(); iterator.hasNext();) {
elements.add(toSAAJNode((org.w3c.dom.Node)iterator.next()));
}
return elements.iterator();
}
代码示例来源:origin: org.apache.axis2/axis2-saaj
/**
* Returns an <code>Iterator</code> over all the <code>SOAPHeaderElement</code> objects in this
* <code>SOAPHeader</code> object.
*
* @return an <code>Iterator</code> object over all the <code>SOAPHeaderElement</code> objects
* contained by this <code>SOAPHeader</code>
*/
public Iterator examineAllHeaderElements() {
Collection elements = new ArrayList();
for (Iterator iterator = omTarget.examineAllHeaderBlocks(); iterator.hasNext();) {
elements.add(toSAAJNode((org.w3c.dom.Node)iterator.next()));
}
return elements.iterator();
}
代码示例来源:origin: spring-projects/spring-ws
@Override
@SuppressWarnings("unchecked")
public Iterator<SoapHeaderElement> examineAllHeaderElements() {
try {
return new AxiomSoapHeaderElementIterator(getAxiomHeader().examineAllHeaderBlocks());
}
catch (OMException ex) {
throw new AxiomSoapHeaderException(ex);
}
}
代码示例来源:origin: org.apache.synapse/synapse-core
private String getHeadersLogMessage(MessageContext synCtx) {
StringBuffer sb = new StringBuffer();
if (synCtx.getEnvelope() != null) {
SOAPHeader header = synCtx.getEnvelope().getHeader();
if (header != null) {
for (Iterator iter = header.examineAllHeaderBlocks(); iter.hasNext();) {
Object o = iter.next();
if (o instanceof SOAPHeaderBlock) {
SOAPHeaderBlock headerBlk = (SOAPHeaderBlock) o;
sb.append(separator).append(headerBlk.getLocalName()).
append(" : ").append(headerBlk.getText());
} else if (o instanceof OMElement) {
OMElement headerElem = (OMElement) o;
sb.append(separator).append(headerElem.getLocalName()).
append(" : ").append(headerElem.getText());
}
}
}
}
setCustomProperties(sb, synCtx);
return trimLeadingSeparator(sb);
}
代码示例来源:origin: org.springframework.ws/spring-ws-core
@Override
@SuppressWarnings("unchecked")
public Iterator<SoapHeaderElement> examineAllHeaderElements() {
try {
return new AxiomSoapHeaderElementIterator(getAxiomHeader().examineAllHeaderBlocks());
}
catch (OMException ex) {
throw new AxiomSoapHeaderException(ex);
}
}
代码示例来源:origin: wso2/wso2-synapse
private String getHeadersLogMessage(MessageContext synCtx) {
StringBuffer sb = new StringBuffer();
if (synCtx.getEnvelope() != null) {
SOAPHeader header = synCtx.getEnvelope().getHeader();
if (header != null) {
for (Iterator iter = header.examineAllHeaderBlocks(); iter.hasNext();) {
Object o = iter.next();
if (o instanceof SOAPHeaderBlock) {
SOAPHeaderBlock headerBlk = (SOAPHeaderBlock) o;
sb.append(separator).append(headerBlk.getLocalName()).
append(" : ").append(headerBlk.getText());
} else if (o instanceof OMElement) {
OMElement headerElem = (OMElement) o;
sb.append(separator).append(headerElem.getLocalName()).
append(" : ").append(headerElem.getText());
}
}
}
}
setCustomProperties(sb, synCtx);
return trimLeadingSeparator(sb);
}
代码示例来源:origin: org.springframework.ws/org.springframework.ws
@SuppressWarnings("unchecked")
public Iterator<SoapHeaderElement> examineAllHeaderElements() {
try {
return new AxiomSoapHeaderElementIterator(getAxiomHeader().examineAllHeaderBlocks());
}
catch (OMException ex) {
throw new AxiomSoapHeaderException(ex);
}
}
代码示例来源:origin: apache/servicemix-bundles
@Override
@SuppressWarnings("unchecked")
public Iterator<SoapHeaderElement> examineAllHeaderElements() {
try {
return new AxiomSoapHeaderElementIterator(getAxiomHeader().examineAllHeaderBlocks());
}
catch (OMException ex) {
throw new AxiomSoapHeaderException(ex);
}
}
代码示例来源:origin: org.apache.synapse/synapse-core
for (Iterator iter = soapHeader.examineAllHeaderBlocks(); iter.hasNext();) {
代码示例来源:origin: org.apache.airavata/airavata-gfac-axis2-interface
public InvocationResponse invoke(MessageContext msgContext) throws AxisFault {
SOAPEnvelope envelope = msgContext.getEnvelope();
SOAPHeader header = envelope.getHeader();
if (header != null) {
Iterator it = header.examineAllHeaderBlocks();
while (it.hasNext()) {
SOAPHeaderBlock x = (SOAPHeaderBlock) it.next();
String elementName = x.getLocalName();
if (elementName.equals(SECURITY_CONTEXT)) {
OMElement amazon = x.getFirstChildWithName(new QName(null, AMAZON));
if (amazon != null) {
AmazonSecurityContext amazonSecurityContext = new AmazonSecurityContext();
OMElement accessKey = amazon.getFirstChildWithName(new QName(null, ACCESS_KEY_ID));
OMElement secretKey = amazon.getFirstChildWithName(new QName(null, SECRET_ACCESS_KEY));
amazonSecurityContext.setAccessKey(accessKey.getText());
amazonSecurityContext.setSecretKey(secretKey.getText());
// set to context
MessageContextUtil.addContextToProperty(msgContext, GFacService.SECURITY_CONTEXT, "amazon",
amazonSecurityContext);
}
}
}
}
return InvocationResponse.CONTINUE;
}
代码示例来源:origin: org.apache.airavata/gfac-axis2-interface
public InvocationResponse invoke(MessageContext msgContext) throws AxisFault {
SOAPEnvelope envelope = msgContext.getEnvelope();
SOAPHeader header = envelope.getHeader();
if (header != null) {
Iterator it = header.examineAllHeaderBlocks();
while (it.hasNext()) {
SOAPHeaderBlock x = (SOAPHeaderBlock) it.next();
String elementName = x.getLocalName();
if (elementName.equals(SECURITY_CONTEXT)) {
OMElement amazon = x.getFirstChildWithName(new QName(null, AMAZON));
if (amazon != null) {
AmazonSecurityContext amazonSecurityContext = new AmazonSecurityContext();
OMElement accessKey = amazon.getFirstChildWithName(new QName(null, ACCESS_KEY_ID));
OMElement secretKey = amazon.getFirstChildWithName(new QName(null, SECRET_ACCESS_KEY));
amazonSecurityContext.setAccessKey(accessKey.getText());
amazonSecurityContext.setSecretKey(secretKey.getText());
// set to context
MessageContextUtil.addContextToProperty(msgContext, GFacService.SECURITY_CONTEXT, "amazon",
amazonSecurityContext);
}
}
}
}
return InvocationResponse.CONTINUE;
}
代码示例来源:origin: org.apache.airavata/airavata-gfac-axis2-interface
public InvocationResponse invoke(MessageContext msgContext) throws AxisFault {
SOAPEnvelope envelope = msgContext.getEnvelope();
SOAPHeader header = envelope.getHeader();
if (header != null) {
Iterator it = header.examineAllHeaderBlocks();
while (it.hasNext()) {
SOAPHeaderBlock x = (SOAPHeaderBlock) it.next();
String elementName = x.getLocalName();
if (elementName.equals(SECURITY_CONTEXT)) {
OMElement myproxy = x.getFirstChildWithName(new QName(null, MYPROXY));
if (myproxy != null) {
GSISecurityContext gsiSecurityContext = new GSISecurityContext();
OMElement server = myproxy.getFirstChildWithName(new QName(null, MYPROXY_SERVER));
OMElement username = myproxy.getFirstChildWithName(new QName(null, MYPROXY_USERNAME));
OMElement password = myproxy.getFirstChildWithName(new QName(null, MYPROXY_PASSWORD));
OMElement life = myproxy.getFirstChildWithName(new QName(null, MYPROXY_LIFE));
gsiSecurityContext.setMyproxyServer(server.getText());
gsiSecurityContext.setMyproxyUserName(username.getText());
gsiSecurityContext.setMyproxyPasswd(password.getText());
gsiSecurityContext.setMyproxyLifetime(Integer.parseInt(life.getText()));
// set to context
MessageContextUtil.addContextToProperty(msgContext, GFacService.SECURITY_CONTEXT, "myproxy",
gsiSecurityContext);
}
}
}
}
return InvocationResponse.CONTINUE;
}
代码示例来源:origin: org.apache.airavata/gfac-axis2-interface
public InvocationResponse invoke(MessageContext msgContext) throws AxisFault {
SOAPEnvelope envelope = msgContext.getEnvelope();
SOAPHeader header = envelope.getHeader();
if (header != null) {
Iterator it = header.examineAllHeaderBlocks();
while (it.hasNext()) {
SOAPHeaderBlock x = (SOAPHeaderBlock) it.next();
String elementName = x.getLocalName();
if (elementName.equals(SECURITY_CONTEXT)) {
OMElement myproxy = x.getFirstChildWithName(new QName(null, MYPROXY));
if (myproxy != null) {
GSISecurityContext gsiSecurityContext = new GSISecurityContext();
OMElement server = myproxy.getFirstChildWithName(new QName(null, MYPROXY_SERVER));
OMElement username = myproxy.getFirstChildWithName(new QName(null, MYPROXY_USERNAME));
OMElement password = myproxy.getFirstChildWithName(new QName(null, MYPROXY_PASSWORD));
OMElement life = myproxy.getFirstChildWithName(new QName(null, MYPROXY_LIFE));
gsiSecurityContext.setMyproxyServer(server.getText());
gsiSecurityContext.setMyproxyUserName(username.getText());
gsiSecurityContext.setMyproxyPasswd(password.getText());
gsiSecurityContext.setMyproxyLifetime(Integer.parseInt(life.getText()));
// set to context
MessageContextUtil.addContextToProperty(msgContext, GFacService.SECURITY_CONTEXT, "myproxy",
gsiSecurityContext);
}
}
}
}
return InvocationResponse.CONTINUE;
}
代码示例来源:origin: wso2/wso2-synapse
for (Iterator iter = soapHeader.examineAllHeaderBlocks(); iter.hasNext();) {
代码示例来源:origin: org.apache.axis2/axis2-saaj
for (Iterator hbIter = header2.examineAllHeaderBlocks(); hbIter.hasNext();) {
代码示例来源:origin: apache/axis2-java
for (Iterator hbIter = header2.examineAllHeaderBlocks(); hbIter.hasNext();) {
代码示例来源:origin: org.apache.synapse/synapse-core
SOAPHeader soapHeader = synCtx.getEnvelope().getHeader();
if (soapHeader != null) {
for (Iterator iter = soapHeader.examineAllHeaderBlocks(); iter.hasNext();) {
Object o = iter.next();
iter.remove();
代码示例来源:origin: org.wso2.carbon.appmgt/org.wso2.carbon.appmgt.gateway
SOAPHeader soapHeader = messageContext.getEnvelope().getHeader();
if (soapHeader != null) {
for (Iterator iterator = soapHeader.examineAllHeaderBlocks(); iterator.hasNext();) {
Object o = iterator.next();
if (o instanceof SOAPHeaderBlock) {
代码示例来源:origin: wso2/wso2-synapse
SOAPHeader soapHeader = synCtx.getEnvelope().getHeader();
if (soapHeader != null) {
for (Iterator iter = soapHeader.examineAllHeaderBlocks(); iter.hasNext();) {
Object o = iter.next();
if (o instanceof SOAPHeaderBlock) {
代码示例来源:origin: org.wso2.carbon.apimgt/org.wso2.carbon.apimgt.gateway
SOAPHeader soapHeader = messageContext.getEnvelope().getHeader();
if (soapHeader != null) {
for (Iterator iterator = soapHeader.examineAllHeaderBlocks(); iterator.hasNext();) {
Object o = iterator.next();
if (o instanceof SOAPHeaderBlock) {
内容来源于网络,如有侵权,请联系作者删除!