public class PullMessage extends EnumerationMessage
An example of how to use this class to create a Pull request same as WS-Enumeration spec and send it to the specified endpoint:
PullMessage request = new PullMessage(); request.setReplyTo(REPLYTO); request.setTo(TO); request.setMessageID(UUID); Pull pull = new Pull(); pull.setMaxTime(DatatypeFactory.newInstance().newDuration("P30D")); pull.setMaxElements(new BigInteger("10")); EnumerationContextType context = new EnumerationContextType(); context.getContent().add("123"); pull.setEnumerationContext(context); request.setPull(pull); try { PullResponseMessage response = (PullResponseMessage)request.send(ENDPOINT); } catch (AddressingException e) { // AddressingException indicates the response is a fault message } catch (RuntimeException e) { // unexpected response, not PullResponseMessage or fault ....... } catch (SOAPException e) { // some other error ....... }
PullResponseMessage
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
PULL_ACTION_URI |
ACTION_NOT_SUPPORTED_SUBCODE, DESTINATION_UNREACHABLE_SUBCODE, ENDPOINT_UNAVAILABLE_SUBCODE, INVALID_MESSAGE_INFORMATION_HEADER_SUBCODE, MESSAGE_INFORMATION_HEADER_REQUIRED_SUBCODE
Constructor and Description |
---|
PullMessage()
The constructor for creating an PullMessage
|
PullMessage(javax.xml.soap.SOAPMessage msg)
The constructor for parsing an PullMessage
|
PullMessage(java.lang.String addressingNamespace) |
PullMessage(java.lang.String addressingNamespace, boolean usingSOAP12) |
Modifier and Type | Method and Description |
---|---|
Pull |
getPull() |
void |
setAction(java.lang.String action)
Overwrite setAction() so that actoin is always http://schemas.xmlsoap.org/ws/2004/09/enumeration/Pull
|
void |
setPull(Pull pull)
Set the Pull.
|
addRelatesTo, addRelatesTo, addRelatesTo, addRelatesTo, getAction, getAddressingNamespace, getFaultTo, getFrom, getMessageID, getRelatesTo, getReplyTo, getSOAPMessage, getTo, send, send, setFaultTo, setFaultTo, setFrom, setFrom, setMessageID, setReplyTo, setReplyTo, setSOAPVersion, setTo, setTo
public static final java.lang.String PULL_ACTION_URI
public PullMessage() throws javax.xml.soap.SOAPException, java.net.URISyntaxException
javax.xml.soap.SOAPException
java.net.URISyntaxException
public PullMessage(java.lang.String addressingNamespace) throws javax.xml.soap.SOAPException, java.net.URISyntaxException
javax.xml.soap.SOAPException
java.net.URISyntaxException
public PullMessage(java.lang.String addressingNamespace, boolean usingSOAP12) throws javax.xml.soap.SOAPException, java.net.URISyntaxException
javax.xml.soap.SOAPException
java.net.URISyntaxException
public PullMessage(javax.xml.soap.SOAPMessage msg) throws javax.xml.soap.SOAPException
msg
-javax.xml.soap.SOAPException
public final void setAction(java.lang.String action) throws java.net.URISyntaxException
setAction
in class AddressingMessage
java.net.URISyntaxException
public Pull getPull() throws javax.xml.soap.SOAPException
javax.xml.soap.SOAPException
public void setPull(Pull pull) throws javax.xml.soap.SOAPException
pull
-javax.xml.soap.SOAPException