本文整理了Java中javax.xml.soap.SOAPHeader.getChildNodes()
方法的一些代码示例,展示了SOAPHeader.getChildNodes()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。SOAPHeader.getChildNodes()
方法的具体详情如下:
包路径:javax.xml.soap.SOAPHeader
类名称:SOAPHeader
方法名:getChildNodes
暂无
代码示例来源:origin: stackoverflow.com
SOAPHeader header = message.getSOAPHeader();
if (header == null) {
// Throw an exception
}
NodeList headerPartNode = header.getChildNodes();
String headerPart = headerPartNode.item(0).getChildNodes().item(0).getNodeValue();
代码示例来源:origin: net.servicegrid/jp.go.nict.langrid.commons
@Override
public int size() {
return header.getChildNodes().getLength();
}
代码示例来源:origin: picketlink/picketlink
private Node getBinaryToken(SOAPHeader soapHeader) {
if (soapHeader != null) {
NodeList children = soapHeader.getChildNodes();
int length = children != null ? children.getLength() : 0;
for (int i = 0; i < length; i++) {
Node child = children.item(i);
if (child.getNodeName().contains(WSSE.BINARY_SECURITY_TOKEN)) {
return child;
}
}
}
return null;
}
代码示例来源:origin: org.picketlink/picketlink-federation
private Node getBinaryToken(SOAPHeader soapHeader) {
if (soapHeader != null) {
NodeList children = soapHeader.getChildNodes();
int length = children != null ? children.getLength() : 0;
for (int i = 0; i < length; i++) {
Node child = children.item(i);
if (child.getNodeName().contains(WSSE.BINARY_SECURITY_TOKEN)) {
return child;
}
}
}
return null;
}
代码示例来源:origin: org.picketlink/picketlink-core
private Node getBinaryToken(SOAPHeader soapHeader) {
if (soapHeader != null) {
NodeList children = soapHeader.getChildNodes();
int length = children != null ? children.getLength() : 0;
for (int i = 0; i < length; i++) {
Node child = children.item(i);
if (child.getNodeName().contains(WSSE.BINARY_SECURITY_TOKEN)) {
return child;
}
}
}
return null;
}
代码示例来源:origin: org.picketlink/picketlink-fed
private Node getBinaryToken(SOAPHeader soapHeader)
{
if (soapHeader != null)
{
NodeList children = soapHeader.getChildNodes();
int length = children != null ? children.getLength() : 0;
for (int i = 0; i < length; i++)
{
Node child = children.item(i);
if (child.getNodeName().contains(WSSE.BINARY_SECURITY_TOKEN))
{
return child;
}
}
}
return null;
}
代码示例来源:origin: org.picketlink/picketlink-fed-core
private Node getBinaryToken(SOAPHeader soapHeader)
{
if (soapHeader != null)
{
NodeList children = soapHeader.getChildNodes();
int length = children != null ? children.getLength() : 0;
for (int i = 0; i < length; i++)
{
Node child = children.item(i);
if (child.getNodeName().contains(WSSE.BINARY_SECURITY_TOKEN))
{
return child;
}
}
}
return null;
}
代码示例来源:origin: com.betfair.cougar/cougar-test-utils
private void extractHeaderDataSOAP(SOAPMessage response, HttpResponseBean responseBean) throws SOAPException
{
//extract MimeHeaders
MimeHeaders mime = response.getMimeHeaders();
Iterator<MimeHeader> iter = mime.getAllHeaders();
while(iter.hasNext())
{
MimeHeader mimeH = iter.next();
responseBean.addEntryToResponseHeaders(mimeH.getName(),mimeH.getValue());
}
//extract SOAPHeaders from the envelope and a them to the mimeHeaders
if(response.getSOAPHeader()!=null)
{
javax.xml.soap.SOAPHeader header = response.getSOAPHeader();
NodeList nodes = header.getChildNodes();
for(int x=0; x<nodes.getLength();x++)
{
//if the header entry contains child nodes - write them with the node names
if(nodes.item(x).hasChildNodes()){
NodeList childnodes = nodes.item(x).getChildNodes();
for(int y = 0; y<childnodes.getLength();y++){
responseBean.addEntryToResponseHeaders(nodes.item(x).getLocalName(),childnodes.item(y).getLocalName()+":"+childnodes.item(y).getTextContent());
}
}
else{
responseBean.addEntryToResponseHeaders(nodes.item(x).getLocalName(), nodes.item(x).getTextContent());
}
}
}
}
代码示例来源:origin: org.jboss.ws.native/jbossws-native-core
private void prepareForSpecificAccess(State state) throws SOAPException
{
List<SOAPContentElement> contentElements = new LinkedList<SOAPContentElement>();
SOAPBody soapBody = this.getSOAPBody();
NodeList nodes = soapBody.getChildNodes();
for (int i = 0; i < nodes.getLength(); i++)
{
Node current = nodes.item(i);
if (current instanceof SOAPContentElement)
{
contentElements.add((SOAPContentElement)current);
break;
}
}
SOAPHeader soapHeader = this.getSOAPHeader();
nodes = soapHeader.getChildNodes();
for (int i = 0; i < nodes.getLength(); i++)
{
Node current = nodes.item(i);
if (current instanceof SOAPContentElement)
{
contentElements.add((SOAPContentElement)current);
break;
}
}
for (SOAPContentElement sce : contentElements)
{
sce.transitionTo(state);
}
}
代码示例来源:origin: com.hynnet/xws-security
NodeList hdrChilds = this.getSOAPHeader().getChildNodes();
for(int i = 0; i < hdrChilds.getLength(); i++){
Node child = hdrChilds.item(i);
代码示例来源:origin: org.objectweb.celtix/celtix-rt
NodeList hl = null;
if (msg.getSOAPHeader() != null) {
hl = msg.getSOAPHeader().getChildNodes();
代码示例来源:origin: com.hynnet/xws-security
NodeList hdrChilds = msg.getSOAPHeader().getChildNodes();
for(int i = 0; i < hdrChilds.getLength(); i++){
Node child = hdrChilds.item(i);
se.printStackTrace();
NodeList headers = soapHeader.getChildNodes();
Reference reference = null;
for(int i=0;i<headers.getLength();i++){
代码示例来源:origin: com.hynnet/xws-security
org.w3c.dom.NodeList headerChildNodes = header.getChildNodes();
if (headerChildNodes != null) {
org.w3c.dom.Node currentNode = null;
内容来源于网络,如有侵权,请联系作者删除!