public class TransferGet extends TransferMessage
An example of how to use this class to create a Get request same as WS-Transfer spec and send it to the specified endpoint:
TransferGet g = new TransferGet(); g.setReplyTo(REPLYTO); g.setTo(TO); g.setMessageID(UUID); SOAPHeader header = g.getSOAPMessage().getSOAPHeader(); SOAPHeaderElement headerElement = header.addHeaderElement(customerID); headerElement.addTextNode(ID); headerElement = header.addHeaderElement(region); headerElement.addTextNode(REGION); try { TransferGetResponse response = (TransferGetResponse)g.send(ENDPOINT); } catch (AddressingException e) { // AddressingException indicates the response is a fault message // using the standard fault codes defined in WS-Addressing (e.g., wsa:ActionNotSupported) } catch (RuntimeException e) { // unexpected response, not GetResponse or fault ....... } catch (SOAPException e) { // some other error ....... }
TransferGetResponse
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
GET_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 |
---|
TransferGet()
The constructor for creating a Get request
|
TransferGet(javax.xml.soap.SOAPMessage msg)
The constructor for parsing a Get request
|
TransferGet(java.lang.String addressingNamespace) |
TransferGet(java.lang.String addressingNamespace, boolean usingSOAP12) |
Modifier and Type | Method and Description |
---|---|
void |
setAction(java.lang.String action)
Overwrite setAction() so that actoin is always http://schemas.xmlsoap.org/ws/2004/09/transfer/Get
|
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 GET_ACTION_URI
public TransferGet() throws javax.xml.soap.SOAPException, java.net.URISyntaxException
javax.xml.soap.SOAPException
java.net.URISyntaxException
public TransferGet(java.lang.String addressingNamespace) throws javax.xml.soap.SOAPException, java.net.URISyntaxException
javax.xml.soap.SOAPException
java.net.URISyntaxException
public TransferGet(java.lang.String addressingNamespace, boolean usingSOAP12) throws javax.xml.soap.SOAPException, java.net.URISyntaxException
javax.xml.soap.SOAPException
java.net.URISyntaxException
public TransferGet(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