本文整理了Java中javax.xml.soap.Node.getValue()
方法的一些代码示例,展示了Node.getValue()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Node.getValue()
方法的具体详情如下:
包路径:javax.xml.soap.Node
类名称:Node
方法名:getValue
[英]Returns the value of this node if this is a Text
node or the value of the immediate child of this node otherwise. If there is an immediate child of this Node
that it is a Text
node then it's value will be returned. If there is more than one Text
node then the value of the first Text
Node will be returned. Otherwise null
is returned.
[中]如果这是Text
节点,则返回该节点的值,否则返回该节点的直接子节点的值。如果此Node
的直接子节点是Text
节点,则将返回其值。如果有多个Text
节点,则将返回第一个Text
节点的值。否则返回null
。
代码示例来源:origin: stackoverflow.com
while (it.hasNext()) {
value = element.getValue();
代码示例来源:origin: org.switchyard.components/switchyard-component-soap
/**
* Get the WS-A MessageID from the envelope.
*
* @param soapEnvelope The SOAPEnvelope
* @return The message id if found, null otehrwise
* @throws SOAPException If the envelope could not be read
*/
public static String getMessageID(SOAPEnvelope soapEnvelope) throws SOAPException {
NodeList headers = soapEnvelope.getHeader().getElementsByTagNameNS(WSA_ACTION_QNAME.getNamespaceURI(), WSA_ACTION_QNAME.getLocalPart());
if (headers.getLength() == 1) {
return ((javax.xml.soap.Node)headers.item(0)).getValue();
}
return null;
}
代码示例来源:origin: jboss-switchyard/components
/**
* Get the WS-A MessageID from the envelope.
*
* @param soapEnvelope The SOAPEnvelope
* @return The message id if found, null otehrwise
* @throws SOAPException If the envelope could not be read
*/
public static String getMessageID(SOAPEnvelope soapEnvelope) throws SOAPException {
NodeList headers = soapEnvelope.getHeader().getElementsByTagNameNS(WSA_ACTION_QNAME.getNamespaceURI(), WSA_ACTION_QNAME.getLocalPart());
if (headers.getLength() == 1) {
return ((javax.xml.soap.Node)headers.item(0)).getValue();
}
return null;
}
代码示例来源:origin: se.skltp.mb/mb-intsvc
private String extractTargetOrg(SOAPMessage soapMessage) throws SOAPException {
// rivta2.0 uses To, 2.1 uses LogicalAddress
Iterator iter = soapMessage.getSOAPHeader().getChildElements(TO_QNAME);
if (!iter.hasNext()) {
iter = soapMessage.getSOAPHeader().getChildElements(LOGICAL_ADDRESS_QNAME);
}
if (!iter.hasNext()) {
throw new RuntimeException("No address node found in header!");
}
return ((Node)iter.next()).getValue();
}
代码示例来源:origin: se.skltp.mb/mb-modules-intsvc
private String extractTargetOrg(SOAPMessage soapMessage) throws SOAPException {
// rivta2.0 uses To, 2.1 uses LogicalAddress
Iterator iter = soapMessage.getSOAPHeader().getChildElements(TO_QNAME);
if ( !iter.hasNext() ) {
iter = soapMessage.getSOAPHeader().getChildElements(LOGICAL_ADDRESS_QNAME);
}
if ( !iter.hasNext() ) {
throw new RuntimeException("No address node found in header!");
}
return ((Node) iter.next()).getValue();
}
代码示例来源:origin: org.n52.sensorweb.sos/binding-soap
Node node = (Node) iter.next();
if (node.getLocalName() != null && node.getLocalName().equals(WsaConstants.EN_ADDRESS)) {
wsaHeaders.add(new WsaReplyToHeader(node.getValue()));
replyTo = true;
代码示例来源:origin: org.n52.svalbard/svalbard-xmlbeans
Node node = (Node) iter.next();
if (node.getLocalName() != null && node.getLocalName().equals(WsaConstants.EN_ADDRESS)) {
wsaHeaders.add(new WsaReplyToHeader(node.getValue()));
replyTo = true;
代码示例来源:origin: gooddata/GoodData-CL
/**
* Logs into the MS CRM 2011 Online
*
* @return the Live ID token
* @throws JaxenException issue with the response format
* @throws IOException generic IO issue
* @throws SOAPException issue with SOAP invocation
*/
public String login() throws IOException, SOAPException, JaxenException {
String msg = FileUtil.readStringFromClasspath("/com/gooddata/msdynamics/LiveIdLogin.xml", MsDynamicsWrapper.class);
msg = msg.replaceAll(LIVE_ID_SERVER_PLACEHOLDER, getHost());
msg = msg.replaceAll(LIVE_ID_USERNAME_PLACEHOLDER, getUsername());
msg = msg.replaceAll(LIVE_ID_PASSWORD_PLACEHOLDER, getPassword());
msg = msg.replaceAll(LIVE_ID_POLICY_PLACEHOLDER, getPolicy());
SOAPMessage response = soap.execute(HTTPS + LIVE_ID_HOST + LIVE_ID_ENDPOINT, msg);
XPath xp = soap.createXPath("//wsse:BinarySecurityToken/text()", response);
xp.addNamespace("wsse", WSSE_XMLNS);
Node result = (Node) xp.selectSingleNode(response.getSOAPBody());
return result.getValue();
}
代码示例来源:origin: org.apache.axis2/axis2-saaj
Node childSAAJNode = toSAAJNode(childNodes.item(i), saajEle);
if (childSAAJNode instanceof javax.xml.soap.Text) {
saajEle.addTextNode(childSAAJNode.getValue());
} else {
saajEle.addChildElement((javax.xml.soap.SOAPElement)childSAAJNode);
代码示例来源:origin: apache/axis2-java
Node childSAAJNode = toSAAJNode(childNodes.item(i), saajEle);
if (childSAAJNode instanceof javax.xml.soap.Text) {
saajEle.addTextNode(childSAAJNode.getValue());
} else {
saajEle.addChildElement((javax.xml.soap.SOAPElement)childSAAJNode);
代码示例来源:origin: stackoverflow.com
SOAPElement returnElement = (SOAPElement)responseElement.getChildElements().next();
if(responseBody.getFault()!=null){
System.out.println(returnElement.getValue()+" "+responseBody.getFault().getFaultString());
} else {
System.out.println(returnElement.getValue());
代码示例来源:origin: org.jboss.ws.native/jbossws-native-core
String value = childNode.getValue();
hrefElement.setValue(value);
内容来源于网络,如有侵权,请联系作者删除!