use of jakarta.xml.soap.Name in project openmq by eclipse-ee4j.
the class MessageUtil method isJMSPropertyExists.
public static boolean isJMSPropertyExists(SOAPHeader sheader) throws SOAPException {
Name pname = createJMSName(InternalConstants.JMS_PROPERTY);
Iterator it = sheader.getChildElements(pname);
if (it.hasNext()) {
return true;
}
return false;
}
use of jakarta.xml.soap.Name in project openmq by eclipse-ee4j.
the class MessageUtil method getJMSChildElement.
public static SOAPElement getJMSChildElement(SOAPElement soapElement, String localName) throws SOAPException {
SOAPElement se = null;
Name name = createJMSName(localName);
Iterator it = soapElement.getChildElements(name);
if (it.hasNext()) {
se = (SOAPElement) it.next();
}
return se;
}
use of jakarta.xml.soap.Name in project openmq by eclipse-ee4j.
the class MessageUtil method getPropertyName.
public static String getPropertyName(SOAPElement se) throws SOAPException {
Name attrName = createJMSName(InternalConstants.PNAME);
String propName = se.getAttributeValue(attrName);
return propName;
}
use of jakarta.xml.soap.Name in project openmq by eclipse-ee4j.
the class MessageUtil method addJMSChildElement.
public static SOAPElement addJMSChildElement(SOAPElement element, String localName) throws SOAPException {
Name name = createJMSName(localName);
SOAPElement se = element.addChildElement(name);
return se;
}
use of jakarta.xml.soap.Name in project openmq by eclipse-ee4j.
the class MessageUtil method getServiceAttribute.
public static String getServiceAttribute(SOAPMessage soapm, String localName) throws SOAPException {
SOAPHeaderElement mh = getMessageHeaderElement(soapm);
SOAPElement serviceElement = getJMSChildElement(mh, Constants.SERVICE);
if (serviceElement == null) {
throw new SOAPException("Message does not contain a Service SOAP Header Element.");
}
Name n = createJMSName(localName);
String value = serviceElement.getAttributeValue(n);
return value;
}
Aggregations