本文整理了Java中javax.xml.soap.SOAPHeader.examineAllHeaderElements()
方法的一些代码示例,展示了SOAPHeader.examineAllHeaderElements()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。SOAPHeader.examineAllHeaderElements()
方法的具体详情如下:
包路径:javax.xml.soap.SOAPHeader
类名称:SOAPHeader
方法名:examineAllHeaderElements
[英]Returns an Iterator
over all the SOAPHeaderElement
objects in this SOAPHeader
object.
[中]
代码示例来源:origin: org.apache.cxf/cxf-rt-frontend-jaxws
public Object[] getHeaders(QName name, JAXBContext context, boolean allRoles) {
SOAPMessage msg = getMessage();
SOAPHeader header;
try {
header = msg.getSOAPPart().getEnvelope().getHeader();
if (header == null || !header.hasChildNodes()) {
return new Object[0];
}
List<Object> ret = new ArrayList<>();
Iterator<SOAPHeaderElement> it = CastUtils.cast(header.examineAllHeaderElements());
while (it.hasNext()) {
SOAPHeaderElement she = it.next();
if ((allRoles
|| roles.contains(she.getActor()))
&& name.equals(she.getElementQName())) {
ret.add(JAXBUtils.unmarshall(context, she));
}
}
return ret.toArray(new Object[0]);
} catch (SOAPException | JAXBException e) {
throw new WebServiceException(e);
}
}
代码示例来源:origin: stackoverflow.com
try {
SOAPHeader header = context.getMessage().getSOAPHeader();
Iterator<?> headerElements = header.examineAllHeaderElements();
while (headerElements.hasNext()) {
SOAPHeaderElement headerElement = (SOAPHeaderElement) headerElements
代码示例来源:origin: org.springframework.ws/org.springframework.ws
@Override
@SuppressWarnings("unchecked")
public Iterator<SOAPHeaderElement> examineAllHeaderElements(SOAPHeader header) {
return header.examineAllHeaderElements();
}
代码示例来源:origin: org.springframework.ws/org.springframework.ws
@Override
@SuppressWarnings("unchecked")
public Iterator<SOAPHeaderElement> examineAllHeaderElements(SOAPHeader header) {
return header.examineAllHeaderElements();
}
代码示例来源:origin: com.sun.xml.ws/jaxws-rt
@Override
public boolean hasHeaders() {
SOAPHeader soapHeader = ensureSOAPHeader();
if (soapHeader == null) {
return false;
}
Iterator allHeaders = soapHeader.examineAllHeaderElements();
return allHeaders.hasNext();
}
代码示例来源:origin: com.sun.xml.ws/rt
@Override
public boolean hasHeaders() {
SOAPHeader soapHeader = ensureSOAPHeader();
if (soapHeader == null) {
return false;
}
Iterator allHeaders = soapHeader.examineAllHeaderElements();
return allHeaders.hasNext();
}
代码示例来源:origin: javaee/metro-jax-ws
@Override
public boolean hasHeaders() {
SOAPHeader soapHeader = ensureSOAPHeader();
if (soapHeader == null) {
return false;
}
Iterator allHeaders = soapHeader.examineAllHeaderElements();
return allHeaders.hasNext();
}
代码示例来源:origin: com.sun.xml.ws/jaxws-rt
@Override
public List<Header> asList() {
SOAPHeader soapHeader = ensureSOAPHeader();
if (soapHeader == null) {
return Collections.emptyList();
}
Iterator allHeaders = soapHeader.examineAllHeaderElements();
List<Header> headers = new ArrayList<Header>();
while (allHeaders.hasNext()) {
SOAPHeaderElement nextHdr = (SOAPHeaderElement) allHeaders.next();
headers.add(new SAAJHeader(nextHdr));
}
return headers;
}
}
代码示例来源:origin: com.centurylink.mdw/mdw-workflow
protected void extractSoapResponseHeaders(SOAPHeader header) throws TransformerException {
Map<Name,String> soapHeaders = new HashMap<Name,String>();
Iterator<?> iter = header.examineAllHeaderElements();
while (iter.hasNext()) {
SOAPHeaderElement headerElem = (SOAPHeaderElement) iter.next();
soapHeaders.put(headerElem.getElementName(), headerElem.getTextContent());
}
setSoapResponseHeaders(soapHeaders);
}
代码示例来源:origin: com.sun.xml.ws/jaxws-rt
private SOAPHeaderElement find(String nsUri, String localName) {
SOAPHeader soapHeader = ensureSOAPHeader();
if (soapHeader == null) {
return null;
}
Iterator allHeaders = soapHeader.examineAllHeaderElements();
while(allHeaders.hasNext()) {
SOAPHeaderElement nextHdrElem = (SOAPHeaderElement) allHeaders.next();
if (nextHdrElem.getNamespaceURI().equals(nsUri) &&
nextHdrElem.getLocalName().equals(localName)) {
return nextHdrElem;
}
}
return null;
}
代码示例来源:origin: org.springframework.ws/spring-ws-core
@Override
@SuppressWarnings("unchecked")
public Iterator<SoapHeaderElement> examineAllHeaderElements() throws SoapHeaderException {
Iterator<SOAPHeaderElement> iterator = getSaajHeader().examineAllHeaderElements();
return new SaajSoapHeaderElementIterator(iterator);
}
代码示例来源:origin: com.sun.xml.ws/rt
private SOAPHeaderElement find(String nsUri, String localName) {
SOAPHeader soapHeader = ensureSOAPHeader();
if (soapHeader == null) {
return null;
}
Iterator allHeaders = soapHeader.examineAllHeaderElements();
while(allHeaders.hasNext()) {
SOAPHeaderElement nextHdrElem = (SOAPHeaderElement) allHeaders.next();
if (nextHdrElem.getNamespaceURI().equals(nsUri) &&
nextHdrElem.getLocalName().equals(localName)) {
return nextHdrElem;
}
}
return null;
}
代码示例来源:origin: com.sun.xml.ws/jaxws-rt
@Override
public Iterator<Header> getHeaders() {
SOAPHeader soapHeader = ensureSOAPHeader();
if (soapHeader == null) {
return null;
}
Iterator allHeaders = soapHeader.examineAllHeaderElements();
return new HeaderReadIterator(allHeaders, null, null);
}
代码示例来源:origin: com.sun.xml.ws/rt
@Override
public Iterator<Header> getHeaders() {
SOAPHeader soapHeader = ensureSOAPHeader();
if (soapHeader == null) {
return null;
}
Iterator allHeaders = soapHeader.examineAllHeaderElements();
return new HeaderReadIterator(allHeaders, null, null);
}
代码示例来源:origin: spring-projects/spring-ws
@Override
@SuppressWarnings("unchecked")
public Iterator<SoapHeaderElement> examineAllHeaderElements() throws SoapHeaderException {
Iterator<SOAPHeaderElement> iterator = getSaajHeader().examineAllHeaderElements();
return new SaajSoapHeaderElementIterator(iterator);
}
代码示例来源:origin: javaee/metro-jax-ws
@Override
public Iterator<Header> getHeaders() {
SOAPHeader soapHeader = ensureSOAPHeader();
if (soapHeader == null) {
return null;
}
Iterator allHeaders = soapHeader.examineAllHeaderElements();
return new HeaderReadIterator(allHeaders, null, null);
}
代码示例来源:origin: apache/servicemix-bundles
@Override
@SuppressWarnings("unchecked")
public Iterator<SoapHeaderElement> examineAllHeaderElements() throws SoapHeaderException {
Iterator<SOAPHeaderElement> iterator = getSaajHeader().examineAllHeaderElements();
return new SaajSoapHeaderElementIterator(iterator);
}
代码示例来源:origin: spring-projects/spring-ws
@Override
@SuppressWarnings("unchecked")
public Iterator<SoapHeaderElement> examineHeaderElementsToProcess(String[] actors) {
List<SOAPHeaderElement> result = new ArrayList<SOAPHeaderElement>();
Iterator<SOAPHeaderElement> iterator = getSaajHeader().examineAllHeaderElements();
while (iterator.hasNext()) {
SOAPHeaderElement saajHeaderElement = iterator.next();
String headerActor = saajHeaderElement.getActor();
if (shouldProcess(headerActor, actors)) {
result.add(saajHeaderElement);
}
}
return new SaajSoapHeaderElementIterator(result.iterator());
}
代码示例来源:origin: org.springframework.ws/spring-ws-core
@Override
@SuppressWarnings("unchecked")
public Iterator<SoapHeaderElement> examineHeaderElementsToProcess(String[] actors) {
List<SOAPHeaderElement> result = new ArrayList<SOAPHeaderElement>();
Iterator<SOAPHeaderElement> iterator = getSaajHeader().examineAllHeaderElements();
while (iterator.hasNext()) {
SOAPHeaderElement saajHeaderElement = iterator.next();
String headerActor = saajHeaderElement.getActor();
if (shouldProcess(headerActor, actors)) {
result.add(saajHeaderElement);
}
}
return new SaajSoapHeaderElementIterator(result.iterator());
}
代码示例来源:origin: spring-projects/spring-ws
@Override
@SuppressWarnings("unchecked")
public Iterator<SoapHeaderElement> examineHeaderElementsToProcess(String[] roles, boolean isUltimateDestination)
throws SoapHeaderException {
List<SOAPHeaderElement> result = new ArrayList<SOAPHeaderElement>();
Iterator<SOAPHeaderElement> iterator = getSaajHeader().examineAllHeaderElements();
while (iterator.hasNext()) {
SOAPHeaderElement saajHeaderElement = iterator.next();
String headerRole = saajHeaderElement.getRole();
if (shouldProcess(headerRole, roles, isUltimateDestination)) {
result.add(saajHeaderElement);
}
}
return new SaajSoapHeaderElementIterator(result.iterator());
}
内容来源于网络,如有侵权,请联系作者删除!