Search in sources :

Example 1 with Name

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;
}
Also used : Iterator(java.util.Iterator) Name(jakarta.xml.soap.Name)

Example 2 with Name

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;
}
Also used : SOAPElement(jakarta.xml.soap.SOAPElement) Iterator(java.util.Iterator) Name(jakarta.xml.soap.Name)

Example 3 with Name

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;
}
Also used : Name(jakarta.xml.soap.Name)

Example 4 with Name

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;
}
Also used : SOAPElement(jakarta.xml.soap.SOAPElement) Name(jakarta.xml.soap.Name)

Example 5 with Name

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;
}
Also used : SOAPHeaderElement(jakarta.xml.soap.SOAPHeaderElement) SOAPException(jakarta.xml.soap.SOAPException) SOAPElement(jakarta.xml.soap.SOAPElement) Name(jakarta.xml.soap.Name)

Aggregations

Name (jakarta.xml.soap.Name)15 SOAPElement (jakarta.xml.soap.SOAPElement)7 SOAPHeaderElement (jakarta.xml.soap.SOAPHeaderElement)4 Iterator (java.util.Iterator)4 MessageFactory (jakarta.xml.soap.MessageFactory)3 SOAPBody (jakarta.xml.soap.SOAPBody)3 SOAPEnvelope (jakarta.xml.soap.SOAPEnvelope)3 SOAPException (jakarta.xml.soap.SOAPException)3 SOAPMessage (jakarta.xml.soap.SOAPMessage)3 SOAPBodyElement (jakarta.xml.soap.SOAPBodyElement)2 SAAJMessage (com.sun.xml.ws.message.saaj.SAAJMessage)1 ByteArrayBuffer (com.sun.xml.ws.util.ByteArrayBuffer)1 DataHandler (jakarta.activation.DataHandler)1 Message (jakarta.jms.Message)1 AttachmentPart (jakarta.xml.soap.AttachmentPart)1 Detail (jakarta.xml.soap.Detail)1 SOAPFault (jakarta.xml.soap.SOAPFault)1 SOAPHeader (jakarta.xml.soap.SOAPHeader)1 SOAPPart (jakarta.xml.soap.SOAPPart)1 ByteArrayOutputStream (java.io.ByteArrayOutputStream)1