本文整理了Java中javax.xml.soap.SOAPElement.removeContents()
方法的一些代码示例,展示了SOAPElement.removeContents()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。SOAPElement.removeContents()
方法的具体详情如下:
包路径:javax.xml.soap.SOAPElement
类名称:SOAPElement
方法名:removeContents
[英]Detaches all children of this SOAPElement
.
This method is useful for rolling back the construction of partially completed SOAPHeaders
and SOAPBodys
in preparation for sending a fault when an error condition is detected. It is also useful for recycling portions of a document within a SOAP message.
[中]分离此[$0$]的所有子项。
此方法可用于回滚部分完成的SOAPHeaders
和SOAPBodys
的构造,以便在检测到错误条件时发送故障。它还可用于回收SOAP消息中的文档部分。
代码示例来源:origin: org.springframework.ws/org.springframework.ws
@Override
public void removeContents(SOAPElement element) {
element.removeContents();
}
代码示例来源:origin: org.springframework.ws/org.springframework.ws
@Override
public void removeContents(SOAPElement element) {
element.removeContents();
}
代码示例来源:origin: com.hynnet/xws-security
public void removeContents() {
delegateElement.removeContents();
}
代码示例来源:origin: com.hynnet/xws-security
public void removeContents() {
delegateElement.removeContents();
}
代码示例来源:origin: com.hynnet/xws-security
public void removeContents() {
delegateHeader.removeContents();
}
代码示例来源:origin: com.hynnet/xws-security
public void removeContents() {
delegateElement.removeContents();
}
代码示例来源:origin: salesforce-marketingcloud/FuelSDK-Java
/**
* @param accessToken The access token
* @throws ETSdkException
*/
public void setAccessToken(String accessToken)
throws ETSdkException
{
if (accessTokenElement != null) {
accessTokenElement.removeContents();
try {
accessTokenElement.addTextNode(accessToken);
} catch (SOAPException ex) {
throw new ETSdkException("could not set access token", ex);
}
logger.debug("updated SOAP header with new access token "
+ accessToken);
}
}
}
代码示例来源:origin: org.pustefixframework.webservices/pustefix-webservices-jaxws
SOAPElement elem=(SOAPElement)it.next();
elem.setAttribute("class",error.getClass().getName());
elem.removeContents();
elem.removeAttribute("note");
代码示例来源:origin: apache/servicemix-bundles
reasonText = getFaultReasonTextElement(locale);
if (reasonText != null) {
reasonText.removeContents();
} else {
reasonText =
代码示例来源:origin: stackoverflow.com
void addWsSecurityHeader(org.apache.axis.client.Stub binding, String wsUser,String wsPass)throws SOAPException {
// Create the top-level WS-Security SOAP header XML name.
QName headerName = new QName("http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd", "Security");
SOAPHeaderElement header = new SOAPHeaderElement(headerName);
// no intermediate actors are involved.
header.setActor(null);
// not important, "wsse" is standard
header.setPrefix("wsse");
header.setMustUnderstand(true);
// Add the UsernameToken element to the WS-Security header
SOAPElement utElem = header.addChildElement("UsernameToken");
SOAPElement userNameElem = utElem.addChildElement("Username");
userNameElem.removeContents();
userNameElem.setValue(wsUser);
SOAPElement passwordElem = utElem.addChildElement("Password");
passwordElem.setValue(wsPass);
// Finally, attach the header to the binding.
binding.setHeader(header);
}
内容来源于网络,如有侵权,请联系作者删除!