public final class Communicator extends Object
Message and Header
objects.
WARNING: This class is a private utility class used by WS-RX implementation.
Any usage outside the intended scope is strongly discouraged. The API exposed
by this class may be changed, replaced or removed without any advance notice.
| Modifier and Type | Class and Description |
|---|---|
static class |
Communicator.Builder |
| Modifier and Type | Field and Description |
|---|---|
QName |
soapMustUnderstandAttributeName |
| Modifier and Type | Method and Description |
|---|---|
static Communicator.Builder |
builder(String name) |
void |
close() |
com.sun.xml.ws.api.message.Packet |
createEmptyRequestPacket(boolean expectReply)
Creates a new empty request packet
|
com.sun.xml.ws.api.message.Packet |
createEmptyRequestPacket(String requestWsaAction,
boolean expectReply)
Creates a new empty request packet with an empty message that has WS-A action set
|
com.sun.xml.ws.api.message.Packet |
createEmptyResponsePacket(com.sun.xml.ws.api.message.Packet requestPacket,
String responseWsaAction)
Creates an empty (no SOAP body payload) new response packet based for the
supplied request packet with the provided response WS-Addressing action set.
|
com.sun.xml.ws.api.message.Packet |
createNullResponsePacket(com.sun.xml.ws.api.message.Packet requestPacket)
Creates a null (no message) response packet based for the supplied request packet.
|
com.sun.xml.ws.api.message.Packet |
createRequestPacket(com.sun.xml.ws.api.message.Message message,
String wsaAction,
boolean expectReply) |
com.sun.xml.ws.api.message.Packet |
createRequestPacket(Object jaxbElement,
String wsaAction,
boolean expectReply) |
com.sun.xml.ws.api.message.Packet |
createRequestPacket(com.sun.xml.ws.api.message.Packet originalRequestPacket,
Object jaxbElement,
String wsaAction,
boolean expectReply) |
com.sun.xml.ws.api.message.Packet |
createResponsePacket(com.sun.xml.ws.api.message.Packet requestPacket,
com.sun.xml.ws.api.message.Message message,
String responseWsaAction)
Creates new response packet based for the supplied request packet
with the provided response WS-Addressing action set.
|
com.sun.xml.ws.api.message.Packet |
createResponsePacket(com.sun.xml.ws.api.message.Packet requestPacket,
Object jaxbElement,
String responseWsaAction,
boolean isClientResponse)
Creates new response packet based for the supplied request packet
with the provided response WS-Addressing action set.
|
com.sun.xml.ws.api.addressing.AddressingVersion |
getAddressingVersion() |
com.sun.xml.ws.api.Component |
getContainer() |
com.sun.xml.ws.api.EndpointAddress |
getDestinationAddress()
Provides the destination endpoint reference this
Communicator is pointing to. |
com.sun.xml.ws.api.SOAPVersion |
getSoapVersion() |
String |
getWsaAction(com.sun.xml.ws.api.message.Packet packet)
Returns the value of WS-Addressing
Action header of a message stored
in the Packet. |
String |
getWsaTo(com.sun.xml.ws.api.message.Packet packet)
Returns the value of WS-Addressing
To header of a message stored
in the Packet. |
boolean |
isClosed() |
com.sun.xml.ws.api.message.Packet |
send(com.sun.xml.ws.api.message.Packet request)
Sends the request
Packet and returns the corresponding response Packet. |
void |
sendAsync(com.sun.xml.ws.api.message.Packet request,
com.sun.xml.ws.api.pipe.Fiber.CompletionCallback completionCallbackHandler)
Asynchronously sends the request
Packet |
void |
sendAsync(com.sun.xml.ws.api.message.Packet request,
com.sun.xml.ws.api.pipe.Fiber.CompletionCallback completionCallbackHandler,
com.sun.xml.ws.api.pipe.FiberContextSwitchInterceptor interceptor) |
void |
setDestinationAddress(com.sun.xml.ws.api.EndpointAddress newValue) |
void |
setDestinationAddressFrom(com.sun.xml.ws.api.message.Packet packet) |
com.sun.xml.ws.api.message.Packet |
setEmptyRequestMessage(com.sun.xml.ws.api.message.Packet request,
String wsaAction)
Creates a new JAX-WS
Message object that doesn't have any payload
and sets it as the current packet content as a request message. |
com.sun.xml.ws.api.message.Packet |
setEmptyResponseMessage(com.sun.xml.ws.api.message.Packet response,
com.sun.xml.ws.api.message.Packet request,
String wsaAction)
Overwrites the
Message of the response packet with a newly created empty Message instance. |
SecurityTokenReferenceType |
tryStartSecureConversation(com.sun.xml.ws.api.message.Packet request)
If security is enabled, tries to initate secured conversation and obtain the security token reference.
|
public final QName soapMustUnderstandAttributeName
public static Communicator.Builder builder(String name)
public final com.sun.xml.ws.api.message.Packet createRequestPacket(Object jaxbElement, String wsaAction, boolean expectReply)
public final com.sun.xml.ws.api.message.Packet createRequestPacket(com.sun.xml.ws.api.message.Message message,
String wsaAction,
boolean expectReply)
public final com.sun.xml.ws.api.message.Packet createRequestPacket(com.sun.xml.ws.api.message.Packet originalRequestPacket,
Object jaxbElement,
String wsaAction,
boolean expectReply)
public com.sun.xml.ws.api.message.Packet createEmptyRequestPacket(boolean expectReply)
public com.sun.xml.ws.api.message.Packet createEmptyRequestPacket(String requestWsaAction, boolean expectReply)
public com.sun.xml.ws.api.message.Packet createResponsePacket(@NotNull
com.sun.xml.ws.api.message.Packet requestPacket,
Object jaxbElement,
String responseWsaAction,
boolean isClientResponse)
requestPacket - original request the newly created response belongs toresponseWsaAction - WS-Addressing action header value to be setisClientResponse - determines whether the response is technically a client requestpublic com.sun.xml.ws.api.message.Packet createResponsePacket(com.sun.xml.ws.api.message.Packet requestPacket,
com.sun.xml.ws.api.message.Message message,
String responseWsaAction)
requestPacket - original request the newly created response belongs toresponseWsaAction - WS-Addressing action header value to be setpublic com.sun.xml.ws.api.message.Packet createEmptyResponsePacket(com.sun.xml.ws.api.message.Packet requestPacket,
String responseWsaAction)
requestPacket - original request the newly created response belongs toresponseWsaAction - WS-Addressing action header value to be setpublic com.sun.xml.ws.api.message.Packet createNullResponsePacket(com.sun.xml.ws.api.message.Packet requestPacket)
requestPacket - original request the newly created response belongs topublic final com.sun.xml.ws.api.message.Packet setEmptyRequestMessage(com.sun.xml.ws.api.message.Packet request,
String wsaAction)
Message object that doesn't have any payload
and sets it as the current packet content as a request message.wsaAction - WS-Addressing action header to setPacketAdapter instancepublic final com.sun.xml.ws.api.message.Packet setEmptyResponseMessage(com.sun.xml.ws.api.message.Packet response,
com.sun.xml.ws.api.message.Packet request,
String wsaAction)
Message of the response packet with a newly created empty Message instance.
Unlike Packet.setMessage(Message), this method fills in the Message's WS-Addressing headers
correctly, based on the provided request packet WS-Addressing headers.requestAdapter - wsaAction - public String getWsaAction(com.sun.xml.ws.api.message.Packet packet)
Action header of a message stored
in the Packet.packet - JAX-WS RI packetAction header, null if the header is not presentpublic String getWsaTo(com.sun.xml.ws.api.message.Packet packet)
To header of a message stored
in the Packet.packet - JAX-WS RI packetTo header, null if the header is not presentpublic SecurityTokenReferenceType tryStartSecureConversation(com.sun.xml.ws.api.message.Packet request) throws WSTrustException
null if there is no SC configuredWSTrustExceptionpublic com.sun.xml.ws.api.message.Packet send(@NotNull
com.sun.xml.ws.api.message.Packet request)
Packet and returns the corresponding response Packet.
This method should be used for Req-Res MEPrequest - Packet containing the message to be sendMessage wrapped in a response Packet receivedpublic void sendAsync(@NotNull
com.sun.xml.ws.api.message.Packet request,
@Nullable
com.sun.xml.ws.api.pipe.Fiber.CompletionCallback completionCallbackHandler)
Packetrequest - Packet containing the message to be sendcompletionCallbackHandler - completion callback handler to process the response.
May be null. In such case a generic completion callback handler will be used.public void sendAsync(@NotNull
com.sun.xml.ws.api.message.Packet request,
@Nullable
com.sun.xml.ws.api.pipe.Fiber.CompletionCallback completionCallbackHandler,
@Nullable
com.sun.xml.ws.api.pipe.FiberContextSwitchInterceptor interceptor)
@Nullable public com.sun.xml.ws.api.EndpointAddress getDestinationAddress()
Communicator is pointing to.
May return null (typically when used on the server side).null in case the destination address has
not been specified when constructing this Communicator instance.public void setDestinationAddress(com.sun.xml.ws.api.EndpointAddress newValue)
public void setDestinationAddressFrom(com.sun.xml.ws.api.message.Packet packet)
public com.sun.xml.ws.api.addressing.AddressingVersion getAddressingVersion()
public com.sun.xml.ws.api.SOAPVersion getSoapVersion()
public void close()
public boolean isClosed()
public com.sun.xml.ws.api.Component getContainer()
Copyright © 2005–2018 Oracle Corporation. All rights reserved.