本文整理了Java中javax.xml.soap.SOAPElement.getValue()
方法的一些代码示例,展示了SOAPElement.getValue()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。SOAPElement.getValue()
方法的具体详情如下:
包路径:javax.xml.soap.SOAPElement
类名称:SOAPElement
方法名:getValue
暂无
代码示例来源:origin: org.springframework.ws/org.springframework.ws
@Override
public String getText(SOAPElement element) {
return element.getValue();
}
代码示例来源:origin: org.springframework.ws/org.springframework.ws
@Override
public String getText(SOAPElement element) {
return element.getValue();
}
代码示例来源:origin: org.springframework.ws/org.springframework.ws
@Override
public String getText(SOAPElement element) {
return element.getValue();
}
代码示例来源:origin: com.hynnet/xws-security
public String getValue() {
return delegateElement.getValue();
}
代码示例来源:origin: com.hynnet/xws-security
public String getValue() {
return delegateHeader.getValue();
}
代码示例来源:origin: com.hynnet/xws-security
public String getValue() {
return delegateElement.getValue();
}
代码示例来源:origin: com.hynnet/xws-security
public String getValue() {
return delegateElement.getValue();
}
代码示例来源:origin: net.sourceforge.addressing/addressing
/**
* Gets the text contained in the specified SOAP element.
*
* @param element Element to parse
* @return Contained text
*/
public static String getText(SOAPElement element) {
String value = element.getValue();
return (value == null) ? "" : value.trim();
}
代码示例来源:origin: org.jboss.ws.native/jbossws-native-core
@Override
public AttachmentPart getAttachment(SOAPElement element) throws SOAPException
{
String ref = element.getAttribute("href");
if (ref.length() == 0)
{
ref = element.getValue();
if (ref == null || ref.length() == 0)
return null;
}
return getAttachmentByRef(ref);
}
代码示例来源:origin: org.jboss.ws.native/jbossws-native-core
public String getFaultRole()
{
if (Constants.NS_SOAP11_ENV.equals(getNamespaceURI()))
throw new UnsupportedOperationException(BundleUtils.getMessage(bundle, "NOT_SUPPORT_ROLE"));
if (faultactor == null)
{
findRoleElement();
if (faultactor == null)
return null;
}
return faultactor.getValue();
}
代码示例来源:origin: org.jboss.ws.native/jbossws-native-core
public String getFaultNode()
{
if (Constants.NS_SOAP11_ENV.equals(getNamespaceURI()))
throw new UnsupportedOperationException(BundleUtils.getMessage(bundle, "NOT_SUPPORT_NODE"));
if (faultnode == null)
{
findNodeElement();
if (faultnode == null)
return null;
}
return faultnode.getValue();
}
代码示例来源:origin: org.jboss.ws.native/jbossws-native-core
/** Gets the fault code for this SOAPFault object.
*/
public String getFaultCode()
{
if (Constants.NS_SOAP11_ENV.equals(getNamespaceURI()))
{
if (faultcode == null)
findFaultCodeElement();
return faultcode.getValue();
}
else
{
if (faultcode == null)
findCodeElement();
return getChildValueElement(faultcode).getValue();
}
}
代码示例来源:origin: org.fabric3/fabric3-binding-ws-metro
/**
* Sets the callback endpoint address specified by the WSA header in the current work context.
*
* @param element the WSA header
* @param workContext the current work context
*/
@SuppressWarnings("unchecked")
private void setReturnAddress(SOAPElement element, WorkContext workContext) {
Iterator<SOAPElement> addresses = (Iterator<SOAPElement>) element.getChildElements(WSA_ADDRESS);
if (addresses.hasNext()) {
String address = addresses.next().getValue();
if (WSA_ANONYMOUS.equals(address)) {
throw new ProtocolException("Invalid Callback Address: " + WSA_ANONYMOUS);
}
if (address != null) {
workContext.setHeader(CallbackConstants.ENDPOINT_ADDRESS, address);
}
}
}
代码示例来源:origin: org.jboss.ws.native/jbossws-native-core
public Iterator getFaultReasonTexts() throws SOAPException
{
if (Constants.NS_SOAP11_ENV.equals(getNamespaceURI()))
throw new UnsupportedOperationException(BundleUtils.getMessage(bundle, "NOT_SUPPORT_REASON"));
if (faultstring == null)
{
findReasonElement();
if (faultstring == null)
return Collections.EMPTY_LIST.iterator();
}
ArrayList<String> texts = new ArrayList<String>();
Iterator it = faultstring.getChildElements(Constants.SOAP12_TEXT);
while (it.hasNext())
{
SOAPElement textElement = (SOAPElement)it.next();
texts.add(textElement.getValue());
}
if (texts.isEmpty())
throw new SOAPException(BundleUtils.getMessage(bundle, "NO_TEXT_ELEMENTS_FOUND"));
return texts.iterator();
}
代码示例来源:origin: org.jboss.ws.native/jbossws-native-core
/** Gets the fault actor for this SOAPFault object.
*/
public String getFaultActor()
{
if (Constants.NS_SOAP11_ENV.equals(getNamespaceURI()))
{
if (faultactor == null)
{
findFaultActorElement();
if (faultactor == null)
return null;
}
return faultactor.getValue();
}
else return getFaultRole();
}
代码示例来源:origin: stackoverflow.com
/*
* soapXMLtoEndpoint sends the soapXMLFileLocation to the endpointURL
*/
public void soapXMLtoEndpoint(String endpointURL, String soapXMLFileLocation) throws SOAPException {
SOAPConnection connection = SOAPConnectionFactory.newInstance().createConnection();
SOAPMessage response = connection.call(xmlStringToSOAPMessage(soapXMLFileLocation), endpointURL);
connection.close();
SOAPBody responseBody = response.getSOAPBody();
SOAPBodyElement responseElement = (SOAPBodyElement) responseBody.getChildElements().next();
SOAPElement returnElement = (SOAPElement) responseElement.getChildElements().next();
if (responseBody.getFault() != null) {
System.out.println("fault != null");
System.out.println(returnElement.getValue() + " " + responseBody.getFault().getFaultString());
} else {
serverResponse = returnElement.getValue();
System.out.println(serverResponse);
System.out.println("\nfault == null, got the response properly.\n");
}
}
代码示例来源:origin: net.servicegrid/jp.go.nict.langrid.commons
@Override
public SOAPElement addChildElement(SOAPElement arg0) throws SOAPException {
String uri = arg0.getNamespaceURI();
if(uri == null) return null;
String value = arg0.getValue();
if(value == null) value = arg0.getNodeValue();
if(value == null) return null;
headers.add(new RpcHeader(uri, arg0.getLocalName(), value));
return arg0;
}
代码示例来源:origin: org.jboss.ws.native/jbossws-native-core
public Iterator getFaultSubcodes()
{
if (Constants.NS_SOAP11_ENV.equals(getNamespaceURI()))
throw new UnsupportedOperationException(BundleUtils.getMessage(bundle, "NOT_SUPPORT_SUBCODE"));
ArrayList<QName> subcodes = new ArrayList<QName>();
SOAPElement baseCodeElement = faultcode;
SOAPElement subcodeElement;
for (subcodeElement = getChildSubcodeElement(baseCodeElement); subcodeElement != null; subcodeElement = getChildSubcodeElement(baseCodeElement))
{
SOAPElement valueElement = getChildValueElement(subcodeElement);
QName subcode = QNameBuilder.buildQName(valueElement, valueElement.getValue());
subcodes.add(subcode);
baseCodeElement = subcodeElement;
}
// this iterator should not support the remove method
return Collections.unmodifiableList(subcodes).iterator();
}
代码示例来源:origin: org.jboss.ws.native/jbossws-native-core
public QName getFaultCodeAsQName()
{
if (Constants.NS_SOAP11_ENV.equals(getNamespaceURI()))
{
if (faultcode == null)
findFaultCodeElement();
return QNameBuilder.buildQName(faultcode, faultcode.getValue());
}
else
{
if (faultcode == null)
findCodeElement();
SOAPElement valueElement = getChildValueElement(faultcode);
return QNameBuilder.buildQName(valueElement, valueElement.getValue());
}
}
代码示例来源:origin: org.jboss.ws.native/jbossws-native-core
public String getFaultReasonText(Locale locale) throws SOAPException
{
if (Constants.NS_SOAP11_ENV.equals(getNamespaceURI()))
throw new UnsupportedOperationException(BundleUtils.getMessage(bundle, "NOT_SUPPORT_REASON"));
if (locale == null)
return null;
if (faultstring == null)
{
findReasonElement();
if (faultstring == null)
return null;
}
SOAPElement textElement = getTextElement(locale);
return textElement != null ? textElement.getValue() : null;
}
内容来源于网络,如有侵权,请联系作者删除!