/** * returns the algorithm URI */ public String getEncryptionMethodURI() { if (encryptionMethod == null) return null; return encryptionMethod.getAttribute("Algorithm"); }
SOAPElement elem = (SOAPElement)assertions.item(i); if(elem.getAttributeNode("ID")!= null){ assertionId = elem.getAttribute(MessageConstants.SAML_ID_LNAME); }else{ assertionId = elem.getAttribute(MessageConstants.SAML_ASSERTIONID_LNAME);
String valueType = valueElement.getAttribute("xsi:type"); if (valueType.equals("xsd:int")) value = new Long(valueElement.getValue());
public String getAttribute(String arg0) { return delegateElement.getAttribute(arg0); }
public String getAttribute(String arg0) { return delegateElement.getAttribute(arg0); }
public String getAttribute(String arg0) { return delegateHeader.getAttribute(arg0); }
public String getAttribute(String name) { return delegateElement.getAttribute(name); }
public String getId(){ try { return elem.getAttribute("Id"); } catch (Exception ex) { throw new RuntimeException("Error while extracting ID"); } }
@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); }
String uri = "http://jax-ws.dev.java.net/"; QName qnException = new QName(uri, "exception"); QName qnStackTrace = new QName(uri, "stackTrace"); QName qnFrame = new QName(uri, "frame"); SOAPFault fault = soapMsg.getSOAPBody().getFault(); System.out.println("code=" + fault.getFaultCode()); System.out.println("faultString=" + fault.getFaultString()); for (Iterator i=fault.getDetail().getDetailEntries(); i.hasNext(); ) { DetailEntry detailEntry = (DetailEntry)i.next(); for (Iterator j=detailEntry.getChildElements(qnException); j.hasNext(); ) { SOAPElement exception = (SOAPElement)j.next(); System.out.println("exception class=" + exception.getAttribute("class")); for (Iterator k=exception.getChildElements(qnStackTrace); k.hasNext(); ) { SOAPElement stackTrace = (SOAPElement)k.next(); for (Iterator l=stackTrace.getChildElements(qnFrame); l.hasNext(); ) { SOAPElement frame = (SOAPElement)l.next(); System.out.println(" class=" + frame.getAttribute("class")); System.out.println(" file =" + frame.getAttribute("file")); } } } }
/** * @return Iterator over referenceURI Strings */ public Iterator getReferences() { Vector references = new Vector(); Iterator eachChild = getChildElements(); while (eachChild.hasNext()) { Node object = (Node)eachChild.next(); if (object.getNodeType() == Node.ELEMENT_NODE) { SOAPElement element = (SOAPElement) object; if (element.getLocalName().equals("DataReference") && XMLUtil.inEncryptionNS(element)) { references.addElement(element.getAttribute("URI")); } } } return references.iterator(); }
/** * Parses a SOAP element and extracts an instance of this class. * * @param element Element to parse * @return Resulting instance */ public static ServiceNameType fromSOAPElement(SOAPElement element) { String value = TextExtractor.getText(element); QName qname = TextExtractor.getQName(value, element); String portName = element.getAttribute(Constants.PORT_NAME); portName = portName == null || portName.length() == 0 ? null : portName; return new ServiceNameType(qname, portName); }
private void processElement(SOAPElement soapElement) throws SOAPException { // Do inner first outer last Iterator it = soapElement.getChildElements(); while (it.hasNext()) { Node childElement = (Node)it.next(); if (childElement instanceof SOAPElement) processElement((SOAPElement)childElement); } String href = soapElement.getAttribute("href"); if (href.length() > 0) { processHRef(soapElement, href); soapElement.removeAttribute("href"); } }
String reference = soapelement.getAttribute("href"); if (reference == null || reference.trim().length() == 0) { reference = soapelement.getValue();
private KeyIdentifier getKeyIdentifier(SOAPElement element, boolean isBSP) throws XWSSecurityException { String keyIdValueType = element.getAttribute("ValueType"); if (isBSP && (keyIdValueType.length() < 1)) { throw new XWSSecurityException("Voilation of BSP R3054 " + String keyIdEncodingType = element.getAttribute("EncodingType"); if (isBSP && (keyIdEncodingType.length() < 1)) { throw new XWSSecurityException("Voilation of BSP R3070 " +
String reference = soapelement.getAttribute("href"); if (reference == null || reference.trim().length() == 0) { reference = soapelement.getValue();
@Override public AttachmentPart getAttachment(SOAPElement element) throws SOAPException { try { initializeAllAttachments(); } catch (Exception e) { throw new RuntimeException(e); } String uri; String hrefAttr = element.getAttribute("href"); if ("".equals(hrefAttr)) { Node node = getValueNodeStrict(element); String swaRef = null; if (node != null) { swaRef = node.getValue(); } if (swaRef == null || "".equals(swaRef)) { return null; } else { uri = swaRef; } } else { uri = hrefAttr; } return getAttachmentPart(uri); }
createdValueType = subElement.getAttribute("ValueType"); expiresValueType = subElement.getAttribute("ValueType"); wsuId = element.getAttribute("wsu:Id"); if ("".equalsIgnoreCase(wsuId)) { wsuId = null;
/** * Constructor RelatesTo. * * @param element Source element * @throws MalformedURIException If an error occurs */ public RelatesTo(SOAPElement element) throws MalformedURIException { super(); AddressingVersion version = AddressingUtils.getAddressingVersion( element.getNamespaceURI()); this.setURI(new URI(TextExtractor.getText(element))); String value = element.getAttribute(Constants.RELATIONSHIP_TYPE); if (value != null && value.length() > 0) { if (version.isW3C()) { this.setTypeIRI(value); } else { int pos = value.indexOf(':'); if (pos == -1) { this.setType(new QName(value)); } else { String namespace = element.getNamespaceURI(value.substring(0, pos)); this.setType(new QName(namespace, value.substring(pos + 1))); } } } else { this.setType(version.getResponseRelationshipType()); } }
if (href.equals("#" + auxElement.getAttribute("id")))