Home | Documentation |
wsrmapi.h File Reference
updated Tue May 21 2024 by Robert van Engelen
|
Classes | |
struct | soap_wsrm_data |
Plugin data. More... | |
struct | soap_wsrm_message |
Linked list of unacknowledged messages stored for retransmission. More... | |
struct | soap_wsrm_content |
Linked list of message content blocks. More... | |
struct | soap_wsrm_range |
struct | soap_wsrm_sequence |
Linked list of currently active message sequences. More... | |
Macros | |
#define | SOAP_WSRM_ID "WS-RM/1.14" |
#define | SOAP_WSRM_MAX_RETRIES 100 |
#define | SOAP_WSRM_MAX_SEC_TO_EXPIRE 3600 /* 3600 sec = one hour */ |
#define | SOAP_WSRM_TIMEOUT 10 /* 10 sec */ |
#define | SOAP_WSRM_NOCHAN 0x7FFFFFFF |
Typedefs | |
typedef struct soap_wsrm_sequence * | soap_wsrm_sequence_handle |
Enumerations | |
enum | soap_wsrm_enable { SOAP_WSRM_OFF, SOAP_WSRM_ON } |
wsrm engine state (on/off) More... | |
enum | soap_wsrm_message_state { SOAP_WSRM_INIT, SOAP_WSRM_ACK, SOAP_WSRM_NACK } |
Message state (initial, explicit ack'ed, or explicit nack'ed) More... | |
enum | soap_wsrm_state { SOAP_WSRM_NONE, SOAP_WSRM_UNKNOWN, SOAP_WSRM_CREATED, SOAP_WSRM_CLOSED, SOAP_WSRM_TERMINATED } |
Sequence state. More... | |
Functions | |
SOAP_FMAC1 int SOAP_FMAC2 | soap_wsrm (struct soap *soap, struct soap_plugin *plugin, void *arg) |
Plugin registry function, used with soap_register_plugin. More... | |
SOAP_FMAC1 int SOAP_FMAC2 | soap_wsrm_create (struct soap *soap, const char *to, const char *replyto, LONG64 expires, const char *wsa_id, soap_wsrm_sequence_handle *seq) |
Creates a new sequence. Sequences are usually created by the sender (client) and confirmed by the receiver (server). The 'to' server address must be used for all messages of the sequence to be sent to the WS-RM destination server. Optionally the 'replyto' address can be given of the WS-RM source to reply to. A sequence ID is generated by the server upon success. More... | |
SOAP_FMAC1 int SOAP_FMAC2 | soap_wsrm_create_offer (struct soap *soap, const char *to, const char *replyto, const char *id, LONG64 expires, enum wsrm__IncompleteSequenceBehaviorType behavior, const char *wsa_id, soap_wsrm_sequence_handle *seq) |
Creates a new sequence by offering suggested WS-RM parameters to the WS-RM destination. Sequences are usually created by the sender (client) and confirmed by the receiver (server). The 'to' server address must be used for all messages of the sequence to be sent to the WS-RM destination server. Optionally the 'replyto' address can be given of the WS-RM source to reply to. A sequence ID is generated by the server upon success. More... | |
SOAP_FMAC1 int SOAP_FMAC2 | soap_wsrm_create_offer_acksto (struct soap *soap, const char *to, const char *replyto, const char *acksto, const char *id, LONG64 expires, enum wsrm__IncompleteSequenceBehaviorType behavior, const char *wsa_id, soap_wsrm_sequence_handle *seq) |
Creates a new sequence by offering suggested WS-RM parameters to the WS-RM destination. Sequences are usually created by the sender (client) and confirmed by the receiver (server). The 'to' server address must be used for all messages of the sequence to be sent to the WS-RM destination server. Optionally the 'replyto' address can be given of the WS-RM source to reply to and an 'acksto' address can be given for acknowledgement messages to be sent to (normally to the reply to). A sequence ID is generated by the server upon success. More... | |
SOAP_FMAC1 int SOAP_FMAC2 | soap_wsrm_request_num (struct soap *soap, soap_wsrm_sequence_handle seq, const char *wsa_id, const char *wsa_action, ULONG64 num) |
Adds a WS-RM sequence message number to the next message transmitted. No acks are requested. More... | |
SOAP_FMAC1 int SOAP_FMAC2 | soap_wsrm_request (struct soap *soap, soap_wsrm_sequence_handle seq, const char *wsa_id, const char *wsa_action) |
Adds a WS-RM sequence message number to the next message transmitted to the WS-RM destination and increments the message counter by one. No acks are requested. More... | |
SOAP_FMAC1 int SOAP_FMAC2 | soap_wsrm_request_acks (struct soap *soap, soap_wsrm_sequence_handle seq, const char *wsa_id, const char *wsa_action) |
Adds a WS-RM sequence message number to the next message transmitted to the WS-RM destination and increments the message counter by one. Message acks for the current sequence are requested. More... | |
SOAP_FMAC1 int SOAP_FMAC2 | soap_wsrm_check_retry (struct soap *soap, soap_wsrm_sequence_handle seq) |
Client-side check to verify if the remote call can be retried when a failure occured. Increases the robustness of messages sends, by ensuring that the message was at least transmitted (but not necessarily received). Also implements HTTP 307 Temporary Redirect. Retries are limited to SOAP_WSRM_MAX_RETRIES iterations. More... | |
SOAP_FMAC1 int SOAP_FMAC2 | soap_wsrm_resend (struct soap *soap, soap_wsrm_sequence_handle seq, ULONG64 lower, ULONG64 upper) |
Resend all unacknowledged messages, i.e. messages that were automatically cached for this sequence. Messages stored in the sequence for retransmission (those that were previously sent but not acknowledged) are resent to the soap_wsrm_to() address (which was set by soap_wsrm_create() or soap_wsrm_create_offer(), or the ReplyTo address). It is recommended to resend messages after the last message in the sequence was transmitted before closing the sequence. To reduce unnecessary resend attempts, it is recommended to use soap_wsrm_request_ack() with the last message to request acks for messages already delivered. More... | |
SOAP_FMAC1 int SOAP_FMAC2 | soap_wsrm_resend_only_nacked (struct soap *soap, soap_wsrm_sequence_handle seq, ULONG64 lower, ULONG64 upper) |
Resend all explicitly nack'ed messages indicaed by peer. Messages stored in the sequence for retransmission (those that were previously sent but not acknowledged) are resent to the soap_wsrm_to() address (which was set by soap_wsrm_create() or soap_wsrm_create_offer(), or the ReplyTo address). More... | |
SOAP_FMAC1 int SOAP_FMAC2 | soap_wsrm_close (struct soap *soap, soap_wsrm_sequence_handle seq, const char *wsa_id) |
Closes the sequence, but does not yet terminate it. No new messages should be send, but messages can be resend with soap_wsrm_resend() if desired. More... | |
SOAP_FMAC1 int SOAP_FMAC2 | soap_wsrm_terminate (struct soap *soap, soap_wsrm_sequence_handle seq, const char *wsa_id) |
Terminates the sequence. No new messages should be send and no resends should be tried. Usually done after soap_wsrm_close() or any time to terminate the sequence prematurely. More... | |
SOAP_FMAC1 int SOAP_FMAC2 | soap_wsrm_pulse (struct soap *soap, int timeout) |
Sends acknowledgements for all open sessions to all peers. Must set send and recv timeouts to prevent blocking. More... | |
SOAP_FMAC1 int SOAP_FMAC2 | soap_wsrm_acknowledgement (struct soap *soap, soap_wsrm_sequence_handle seq, const char *wsa_id) |
Sends acknowledgements for all message sequences that require an acknowledgement (ack requested by peer) More... | |
SOAP_FMAC1 int SOAP_FMAC2 | soap_wsrm_non_acknowledgement (struct soap *soap, soap_wsrm_sequence_handle seq, ULONG64 nack) |
Sends nack non-acknowledgement for a message. More... | |
SOAP_FMAC1 soap_wsrm_sequence_handle SOAP_FMAC2 | soap_wsrm_seq (struct soap *soap) |
Assuming a SOAP header is received, gets the sequence associated with the message. More... | |
SOAP_FMAC1 void SOAP_FMAC2 | soap_wsrm_seq_release (struct soap *soap, soap_wsrm_sequence_handle seq) |
SOAP_FMAC1 int SOAP_FMAC2 | soap_wsrm_seq_created (struct soap *soap, soap_wsrm_sequence_handle seq) |
SOAP_FMAC1 int SOAP_FMAC2 | soap_wsrm_seq_valid (struct soap *soap, soap_wsrm_sequence_handle seq) |
SOAP_FMAC1 soap_wsrm_sequence_handle SOAP_FMAC2 | soap_wsrm_seq_lookup_id (struct soap *soap, const char *id) |
Function to look up sequence given its id. More... | |
SOAP_FMAC1 soap_wsrm_sequence_handle SOAP_FMAC2 | soap_wsrm_seq_lookup (struct soap *soap, const char *id) |
Function to look up sequence given its id. More... | |
SOAP_FMAC1 void SOAP_FMAC2 | soap_wsrm_seq_free (struct soap *soap, soap_wsrm_sequence_handle seq) |
Must be called to free the sequence allocated by soap_wsrm_create() or by soap_wsrm_create_offer(). Sequences created by soap_wsrm_create_offer return handles that are not automatically reclaimed by the engine. More... | |
SOAP_FMAC1 void SOAP_FMAC2 | soap_wsrm_cleanup (struct soap *soap) |
Cleans up all expired sequences and releases resources. To be used at the server side to periodically clean up WS-RM sequences. Server-side cleanup is automatic, as long as WS-RM is in use. Does not release client-side sequences allocated by soap_wsrm_create() or soap_wsrm_create_offer(). More... | |
SOAP_FMAC1 const char *SOAP_FMAC2 | soap_wsrm_to (const soap_wsrm_sequence_handle seq) |
Returns the endpoint address of the destination service that serves the sequence. Initially set with soap_wsrm_create or soap_wsrm_create_offer. HTTP 307 Temporary Redirect can change the endpoint during the lifetime of a message sequence. Thus, this function returns the most recent endpoint binding that can be used to send message to the server endpoint. More... | |
SOAP_FMAC1 const char *SOAP_FMAC2 | soap_wsrm_acksto (const soap_wsrm_sequence_handle seq) |
Returns the endpoint address of the AcksTo acknowledgement service that serves the sequence, when set with soap_wsrm_create() or soap_wsrm_create_offer() or NULL otherwise. HTTP 307 Temporary Redirect can change the endpoint during the lifetime of a message sequence. Thus, this function returns the most recent endpoint binding. More... | |
SOAP_FMAC1 ULONG64 SOAP_FMAC2 | soap_wsrm_num (const soap_wsrm_sequence_handle seq) |
Returns the current message number of the sequence. More... | |
SOAP_FMAC1 ULONG64 SOAP_FMAC2 | soap_wsrm_nack (const soap_wsrm_sequence_handle seq) |
Returns the number of non-acknowledged messages sent. More... | |
SOAP_FMAC1 ULONG64 SOAP_FMAC2 | soap_wsrm_msgs (const soap_wsrm_sequence_handle seq) |
Returns the number of complete messages received, or 0 when there is a gap. More... | |
SOAP_FMAC1 ULONG64 SOAP_FMAC2 | soap_wsrm_recvnum (const soap_wsrm_sequence_handle seq) |
Returns the message number of last message received. More... | |
SOAP_FMAC1 ULONG64 SOAP_FMAC2 | soap_wsrm_lastnum (const soap_wsrm_sequence_handle seq) |
Returns the last message number upon sequence close or 0. More... | |
SOAP_FMAC1 int SOAP_FMAC2 | soap_wsrm_check (struct soap *soap) |
Receiver (server)-side check for the presence of WS-Addressing and WS-RM header blocks in the SOAP header, checks for protocol errors, and rejects duplicate messages. Also prepares the return WS-RM header. This function should be called in the each service operation that supports WS-RM. Do not use this function in a ReplyTo response-accepting destination service operation. When NoDicards behavior is set, out of sequence messages will be discared until message sequence has resumed (requires peer resends). More... | |
SOAP_FMAC1 int SOAP_FMAC2 | soap_wsrm_check_and_wait (struct soap *soap, int timeout) |
Receiver (server)-side check for the presence of WS-Addressing and WS-RM header blocks in the SOAP header, checks for protocol errors, and rejects duplicate messages. Also prepares the return WS-RM header. This function should be called in the each service operation that supports WS-RM. Do not use this function in a ReplyTo response-accepting destination service operation. More... | |
SOAP_FMAC1 int SOAP_FMAC2 | soap_wsrm_check_send_empty_response (struct soap *soap) |
Receiver (server)-side check for the presence of WS-Addressing and WS-RM header blocks in the SOAP header, checks for protocol errors, and rejects duplicate messages. Also prepares the return WS-RM header. This function should be called in the each service operation that sends an empty response back (one-way messaging). The behavior is the same as soap_wsrm_check() followed by soap_send_empty_response(), but more efficient and prevents blocking. More... | |
SOAP_FMAC1 int SOAP_FMAC2 | soap_wsrm_check_send_empty_response_and_wait (struct soap *soap, int timeout) |
Receiver (server)-side check for the presence of WS-Addressing and WS-RM header blocks in the SOAP header, checks for protocol errors, and rejects duplicate messages. Also prepares the return WS-RM header. This function should be called in the each service operation that sends an empty response back (one-way messaging). The behavior is the same as soap_wsrm_check() followed by soap_send_empty_response(), but more efficient and prevents blocking. More... | |
SOAP_FMAC1 int SOAP_FMAC2 | soap_wsrm_reply_num (struct soap *soap, int flag) |
Prepares reply from service. When flag is set, adds a WS-RM sequence message number to the next message transmitted. No acks are requested. No WS-Addressing message relay. More... | |
SOAP_FMAC1 int SOAP_FMAC2 | soap_wsrm_reply (struct soap *soap, const char *wsa_id, const char *wsa_action) |
Server-side server operation reply to be performed when the service operation returns. Server operations that support WS-Addressing and WS-RM must call this function to return normally (and/or allow the response message to be relayed as per WS-Addressing). More... | |
SOAP_FMAC1 int SOAP_FMAC2 | soap_wsrm_reply_request_acks (struct soap *soap, const char *wsa_id, const char *wsa_action) |
Server-side server operation reply to be performed when the service operation returns. Message acks for the current sequence are requested, but only when client made a create sequence offer. Server operations that support WS-Addressing and WS-RM must call this function or call soap_wsrm_reply() to return normally (and/or allow the response message to be relayed as per WS-Addressing). More... | |
SOAP_FMAC1 int SOAP_FMAC2 | soap_wsrm_fault_subcode (struct soap *soap, int flag, const char *faultsubcode, const char *faultstring, const char *faultdetail) |
Sets sender/receiver SOAP Fault (sub)code for server faults (can be user defined faults). When called before soap_wsrm_check() in the server operation, terminates the current sequence. Otherwise, the sequence is not terminated. In either case the fault is returned to sender (client) or to the FaultTo server when the WS-Addressing FaultTo header was set by the sender. More... | |
SOAP_FMAC1 int SOAP_FMAC2 | soap_wsrm_sender_fault_subcode (struct soap *soap, const char *faultsubcode, const char *faultstring, const char *faultdetail) |
Sets sender SOAP Fault (sub)code for server faults (can be user defined faults). When called before soap_wsrm_check() in the server operation, terminates the current sequence. Otherwise, the sequence is not terminated. In either case the fault is returned to sender (client) or to the FaultTo server when the WS-Addressing FaultTo header was set by the sender. More... | |
SOAP_FMAC1 int SOAP_FMAC2 | soap_wsrm_receiver_fault_subcode (struct soap *soap, const char *faultsubcode, const char *faultstring, const char *faultdetail) |
Sets receiver SOAP Fault (sub)code for server faults (can be user defined faults). When called before soap_wsrm_check() in the server operation, terminates the current sequence. Otherwise, the sequence is not terminated. In either case the fault is returned to sender (client) or to the FaultTo server when the WS-Addressing FaultTo header was set by the sender. More... | |
SOAP_FMAC1 int SOAP_FMAC2 | soap_wsrm_sender_fault (struct soap *soap, const char *faultstring, const char *faultdetail) |
Sets sender SOAP Fault for server faults (can be user defined faults). When called before soap_wsrm_check() in the server operation, terminates the current sequence. Otherwise, the sequence is not terminated. In either case the fault is returned to sender (client) or to the FaultTo server when the WS-Addressing FaultTo header was set by the sender. More... | |
SOAP_FMAC1 int SOAP_FMAC2 | soap_wsrm_receiver_fault (struct soap *soap, const char *faultstring, const char *faultdetail) |
Sets receiver SOAP Fault for server faults (can be user defined faults). When called before soap_wsrm_check() in the server operation, terminates the current sequence. Otherwise, the sequence is not terminated. In either case the fault is returned to sender (client) or to the FaultTo server when the WS-Addressing FaultTo header was set by the sender. More... | |
SOAP_FMAC1 int SOAP_FMAC2 | soap_wsrm_check_fault (struct soap *soap, enum wsrm__FaultCodes *fault, const char **info) |
Checks the presence of a WS-RM fault at the client side (or in the FaultTo destination service) when a response is received. More... | |
SOAP_FMAC1 int SOAP_FMAC2 | soap_wsrm_error (struct soap *soap, struct soap_wsrm_sequence *seq, enum wsrm__FaultCodes fault) |
Sets SOAP Fault (sub)code for server WS-RM fault response. Terminates the sequence. More... | |
SOAP_FMAC1 void SOAP_FMAC2 | soap_wsrm_dump (struct soap *soap, FILE *fd) |
Dumps the current sequences and details of the wsrm plugin for diagnotics purposes. More... | |
SOAP_FMAC5 int SOAP_FMAC6 | __wsrm__CreateSequence (struct soap *soap, struct wsrm__CreateSequenceType *req, struct wsrm__CreateSequenceResponseType *res) |
WS-RM CreateSequence service operation. Automatically invoked by the server to process a create sequence request (with or without offer). Creates a new local sequence state to keep track of messages. More... | |
SOAP_FMAC5 int SOAP_FMAC6 | __wsrm__CreateSequenceResponse (struct soap *soap, struct wsrm__CreateSequenceResponseType *res) |
WS-RM CreateSequenceResponse one-way service operation. Automatically invoked by the server to process a create sequence response (with or without offer). Creates a new local sequence state to keep track of messages. More... | |
SOAP_FMAC5 int SOAP_FMAC6 | __wsrm__CloseSequence (struct soap *soap, struct wsrm__CloseSequenceType *req, struct wsrm__CloseSequenceResponseType *res) |
WS-RM CloseSequence service operation. Automatically invoked by the server to process the close sequence request. Updates the server's local sequence state to closed. More... | |
SOAP_FMAC5 int SOAP_FMAC6 | __wsrm__CloseSequenceResponse (struct soap *soap, struct wsrm__CloseSequenceResponseType *res) |
WS-RM CloseSequenceResponse one-way service operation. Automatically invoked by the server to process the close sequence response. Updates the server's local sequence state to closed. More... | |
SOAP_FMAC5 int SOAP_FMAC6 | __wsrm__TerminateSequence (struct soap *soap, struct wsrm__TerminateSequenceType *req, struct wsrm__TerminateSequenceResponseType *res) |
WS-RM TerminateSequence service operation. Automatically invoked by the server to process the terminate sequence request. Updates the server's local sequence state to terminated. More... | |
SOAP_FMAC5 int SOAP_FMAC6 | __wsrm__TerminateSequenceResponse (struct soap *soap, struct wsrm__TerminateSequenceResponseType *res) |
WS-RM TerminateSequenceResponse one-way service operation. Automatically invoked by the server to process the terminate sequence response. Updates the server's local sequence state to terminated. More... | |
SOAP_FMAC5 int SOAP_FMAC6 | __wsrm__SequenceAcknowledgement (struct soap *soap) |
WS-RM SequenceAcknowledgement operation. More... | |
SOAP_FMAC5 int SOAP_FMAC6 | __wsrm__AckRequested (struct soap *soap) |
WS-RM AckRequested operation. More... | |
SOAP_FMAC5 int SOAP_FMAC6 | __wsrm__LastMessage (struct soap *soap) |
WS-RM LastMessage operation (WS-RM 1.0). More... | |
SOAP_FMAC5 int SOAP_FMAC6 | soap_call___wsrm__CreateSequence (struct soap *soap, const char *soap_endpoint, const char *soap_action, struct wsrm__CreateSequenceType *wsrm__CreateSequence, struct wsrm__CreateSequenceResponseType *wsrm__CreateSequenceResponse) |
SOAP_FMAC5 int SOAP_FMAC6 | soap_call___wsrm__CloseSequence (struct soap *soap, const char *soap_endpoint, const char *soap_action, struct wsrm__CloseSequenceType *wsrm__CloseSequence, struct wsrm__CloseSequenceResponseType *wsrm__CloseSequenceResponse) |
SOAP_FMAC5 int SOAP_FMAC6 | soap_call___wsrm__TerminateSequence (struct soap *soap, const char *soap_endpoint, const char *soap_action, struct wsrm__TerminateSequenceType *wsrm__TerminateSequence, struct wsrm__TerminateSequenceResponseType *wsrm__TerminateSequenceResponse) |
SOAP_FMAC5 int SOAP_FMAC6 | soap_send___wsrm__SequenceAcknowledgement (struct soap *soap, const char *soap_endpoint, const char *soap_action) |
SOAP_FMAC5 int SOAP_FMAC6 | soap_recv___wsrm__SequenceAcknowledgement (struct soap *soap, struct __wsrm__SequenceAcknowledgement *) |
SOAP_FMAC5 int SOAP_FMAC6 | soap_send___wsrm__LastMessage (struct soap *soap, const char *soap_endpoint, const char *soap_action) |
Variables | |
const char | soap_wsrm_id [] |
#define SOAP_WSRM_ID "WS-RM/1.14" |
Plugin identification for plugin registry
#define SOAP_WSRM_MAX_RETRIES 100 |
Max number of retries that soap_wsrm_check_retry can succeed
#define SOAP_WSRM_MAX_SEC_TO_EXPIRE 3600 /* 3600 sec = one hour */ |
Max seconds (hard limit!) expiration of sequences
#define SOAP_WSRM_NOCHAN 0x7FFFFFFF |
WCF channel instance default value (no channel)
#define SOAP_WSRM_TIMEOUT 10 /* 10 sec */ |
Seconds to timeout when sending ack messages to independent acksto server
typedef struct soap_wsrm_sequence* soap_wsrm_sequence_handle |
enum soap_wsrm_enable |
enum soap_wsrm_state |
int __wsrm__AckRequested | ( | struct soap * | soap | ) |
WS-RM AckRequested operation.
soap | context |
int __wsrm__CloseSequence | ( | struct soap * | soap, |
struct wsrm__CloseSequenceType * | req, | ||
struct wsrm__CloseSequenceResponseType * | res | ||
) |
WS-RM CloseSequence service operation. Automatically invoked by the server to process the close sequence request. Updates the server's local sequence state to closed.
soap | context | |
[in] | req | wsrm__CloseSequence request message |
[out] | res | wsrm__CloseSequenceResponse response message |
int __wsrm__CloseSequenceResponse | ( | struct soap * | soap, |
struct wsrm__CloseSequenceResponseType * | res | ||
) |
WS-RM CloseSequenceResponse one-way service operation. Automatically invoked by the server to process the close sequence response. Updates the server's local sequence state to closed.
soap | context | |
[in] | res | wsrm__CloseSequenceResponse response message |
int __wsrm__CreateSequence | ( | struct soap * | soap, |
struct wsrm__CreateSequenceType * | req, | ||
struct wsrm__CreateSequenceResponseType * | res | ||
) |
WS-RM CreateSequence service operation. Automatically invoked by the server to process a create sequence request (with or without offer). Creates a new local sequence state to keep track of messages.
soap | context | |
[in] | req | wsrm__CreateSequence request message |
[out] | res | wsrm__CreateSequenceResponse response message |
int __wsrm__CreateSequenceResponse | ( | struct soap * | soap, |
struct wsrm__CreateSequenceResponseType * | res | ||
) |
WS-RM CreateSequenceResponse one-way service operation. Automatically invoked by the server to process a create sequence response (with or without offer). Creates a new local sequence state to keep track of messages.
soap | context | |
[in] | res | wsrm__CreateSequenceResponse response message |
int __wsrm__LastMessage | ( | struct soap * | soap | ) |
WS-RM LastMessage operation (WS-RM 1.0).
soap | context |
int __wsrm__SequenceAcknowledgement | ( | struct soap * | soap | ) |
WS-RM SequenceAcknowledgement operation.
soap | context |
int __wsrm__TerminateSequence | ( | struct soap * | soap, |
struct wsrm__TerminateSequenceType * | req, | ||
struct wsrm__TerminateSequenceResponseType * | res | ||
) |
WS-RM TerminateSequence service operation. Automatically invoked by the server to process the terminate sequence request. Updates the server's local sequence state to terminated.
soap | context | |
[in] | req | wsrm__TerminateSequence request message |
[out] | res | wsrm__TerminateSequenceResponse response message |
int __wsrm__TerminateSequenceResponse | ( | struct soap * | soap, |
struct wsrm__TerminateSequenceResponseType * | res | ||
) |
WS-RM TerminateSequenceResponse one-way service operation. Automatically invoked by the server to process the terminate sequence response. Updates the server's local sequence state to terminated.
soap | context | |
[in] | res | wsrm__TerminateSequenceResponse response message |
SOAP_FMAC5 int SOAP_FMAC6 soap_call___wsrm__CloseSequence | ( | struct soap * | soap, |
const char * | soap_endpoint, | ||
const char * | soap_action, | ||
struct wsrm__CloseSequenceType * | wsrm__CloseSequence, | ||
struct wsrm__CloseSequenceResponseType * | wsrm__CloseSequenceResponse | ||
) |
SOAP_FMAC5 int SOAP_FMAC6 soap_call___wsrm__CreateSequence | ( | struct soap * | soap, |
const char * | soap_endpoint, | ||
const char * | soap_action, | ||
struct wsrm__CreateSequenceType * | wsrm__CreateSequence, | ||
struct wsrm__CreateSequenceResponseType * | wsrm__CreateSequenceResponse | ||
) |
SOAP_FMAC5 int SOAP_FMAC6 soap_call___wsrm__TerminateSequence | ( | struct soap * | soap, |
const char * | soap_endpoint, | ||
const char * | soap_action, | ||
struct wsrm__TerminateSequenceType * | wsrm__TerminateSequence, | ||
struct wsrm__TerminateSequenceResponseType * | wsrm__TerminateSequenceResponse | ||
) |
SOAP_FMAC5 int SOAP_FMAC6 soap_recv___wsrm__SequenceAcknowledgement | ( | struct soap * | soap, |
struct __wsrm__SequenceAcknowledgement * | |||
) |
SOAP_FMAC5 int SOAP_FMAC6 soap_send___wsrm__LastMessage | ( | struct soap * | soap, |
const char * | soap_endpoint, | ||
const char * | soap_action | ||
) |
SOAP_FMAC5 int SOAP_FMAC6 soap_send___wsrm__SequenceAcknowledgement | ( | struct soap * | soap, |
const char * | soap_endpoint, | ||
const char * | soap_action | ||
) |
int soap_wsrm | ( | struct soap * | soap, |
struct soap_plugin * | p, | ||
void * | arg | ||
) |
Plugin registry function, used with soap_register_plugin.
soap | context | |
[in,out] | p | plugin created in registry |
[in] | arg | optional argument passed from soap_register_plugin_arg |
int soap_wsrm_acknowledgement | ( | struct soap * | soap, |
soap_wsrm_sequence_handle | seq, | ||
const char * | wsa_id | ||
) |
Sends acknowledgements for all message sequences that require an acknowledgement (ack requested by peer)
soap | context | |
seq | sequence handle set by soap_wsrm_create or soap_wsrm_create_offer | |
[in] | wsa_id | WS-Addressing message ID (deprecated, not used) |
const char * soap_wsrm_acksto | ( | const soap_wsrm_sequence_handle | seq | ) |
Returns the endpoint address of the AcksTo acknowledgement service that serves the sequence, when set with soap_wsrm_create() or soap_wsrm_create_offer() or NULL otherwise. HTTP 307 Temporary Redirect can change the endpoint during the lifetime of a message sequence. Thus, this function returns the most recent endpoint binding.
seq | sequence handle set by soap_wsrm_create() or soap_wsrm_create_offer() |
int soap_wsrm_check | ( | struct soap * | soap | ) |
Receiver (server)-side check for the presence of WS-Addressing and WS-RM header blocks in the SOAP header, checks for protocol errors, and rejects duplicate messages. Also prepares the return WS-RM header. This function should be called in the each service operation that supports WS-RM. Do not use this function in a ReplyTo response-accepting destination service operation. When NoDicards behavior is set, out of sequence messages will be discared until message sequence has resumed (requires peer resends).
soap | context |
int soap_wsrm_check_and_wait | ( | struct soap * | soap, |
int | timeout | ||
) |
Receiver (server)-side check for the presence of WS-Addressing and WS-RM header blocks in the SOAP header, checks for protocol errors, and rejects duplicate messages. Also prepares the return WS-RM header. This function should be called in the each service operation that supports WS-RM. Do not use this function in a ReplyTo response-accepting destination service operation.
soap | context |
timeout | NoDiscard behavior: 0=discard messages out of sequence to immediately resume, >0 wait (in seconds) until message sequence has resumed while sending Nacks every second to indicate messages are required to continue the flow of messages, <0 wait (in microseconds) until message sequence has resumed, send one nack when timeout occurred. |
int soap_wsrm_check_fault | ( | struct soap * | soap, |
enum wsrm__FaultCodes * | fault, | ||
const char ** | info | ||
) |
Checks the presence of a WS-RM fault at the client side (or in the FaultTo destination service) when a response is received.
soap | context | |
[out] | fault | code |
[out] | info | string pointer related to the fault (or NULL) |
int soap_wsrm_check_retry | ( | struct soap * | soap, |
soap_wsrm_sequence_handle | seq | ||
) |
Client-side check to verify if the remote call can be retried when a failure occured. Increases the robustness of messages sends, by ensuring that the message was at least transmitted (but not necessarily received). Also implements HTTP 307 Temporary Redirect. Retries are limited to SOAP_WSRM_MAX_RETRIES iterations.
soap | context |
seq | sequence handle set by soap_wsrm_create or soap_wsrm_create_offer |
int soap_wsrm_check_send_empty_response | ( | struct soap * | soap | ) |
Receiver (server)-side check for the presence of WS-Addressing and WS-RM header blocks in the SOAP header, checks for protocol errors, and rejects duplicate messages. Also prepares the return WS-RM header. This function should be called in the each service operation that sends an empty response back (one-way messaging). The behavior is the same as soap_wsrm_check() followed by soap_send_empty_response(), but more efficient and prevents blocking.
soap | context |
int soap_wsrm_check_send_empty_response_and_wait | ( | struct soap * | soap, |
int | timeout | ||
) |
Receiver (server)-side check for the presence of WS-Addressing and WS-RM header blocks in the SOAP header, checks for protocol errors, and rejects duplicate messages. Also prepares the return WS-RM header. This function should be called in the each service operation that sends an empty response back (one-way messaging). The behavior is the same as soap_wsrm_check() followed by soap_send_empty_response(), but more efficient and prevents blocking.
soap | context |
timeout | NoDiscard behavior: 0=discard messages out of sequence to immediately resume, >0 wait (in seconds) until message sequence has resumed while sending Nacks every second to indicate messages are required to continue the flow of messages, <0 wait (in microseconds) until message sequence has resumed, send one nack when timeout occurred. |
void soap_wsrm_cleanup | ( | struct soap * | soap | ) |
Cleans up all expired sequences and releases resources. To be used at the server side to periodically clean up WS-RM sequences. Server-side cleanup is automatic, as long as WS-RM is in use. Does not release client-side sequences allocated by soap_wsrm_create() or soap_wsrm_create_offer().
soap | context |
int soap_wsrm_close | ( | struct soap * | soap, |
soap_wsrm_sequence_handle | seq, | ||
const char * | wsa_id | ||
) |
Closes the sequence, but does not yet terminate it. No new messages should be send, but messages can be resend with soap_wsrm_resend() if desired.
soap | context | |
seq | sequence handle set by soap_wsrm_create or soap_wsrm_create_offer | |
[in] | wsa_id | WS-Addressing message ID (optional) |
int soap_wsrm_create | ( | struct soap * | soap, |
const char * | to, | ||
const char * | replyto, | ||
LONG64 | expires, | ||
const char * | wsa_id, | ||
soap_wsrm_sequence_handle * | seq | ||
) |
Creates a new sequence. Sequences are usually created by the sender (client) and confirmed by the receiver (server). The 'to' server address must be used for all messages of the sequence to be sent to the WS-RM destination server. Optionally the 'replyto' address can be given of the WS-RM source to reply to. A sequence ID is generated by the server upon success.
soap | context | |
[in] | to | endpoint address of the WS-RM destination server (required) |
[in] | replyto | endpoint address of the WS-RM source to reply/ack to (optional) |
[in] | expires | max sequence duration (its lifetime) in ms (use 0 to offer infinite, subject to SOAP_WSRM_MAX_SEC_TO_EXPIRE or server policy) |
[in] | wsa_id | WS-Addressing message ID (optional, use NULL when omitted) |
[out] | seq | sequence handle is set |
int soap_wsrm_create_offer | ( | struct soap * | soap, |
const char * | to, | ||
const char * | replyto, | ||
const char * | id, | ||
LONG64 | expires, | ||
enum wsrm__IncompleteSequenceBehaviorType | behavior, | ||
const char * | wsa_id, | ||
soap_wsrm_sequence_handle * | seq | ||
) |
Creates a new sequence by offering suggested WS-RM parameters to the WS-RM destination. Sequences are usually created by the sender (client) and confirmed by the receiver (server). The 'to' server address must be used for all messages of the sequence to be sent to the WS-RM destination server. Optionally the 'replyto' address can be given of the WS-RM source to reply to. A sequence ID is generated by the server upon success.
soap | context | |
[in] | to | endpoint address of the WS-RM destination server (required) |
[in] | replyto | endpoint address of the WS-RM source to reply/ack to (optional) |
[in] | id | offered WS-RM sequence identifier (optional, generate with NULL) |
[in] | expires | max sequence duration (its lifetime) in ms (use 0 for infinite, subject to SOAP_WSRM_MAX_SEC_TO_EXPIRE or server policy) |
[in] | behavior | offered DiscardEntireSequence, DiscardFollowingFirstGap, or NoDiscard, which specifies the WS-RM destination's action when a sequence is closed/terminated when it is incomplete, and notifies the source when failed. |
[in] | wsa_id | WS-Addressing message ID (optional, use NULL when omitted) |
[out] | seq | sequence handle is set or NULL when response is asynchronously send and the sequence is initialized upon receipt of the create response. |
int soap_wsrm_create_offer_acksto | ( | struct soap * | soap, |
const char * | to, | ||
const char * | replyto, | ||
const char * | acksto, | ||
const char * | id, | ||
LONG64 | expires, | ||
enum wsrm__IncompleteSequenceBehaviorType | behavior, | ||
const char * | wsa_id, | ||
soap_wsrm_sequence_handle * | seq | ||
) |
Creates a new sequence by offering suggested WS-RM parameters to the WS-RM destination. Sequences are usually created by the sender (client) and confirmed by the receiver (server). The 'to' server address must be used for all messages of the sequence to be sent to the WS-RM destination server. Optionally the 'replyto' address can be given of the WS-RM source to reply to and an 'acksto' address can be given for acknowledgement messages to be sent to (normally to the reply to). A sequence ID is generated by the server upon success.
soap | context | |
[in] | to | endpoint address of the WS-RM destination server (required) |
[in] | replyto | endpoint address of the WS-RM source (optional) |
[in] | acksto | endpoint address for WS-RM acknowledgements (optional) (optional, use NULL when acks are piggy-backed on response messages to the source) |
[in] | id | offered WS-RM sequence identifier (optional, generate when NULL) |
[in] | expires | max sequence duration (its lifetime) in ms (use 0 for infinite, subject to SOAP_WSRM_MAX_SEC_TO_EXPIRE or server policy) |
[in] | behavior | offered DiscardEntireSequence, DiscardFollowingFirstGap, or NoDiscard, which specifies the WS-RM destination's action when a sequence is closed/terminated when it is incomplete, and notifies the source when failed. |
[in] | wsa_id | WS-Addressing message ID (optional, use NULL when omitted) |
[out] | seq | sequence handle is set or NULL when response is asynchronously send and the sequence is initialized upon receipt of the create response. |
void soap_wsrm_dump | ( | struct soap * | soap, |
FILE * | fd | ||
) |
Dumps the current sequences and details of the wsrm plugin for diagnotics purposes.
soap | context | |
[in] | fd | file descriptor to send text to |
int soap_wsrm_error | ( | struct soap * | soap, |
struct soap_wsrm_sequence * | seq, | ||
enum wsrm__FaultCodes | fault | ||
) |
Sets SOAP Fault (sub)code for server WS-RM fault response. Terminates the sequence.
soap | context | |
[in] | seq | pointer to sequence to terminate or NULL |
[in] | fault | is one of enum wsrm__FaultCodes enumeration values |
int soap_wsrm_fault_subcode | ( | struct soap * | soap, |
int | flag, | ||
const char * | faultsubcode, | ||
const char * | faultstring, | ||
const char * | faultdetail | ||
) |
Sets sender/receiver SOAP Fault (sub)code for server faults (can be user defined faults). When called before soap_wsrm_check() in the server operation, terminates the current sequence. Otherwise, the sequence is not terminated. In either case the fault is returned to sender (client) or to the FaultTo server when the WS-Addressing FaultTo header was set by the sender.
soap | context | |
[in] | flag | 0=receiver, 1=sender |
[in] | faultsubcode | sub code string |
[in] | faultstring | fault string |
[in] | faultdetail | detail string |
ULONG64 soap_wsrm_lastnum | ( | const soap_wsrm_sequence_handle | seq | ) |
Returns the last message number upon sequence close or 0.
seq | sequence handle set by soap_wsrm_create() or soap_wsrm_create_offer() |
ULONG64 soap_wsrm_msgs | ( | const soap_wsrm_sequence_handle | seq | ) |
Returns the number of complete messages received, or 0 when there is a gap.
[in] | seq | pointer to sequence |
ULONG64 soap_wsrm_nack | ( | const soap_wsrm_sequence_handle | seq | ) |
Returns the number of non-acknowledged messages sent.
seq | sequence handle set by soap_wsrm_create() or soap_wsrm_create_offer() |
int soap_wsrm_non_acknowledgement | ( | struct soap * | soap, |
soap_wsrm_sequence_handle | seq, | ||
ULONG64 | nack | ||
) |
Sends nack non-acknowledgement for a message.
soap | context |
seq | sequence handle set by soap_wsrm_create or soap_wsrm_create_offer |
nack | num of message to nack |
ULONG64 soap_wsrm_num | ( | const soap_wsrm_sequence_handle | seq | ) |
Returns the current message number of the sequence.
seq | sequence handle set by soap_wsrm_create() or soap_wsrm_create_offer() |
int soap_wsrm_pulse | ( | struct soap * | soap, |
int | timeout | ||
) |
Sends acknowledgements for all open sessions to all peers. Must set send and recv timeouts to prevent blocking.
soap | context |
timeout | seconds (positive value) or microseconds (negative value) |
int soap_wsrm_receiver_fault | ( | struct soap * | soap, |
const char * | faultstring, | ||
const char * | faultdetail | ||
) |
Sets receiver SOAP Fault for server faults (can be user defined faults). When called before soap_wsrm_check() in the server operation, terminates the current sequence. Otherwise, the sequence is not terminated. In either case the fault is returned to sender (client) or to the FaultTo server when the WS-Addressing FaultTo header was set by the sender.
soap | context | |
[in] | faultstring | fault string |
[in] | faultdetail | detail string |
int soap_wsrm_receiver_fault_subcode | ( | struct soap * | soap, |
const char * | faultsubcode, | ||
const char * | faultstring, | ||
const char * | faultdetail | ||
) |
Sets receiver SOAP Fault (sub)code for server faults (can be user defined faults). When called before soap_wsrm_check() in the server operation, terminates the current sequence. Otherwise, the sequence is not terminated. In either case the fault is returned to sender (client) or to the FaultTo server when the WS-Addressing FaultTo header was set by the sender.
soap | context | |
[in] | faultsubcode | sub code string |
[in] | faultstring | fault string |
[in] | faultdetail | detail string |
ULONG64 soap_wsrm_recvnum | ( | const soap_wsrm_sequence_handle | seq | ) |
Returns the message number of last message received.
seq | sequence handle set by soap_wsrm_create() or soap_wsrm_create_offer() |
int soap_wsrm_reply | ( | struct soap * | soap, |
const char * | wsa_id, | ||
const char * | wsa_action | ||
) |
Server-side server operation reply to be performed when the service operation returns. Server operations that support WS-Addressing and WS-RM must call this function to return normally (and/or allow the response message to be relayed as per WS-Addressing).
soap | context | |
[in] | wsa_id | WS-Addressing message ID (optional) |
[in] | wsa_action | mandatory WS-Addressing action of the response |
int soap_wsrm_reply_num | ( | struct soap * | soap, |
int | flag | ||
) |
Prepares reply from service. When flag is set, adds a WS-RM sequence message number to the next message transmitted. No acks are requested. No WS-Addressing message relay.
soap | context |
flag | true to add a WS-RM sequence message number to the message to be transmitted |
int soap_wsrm_reply_request_acks | ( | struct soap * | soap, |
const char * | wsa_id, | ||
const char * | wsa_action | ||
) |
Server-side server operation reply to be performed when the service operation returns. Message acks for the current sequence are requested, but only when client made a create sequence offer. Server operations that support WS-Addressing and WS-RM must call this function or call soap_wsrm_reply() to return normally (and/or allow the response message to be relayed as per WS-Addressing).
soap | context | |
[in] | wsa_id | WS-Addressing message ID (optional) |
[in] | wsa_action | mandatory WS-Addressing action of the response |
int soap_wsrm_request | ( | struct soap * | soap, |
soap_wsrm_sequence_handle | seq, | ||
const char * | wsa_id, | ||
const char * | wsa_action | ||
) |
Adds a WS-RM sequence message number to the next message transmitted to the WS-RM destination and increments the message counter by one. No acks are requested.
soap | context | |
seq | sequence handle set by soap_wsrm_create() or soap_wsrm_create_offer() | |
[in] | wsa_id | WS-Addressing message ID (optional, use NULL when omitted) |
[in] | wsa_action | mandatory WS-Addressing action of the next message sent |
int soap_wsrm_request_acks | ( | struct soap * | soap, |
soap_wsrm_sequence_handle | seq, | ||
const char * | wsa_id, | ||
const char * | wsa_action | ||
) |
Adds a WS-RM sequence message number to the next message transmitted to the WS-RM destination and increments the message counter by one. Message acks for the current sequence are requested.
soap | context | |
seq | sequence handle set by soap_wsrm_create() or soap_wsrm_create_offer() | |
[in] | wsa_id | WS-Addressing message ID (optional, use NULL when omitted) |
[in] | wsa_action | mandatory WS-Addressing action of the next message sent |
int soap_wsrm_request_num | ( | struct soap * | soap, |
soap_wsrm_sequence_handle | seq, | ||
const char * | wsa_id, | ||
const char * | wsa_action, | ||
ULONG64 | num | ||
) |
Adds a WS-RM sequence message number to the next message transmitted. No acks are requested.
soap | context | |
seq | sequence handle set by soap_wsrm_create() or soap_wsrm_create_offer() | |
[in] | wsa_id | WS-Addressing message ID (optional, use NULL when omitted) |
[in] | wsa_action | mandatory WS-Addressing action of the next message sent |
[in] | num | WS-RM sequence message number |
int soap_wsrm_resend | ( | struct soap * | soap, |
soap_wsrm_sequence_handle | seq, | ||
ULONG64 | lower, | ||
ULONG64 | upper | ||
) |
Resend all unacknowledged messages, i.e. messages that were automatically cached for this sequence. Messages stored in the sequence for retransmission (those that were previously sent but not acknowledged) are resent to the soap_wsrm_to() address (which was set by soap_wsrm_create() or soap_wsrm_create_offer(), or the ReplyTo address). It is recommended to resend messages after the last message in the sequence was transmitted before closing the sequence. To reduce unnecessary resend attempts, it is recommended to use soap_wsrm_request_ack() with the last message to request acks for messages already delivered.
soap | context | |
seq | sequence handle set by soap_wsrm_create or soap_wsrm_create_offer | |
[in] | lower | resend message range lower bound (0 for lowest) |
[in] | upper | resend message range upper bound (or 0 for infinite) |
int soap_wsrm_resend_only_nacked | ( | struct soap * | soap, |
soap_wsrm_sequence_handle | seq, | ||
ULONG64 | lower, | ||
ULONG64 | upper | ||
) |
Resend all explicitly nack'ed messages indicaed by peer. Messages stored in the sequence for retransmission (those that were previously sent but not acknowledged) are resent to the soap_wsrm_to() address (which was set by soap_wsrm_create() or soap_wsrm_create_offer(), or the ReplyTo address).
soap | context | |
seq | sequence handle set by soap_wsrm_create or soap_wsrm_create_offer | |
[in] | lower | resend message range lower bound (0 for lowest) |
[in] | upper | resend message range upper bound (or 0 for infinite) |
int soap_wsrm_sender_fault | ( | struct soap * | soap, |
const char * | faultstring, | ||
const char * | faultdetail | ||
) |
Sets sender SOAP Fault for server faults (can be user defined faults). When called before soap_wsrm_check() in the server operation, terminates the current sequence. Otherwise, the sequence is not terminated. In either case the fault is returned to sender (client) or to the FaultTo server when the WS-Addressing FaultTo header was set by the sender.
soap | context | |
[in] | faultstring | fault string |
[in] | faultdetail | detail string |
int soap_wsrm_sender_fault_subcode | ( | struct soap * | soap, |
const char * | faultsubcode, | ||
const char * | faultstring, | ||
const char * | faultdetail | ||
) |
Sets sender SOAP Fault (sub)code for server faults (can be user defined faults). When called before soap_wsrm_check() in the server operation, terminates the current sequence. Otherwise, the sequence is not terminated. In either case the fault is returned to sender (client) or to the FaultTo server when the WS-Addressing FaultTo header was set by the sender.
soap | context | |
[in] | faultsubcode | sub code string |
[in] | faultstring | fault string |
[in] | faultdetail | detail string |
struct soap_wsrm_sequence * soap_wsrm_seq | ( | struct soap * | soap | ) |
Assuming a SOAP header is received, gets the sequence associated with the message.
soap | context |
SOAP_FMAC1 int SOAP_FMAC2 soap_wsrm_seq_created | ( | struct soap * | soap, |
soap_wsrm_sequence_handle | seq | ||
) |
void soap_wsrm_seq_free | ( | struct soap * | soap, |
soap_wsrm_sequence_handle | seq | ||
) |
Must be called to free the sequence allocated by soap_wsrm_create() or by soap_wsrm_create_offer(). Sequences created by soap_wsrm_create_offer return handles that are not automatically reclaimed by the engine.
soap | context |
seq | sequence handle set by soap_wsrm_create() or soap_wsrm_create_offer() |
struct soap_wsrm_sequence * soap_wsrm_seq_lookup | ( | struct soap * | soap, |
const char * | id | ||
) |
Function to look up sequence given its id.
soap | context | |
[in] | id | identifier string |
struct soap_wsrm_sequence * soap_wsrm_seq_lookup_id | ( | struct soap * | soap, |
const char * | id | ||
) |
Function to look up sequence given its id.
soap | context | |
[in] | id | identifier string |
SOAP_FMAC1 void SOAP_FMAC2 soap_wsrm_seq_release | ( | struct soap * | soap, |
soap_wsrm_sequence_handle | seq | ||
) |
SOAP_FMAC1 int SOAP_FMAC2 soap_wsrm_seq_valid | ( | struct soap * | soap, |
soap_wsrm_sequence_handle | seq | ||
) |
int soap_wsrm_terminate | ( | struct soap * | soap, |
soap_wsrm_sequence_handle | seq, | ||
const char * | wsa_id | ||
) |
Terminates the sequence. No new messages should be send and no resends should be tried. Usually done after soap_wsrm_close() or any time to terminate the sequence prematurely.
soap | context | |
seq | sequence handle set by soap_wsrm_create or soap_wsrm_create_offer | |
[in] | wsa_id | WS-Addressing message ID (optional) |
const char * soap_wsrm_to | ( | const soap_wsrm_sequence_handle | seq | ) |
Returns the endpoint address of the destination service that serves the sequence. Initially set with soap_wsrm_create or soap_wsrm_create_offer. HTTP 307 Temporary Redirect can change the endpoint during the lifetime of a message sequence. Thus, this function returns the most recent endpoint binding that can be used to send message to the server endpoint.
seq | sequence handle set by soap_wsrm_create() or soap_wsrm_create_offer() |
const char soap_wsrm_id[] |
Use fast O(1) message allocation/deallocation and lookup at the cost of storing an array of N pointers per sequence, where N = 2^k >= is the number of messages in the sequence Plugin identification for plugin registry
Plugin identification for plugin registry