Genivia Home Documentation
wsddapi.h File Reference

updated Thu Mar 21 2024 by Robert van Engelen
 
Macros | Typedefs | Enumerations | Functions
wsddapi.h File Reference
#include "wsaapi.h"
#include "threads.h"
Include dependency graph for wsddapi.h:
This graph shows which files directly or indirectly include this file:

Macros

#define SOAP_WSDD_APP_MAX_DELAY   (500) /* ms delay */
 

Typedefs

typedef enum soap_wsdd_mode soap_wsdd_mode
 
typedef enum soap_wsdd_to soap_wsdd_to
 

Enumerations

enum  soap_wsdd_mode { SOAP_WSDD_MANAGED, SOAP_WSDD_ADHOC }
 
enum  soap_wsdd_to { SOAP_WSDD_TO_DP, SOAP_WSDD_TO_TS }
 

Functions

SOAP_FMAC5 int SOAP_FMAC6 soap_send___wsdd__Hello (struct soap *soap, const char *soap_endpoint, const char *soap_action, struct wsdd__HelloType *wsdd__Hello)
 
SOAP_FMAC5 int SOAP_FMAC6 soap_recv___wsdd__Hello (struct soap *soap, struct __wsdd__Hello *)
 
SOAP_FMAC5 int SOAP_FMAC6 soap_send___wsdd__Bye (struct soap *soap, const char *soap_endpoint, const char *soap_action, struct wsdd__ByeType *wsdd__Bye)
 
SOAP_FMAC5 int SOAP_FMAC6 soap_recv___wsdd__Bye (struct soap *soap, struct __wsdd__Bye *)
 
SOAP_FMAC5 int SOAP_FMAC6 soap_send___wsdd__Probe (struct soap *soap, const char *soap_endpoint, const char *soap_action, struct wsdd__ProbeType *wsdd__Probe)
 
SOAP_FMAC5 int SOAP_FMAC6 soap_recv___wsdd__Probe (struct soap *soap, struct __wsdd__Probe *)
 
SOAP_FMAC5 int SOAP_FMAC6 soap_send___wsdd__ProbeMatches (struct soap *soap, const char *soap_endpoint, const char *soap_action, struct wsdd__ProbeMatchesType *wsdd__ProbeMatches)
 
SOAP_FMAC5 int SOAP_FMAC6 soap_recv___wsdd__ProbeMatches (struct soap *soap, struct __wsdd__ProbeMatches *)
 
SOAP_FMAC5 int SOAP_FMAC6 soap_send___wsdd__Resolve (struct soap *soap, const char *soap_endpoint, const char *soap_action, struct wsdd__ResolveType *wsdd__Resolve)
 
SOAP_FMAC5 int SOAP_FMAC6 soap_recv___wsdd__Resolve (struct soap *soap, struct __wsdd__Resolve *)
 
SOAP_FMAC5 int SOAP_FMAC6 soap_send___wsdd__ResolveMatches (struct soap *soap, const char *soap_endpoint, const char *soap_action, struct wsdd__ResolveMatchesType *wsdd__ResolveMatches)
 
SOAP_FMAC5 int SOAP_FMAC6 soap_recv___wsdd__ResolveMatches (struct soap *soap, struct __wsdd__ResolveMatches *)
 
SOAP_FMAC1 void SOAP_FMAC2 soap_wsdd_set_InstanceId (unsigned int InstanceId)
 Set the global AppSequence InstanceId that is used to populate messages. More...
 
SOAP_FMAC1 void SOAP_FMAC2 soap_wsdd_set_SequenceId (const char *SequenceId)
 Set the global AppSequence SequenceId that is used to populate messages. More...
 
SOAP_FMAC1 int SOAP_FMAC2 soap_wsdd_Hello (struct soap *soap, soap_wsdd_mode mode, const char *endpoint, const char *MessageID, const char *RelatesTo, const char *EndpointReference, const char *Types, const char *Scopes, const char *MatchBy, const char *XAddrs, unsigned int MetadataVersion)
 TS or DP Hello message to join a network. More...
 
SOAP_FMAC1 int SOAP_FMAC2 soap_wsdd_Bye (struct soap *soap, soap_wsdd_mode mode, const char *endpoint, const char *MessageID, const char *EndpointReference, const char *Types, const char *Scopes, const char *MatchBy, const char *XAddrs, unsigned int MetadataVersion)
 TS or DP Bye message to leave a network. More...
 
SOAP_FMAC1 int SOAP_FMAC2 soap_wsdd_Probe (struct soap *soap, soap_wsdd_mode mode, soap_wsdd_to to, const char *endpoint, const char *MessageID, const char *ReplyTo, const char *Types, const char *Scopes, const char *MatchBy)
 Client Probe message to a TS or DP. More...
 
SOAP_FMAC1 int SOAP_FMAC2 soap_wsdd_Resolve (struct soap *soap, soap_wsdd_mode mode, soap_wsdd_to to, const char *endpoint, const char *MessageID, const char *ReplyTo, const char *EndpointReference)
 Client Resolve message to a TS or DP. More...
 
SOAP_FMAC1 void SOAP_FMAC2 soap_wsdd_init_ProbeMatches (struct soap *soap, struct wsdd__ProbeMatchesType *matches)
 Initalize the probe matches container. More...
 
SOAP_FMAC1 int SOAP_FMAC2 soap_wsdd_add_ProbeMatch (struct soap *soap, struct wsdd__ProbeMatchesType *matches, const char *EndpointReference, const char *Types, const char *Scopes, const char *MatchBy, const char *XAddrs, unsigned int MetadataVersion)
 Add a match to the probe matches container. More...
 
SOAP_FMAC1 int SOAP_FMAC2 soap_wsdd_ProbeMatches (struct soap *soap, const char *endpoint, const char *MessageID, const char *RelatesTo, const char *To, struct wsdd__ProbeMatchesType *matches)
 TS or DP ProbeMatches message. More...
 
SOAP_FMAC1 int SOAP_FMAC2 soap_wsdd_ResolveMatches (struct soap *soap, const char *endpoint, const char *MessageID, const char *RelatesTo, const char *To, const char *EndpointReference, const char *Types, const char *Scopes, const char *MatchBy, const char *XAddrs, unsigned int MetadataVersion)
 TS or DP ResolveMatches message. More...
 
SOAP_FMAC1 int SOAP_FMAC2 soap_wsdd_listen (struct soap *soap, int timeout)
 Listen on a port for inbound WS-Discovery messages, also cleans up memory with soap_destroy and soap_end. More...
 
SOAP_FMAC1 int SOAP_FMAC2 soap_wsdd_serve_request (struct soap *soap)
 
SOAP_FMAC5 int SOAP_FMAC6 __wsdd__Hello (struct soap *soap, struct wsdd__HelloType *Hello)
 Internal WS-Discovery service operation. More...
 
SOAP_FMAC5 int SOAP_FMAC6 __wsdd__Bye (struct soap *soap, struct wsdd__ByeType *Bye)
 Internal WS-Discovery service operation. More...
 
SOAP_FMAC5 int SOAP_FMAC6 __wsdd__Probe (struct soap *soap, struct wsdd__ProbeType *Probe)
 Internal WS-Discovery service operation. More...
 
SOAP_FMAC5 int SOAP_FMAC6 __wsdd__ProbeMatches (struct soap *soap, struct wsdd__ProbeMatchesType *ProbeMatches)
 Internal WS-Discovery service operation. More...
 
SOAP_FMAC5 int SOAP_FMAC6 __wsdd__Resolve (struct soap *soap, struct wsdd__ResolveType *Resolve)
 Internal WS-Discovery service operation. More...
 
SOAP_FMAC5 int SOAP_FMAC6 __wsdd__ResolveMatches (struct soap *soap, struct wsdd__ResolveMatchesType *ResolveMatches)
 Internal WS-Discovery service operation. More...
 
void wsdd_event_Hello (struct soap *soap, unsigned int InstanceId, const char *SequenceId, unsigned int MessageNumber, const char *MessageID, const char *RelatesTo, const char *EndpointReference, const char *Types, const char *Scopes, const char *MatchBy, const char *XAddrs, unsigned int MetadataVersion)
 Handles and registers a Hello event from a TS or DP joining the network. More...
 
void wsdd_event_Bye (struct soap *soap, unsigned int InstanceId, const char *SequenceId, unsigned int MessageNumber, const char *MessageID, const char *RelatesTo, const char *EndpointReference, const char *Types, const char *Scopes, const char *MatchBy, const char *XAddrs, unsigned int *MetadataVersion)
 Handles and registers a Bye event from a TS or DP leaving the network. More...
 
soap_wsdd_mode wsdd_event_Probe (struct soap *soap, const char *MessageID, const char *ReplyTo, const char *Types, const char *Scopes, const char *MatchBy, struct wsdd__ProbeMatchesType *matches)
 Handles a Probe event from a Client. More...
 
void wsdd_event_ProbeMatches (struct soap *soap, unsigned int InstanceId, const char *SequenceId, unsigned int MessageNumber, const char *MessageID, const char *RelatesTo, struct wsdd__ProbeMatchesType *matches)
 Handles a Probe event from a Client. More...
 
soap_wsdd_mode wsdd_event_Resolve (struct soap *soap, const char *MessageID, const char *ReplyTo, const char *EndpointReference, struct wsdd__ResolveMatchType *match)
 Handles a Resolve event from a Client. More...
 
void wsdd_event_ResolveMatches (struct soap *soap, unsigned int InstanceId, const char *SequenceId, unsigned int MessageNumber, const char *MessageID, const char *RelatesTo, struct wsdd__ResolveMatchType *match)
 Handles a Probe event from a Client. More...
 

Macro Definition Documentation

#define SOAP_WSDD_APP_MAX_DELAY   (500) /* ms delay */

A Target Service MUST wait t (ms) to elapse before sending the message, where 0 < t < APP_MAX_DELAY is randomly choosen. The default APP_MAX_DELAY is 500 ms.

Typedef Documentation

If the DP is unresponsive after DP_MAX_TIMEOUT, or if the Client finds the responses from the DP unsatisfactory, the Client reverts to using the multicast messages. Managed or ad-hoc mode

typedef enum soap_wsdd_to soap_wsdd_to

Send message to Target Service (TS) or Discovery Proxy (DP)

Enumeration Type Documentation

If the DP is unresponsive after DP_MAX_TIMEOUT, or if the Client finds the responses from the DP unsatisfactory, the Client reverts to using the multicast messages. Managed or ad-hoc mode

Enumerator
SOAP_WSDD_MANAGED 
SOAP_WSDD_ADHOC 

Send message to Target Service (TS) or Discovery Proxy (DP)

Enumerator
SOAP_WSDD_TO_DP 
SOAP_WSDD_TO_TS 

Function Documentation

int __wsdd__Bye ( struct soap *  soap,
struct wsdd__ByeType Bye 
)

Internal WS-Discovery service operation.

int __wsdd__Hello ( struct soap *  soap,
struct wsdd__HelloType Hello 
)

Internal WS-Discovery service operation.

int __wsdd__Probe ( struct soap *  soap,
struct wsdd__ProbeType Probe 
)

Internal WS-Discovery service operation.

int __wsdd__ProbeMatches ( struct soap *  soap,
struct wsdd__ProbeMatchesType ProbeMatches 
)

Internal WS-Discovery service operation.

int __wsdd__Resolve ( struct soap *  soap,
struct wsdd__ResolveType Resolve 
)

Internal WS-Discovery service operation.

int __wsdd__ResolveMatches ( struct soap *  soap,
struct wsdd__ResolveMatchesType ResolveMatches 
)

Internal WS-Discovery service operation.

SOAP_FMAC5 int SOAP_FMAC6 soap_recv___wsdd__Bye ( struct soap *  soap,
struct __wsdd__Bye  
)
SOAP_FMAC5 int SOAP_FMAC6 soap_recv___wsdd__Hello ( struct soap *  soap,
struct __wsdd__Hello  
)
SOAP_FMAC5 int SOAP_FMAC6 soap_recv___wsdd__Probe ( struct soap *  soap,
struct __wsdd__Probe  
)
SOAP_FMAC5 int SOAP_FMAC6 soap_recv___wsdd__ProbeMatches ( struct soap *  soap,
struct __wsdd__ProbeMatches  
)
SOAP_FMAC5 int SOAP_FMAC6 soap_recv___wsdd__Resolve ( struct soap *  soap,
struct __wsdd__Resolve  
)
SOAP_FMAC5 int SOAP_FMAC6 soap_recv___wsdd__ResolveMatches ( struct soap *  soap,
struct __wsdd__ResolveMatches  
)
SOAP_FMAC5 int SOAP_FMAC6 soap_send___wsdd__Bye ( struct soap *  soap,
const char *  soap_endpoint,
const char *  soap_action,
struct wsdd__ByeType wsdd__Bye 
)
SOAP_FMAC5 int SOAP_FMAC6 soap_send___wsdd__Hello ( struct soap *  soap,
const char *  soap_endpoint,
const char *  soap_action,
struct wsdd__HelloType wsdd__Hello 
)
SOAP_FMAC5 int SOAP_FMAC6 soap_send___wsdd__Probe ( struct soap *  soap,
const char *  soap_endpoint,
const char *  soap_action,
struct wsdd__ProbeType wsdd__Probe 
)
SOAP_FMAC5 int SOAP_FMAC6 soap_send___wsdd__ProbeMatches ( struct soap *  soap,
const char *  soap_endpoint,
const char *  soap_action,
struct wsdd__ProbeMatchesType wsdd__ProbeMatches 
)
SOAP_FMAC5 int SOAP_FMAC6 soap_send___wsdd__Resolve ( struct soap *  soap,
const char *  soap_endpoint,
const char *  soap_action,
struct wsdd__ResolveType wsdd__Resolve 
)
SOAP_FMAC5 int SOAP_FMAC6 soap_send___wsdd__ResolveMatches ( struct soap *  soap,
const char *  soap_endpoint,
const char *  soap_action,
struct wsdd__ResolveMatchesType wsdd__ResolveMatches 
)
int soap_wsdd_add_ProbeMatch ( struct soap *  soap,
struct wsdd__ProbeMatchesType matches,
const char *  EndpointReference,
const char *  Types,
const char *  Scopes,
const char *  MatchBy,
const char *  XAddrs,
unsigned int  MetadataVersion 
)

Add a match to the probe matches container.

Parameters
soapcontext
matchesthe container to update with a new match
[in]EndpointReferenceof this Target Server or Discovery Proxy
[in]Typesan unordered string of QNames or NULL, a Discovery Proxy MUST include "wsdd:DiscoveryProxy"
[in]Scopesan unordered set of scopes or NULL
[in]MatchByNULL (unused, reserved)
[in]XAddrscontains the transport address(es) that MAY be used to communicate with the Target Service or Discovery Proxy
[in]MetadataVersionincremented by a positive value (>= 1) whenever there is a change in the metadata of the Target Service
Returns
SOAP_OK or error code

To populate a Probe matches container, first initialize with soap_wsdd_init_ProbeMatches, then use this function to add each match. The container is deallocated with soap_end(soap) and can be initialized again (without leaks).

int soap_wsdd_Bye ( struct soap *  soap,
soap_wsdd_mode  mode,
const char *  endpoint,
const char *  MessageID,
const char *  EndpointReference,
const char *  Types,
const char *  Scopes,
const char *  MatchBy,
const char *  XAddrs,
unsigned int  MetadataVersion 
)

TS or DP Bye message to leave a network.

Parameters
soapcontext
[in]modeSOAP_WSDD_MANAGED or SOAP_WSDD_ADHOC
[in]endpointto send Bye message to (unicast or multicast)
[in]MessageIDunique WS-Addressing message ID (soap_wsa_rand_uuid)
[in]EndpointReferenceof this Target Server or Discovery Proxy
[in]Typesan unordered string of QNames or NULL, a Discovery Proxy MUST include "wsdd:DiscoveryProxy"
[in]Scopesan unordered set of scopes or NULL
[in]MatchByNULL (unused, reserved)
[in]XAddrscontains the transport address(es) that MAY be used to communicate with the Target Service or Discovery Proxy
[in]MetadataVersionincremented by a positive value (>= 1) whenever there is a change in the metadata of the Target Service
Returns
SOAP_OK or error code

Bye is a one-way message sent by a Target Service to announce its unavailability as a best effort when it leaves the network.

int soap_wsdd_Hello ( struct soap *  soap,
soap_wsdd_mode  mode,
const char *  endpoint,
const char *  MessageID,
const char *  RelatesTo,
const char *  EndpointReference,
const char *  Types,
const char *  Scopes,
const char *  MatchBy,
const char *  XAddrs,
unsigned int  MetadataVersion 
)

TS or DP Hello message to join a network.

Parameters
soapcontext
[in]modeSOAP_WSDD_MANAGED or SOAP_WSDD_ADHOC
[in]endpointto send Hello message to (unicast or multicast)
[in]MessageIDunique WS-Addressing message ID (soap_wsa_rand_uuid)
[in]RelatesToWS-Addressing message ID
[in]EndpointReferenceof this Target Server or Discovery Proxy
[in]Typesan unordered string of QNames or NULL, a Discovery Proxy MUST include "wsdd:DiscoveryProxy"
[in]Scopesan unordered set of scopes or NULL
[in]MatchByNULL (unused, reserved)
[in]XAddrscontains the transport address(es) that MAY be used to communicate with the Target Service or Discovery Proxy
[in]MetadataVersionincremented by a positive value (>= 1) whenever there is a change in the metadata of the Target Service
Returns
SOAP_OK or error code

Hello is a one-way message sent by a Target Service to announce its availability when it joins the network. It is also sent by a Discovery Proxy to reduce multicast traffic on an ad hoc network.

void soap_wsdd_init_ProbeMatches ( struct soap *  soap,
struct wsdd__ProbeMatchesType matches 
)

Initalize the probe matches container.

Parameters
soapcontext
matchesthe container with matches to initialize
int soap_wsdd_listen ( struct soap *  soap,
int  timeout 
)

Listen on a port for inbound WS-Discovery messages, also cleans up memory with soap_destroy and soap_end.

Parameters
soapcontext
[in]timeoutseconds to listen (use negative value for micro seconds)
Returns
SOAP_OK or error code

First you need to open a port with soap_bind(soap). Then invoke this function to listen to WS-Discovery messages on that port. Inbound messages are accepted and the information is relayed to the event handlers, see Section WS-Discovery Event Handlers. Use soap->user to pass a pointer to a state object that the event hanlders can use. The timeout allows a Client to periodically poll the port for messages. A value of zero will loop the listener forever or until an error occurs.

int soap_wsdd_Probe ( struct soap *  soap,
soap_wsdd_mode  mode,
soap_wsdd_to  to,
const char *  endpoint,
const char *  MessageID,
const char *  ReplyTo,
const char *  Types,
const char *  Scopes,
const char *  MatchBy 
)

Client Probe message to a TS or DP.

Parameters
soapcontext
[in]modeSOAP_WSDD_MANAGED or SOAP_WSDD_ADHOC
[in]toSOAP_WSDD_TO_TS or SOAP_WSDD_TO_DP
[in]endpointto send Probe to (unicast or multicast)
[in]MessageIDWS-Addressing message ID of the message
[in]ReplyToWS-Addressing ReplyTo message ID of the message
[in]Typesan unordered string of QNames to probe
[in]Scopesan unordered set of scopes to probe
[in]MatchBymatching rule to apply for this probe
Returns
SOAP_OK or error code

A Client sends a probe to find Target Services by the Type of the Target Service, a Scope in which the Target Service resides, both, or simply all Target Services. The matches will be delivered to wsdd_event_ProbeMatches when soap_wsdd_listen receives a ProbeMatch response. The RelatesTo of the ProbeMatches is the MessageID of the Probe.

int soap_wsdd_ProbeMatches ( struct soap *  soap,
const char *  endpoint,
const char *  MessageID,
const char *  RelatesTo,
const char *  To,
struct wsdd__ProbeMatchesType matches 
)

TS or DP ProbeMatches message.

Parameters
soapcontext
[in]endpointto send Probe to (unicast or multicast)
[in]MessageIDWS-Addressing message ID of the message
[in]RelatesToWS-Addressing RelatesTo message ID of the message
[in]ToWS-Addressing endpoint IP and port or NULL for anonymous
[in]matchescontains the probe matches, use soap_wsdd_add_ProbeMatch to populate this container
Returns
SOAP_OK or error code

A Client sends a probe to find Target Services by the Type of the Target Service, a Scope in which the Target Service resides, both, or simply all Target Services. The Target Server(s) or Discovery Proxy responds by sending ProbeMatches to the Client.

int soap_wsdd_Resolve ( struct soap *  soap,
soap_wsdd_mode  mode,
soap_wsdd_to  to,
const char *  endpoint,
const char *  MessageID,
const char *  ReplyTo,
const char *  EndpointReference 
)

Client Resolve message to a TS or DP.

Parameters
soapcontext
[in]modeSOAP_WSDD_MANAGED or SOAP_WSDD_ADHOC
[in]toSOAP_WSDD_TO_TS or SOAP_WSDD_TO_DP
[in]endpointto send Resolve to (unicast or multicast)
[in]MessageIDWS-Addressing message ID of the message
[in]ReplyToWS-Addressing ReplyTo message ID of the message
[in]EndpointReferenceof the Target Service or Discovery Proxy
Returns
SOAP_OK or error code

A Client sends a resolve to locate a Target Service, i.e., to retrieve its transport address(es). This server-side event handler returns the match(es). The matches will be delivered to wsdd_event_ResolveMatches when soap_wsdd_listen receives a ResolveMatch response. The RelatesTo of the ResolveMatches is the MessageID of the Resolve.

int soap_wsdd_ResolveMatches ( struct soap *  soap,
const char *  endpoint,
const char *  MessageID,
const char *  RelatesTo,
const char *  To,
const char *  EndpointReference,
const char *  Types,
const char *  Scopes,
const char *  MatchBy,
const char *  XAddrs,
unsigned int  MetadataVersion 
)

TS or DP ResolveMatches message.

Parameters
soapcontext
[in]endpointto send Probe to (unicast or multicast)
[in]MessageIDWS-Addressing message ID of the message
[in]RelatesToWS-Addressing RelatesTo message ID of the message
[in]ToWS-Addressing endpoint IP and port or NULL for anonymous
[in]EndpointReferenceof the Target Service
[in]Typesan unordered string of QNames or NULL, a Discovery Proxy MUST include "wsdd:DiscoveryProxy"
[in]Scopesan unordered set of scopes or NULL
[in]MatchByNULL (unused, reserved)
[in]XAddrscontains the transport address(es) that MAY be used to communicate with the Target Service or Discovery Proxy
[in]MetadataVersionincremented by a positive value (>= 1) whenever there is a change in the metadata of the Target Service
Returns
SOAP_OK or error code

A Client sends a resolve to locate a Target Service, i.e., to retrieve its transport address(es). The Target Server(s) or Discovery Proxy responds by sending ResolveMatches to the Client.

SOAP_FMAC1 int SOAP_FMAC2 soap_wsdd_serve_request ( struct soap *  soap)
void soap_wsdd_set_InstanceId ( unsigned int  InstanceId)

Set the global AppSequence InstanceId that is used to populate messages.

Parameters
[in]InstanceId
void soap_wsdd_set_SequenceId ( const char *  SequenceId)

Set the global AppSequence SequenceId that is used to populate messages.

Parameters
[in]SequenceId
void wsdd_event_Bye ( struct soap *  soap,
unsigned int  InstanceId,
const char *  SequenceId,
unsigned int  MessageNumber,
const char *  MessageID,
const char *  RelatesTo,
const char *  EndpointReference,
const char *  Types,
const char *  Scopes,
const char *  MatchBy,
const char *  XAddrs,
unsigned int *  MetadataVersion 
)

Handles and registers a Bye event from a TS or DP leaving the network.

Parameters
soapcontext (use soap->user as a pointer to a global state if needed)
[in]InstanceId(see WS-Discovery 1.1 Section 7 Application Sequencing)
[in]SequenceId(see WS-Discovery 1.1 Section 7 Application Sequencing)
[in]MessageNumber(see WS-Discovery 1.1 Section 7 Application Sequencing)
[in]MessageIDWS-Addressing message ID of the Bye message
[in]RelatesToWS-Addressing RelatesTo message ID of the Bye message
[in]EndpointReferenceof the Target Service or Discovery Proxy
[in]Typesan unordered string of QNames of services provided by the Target Service or Discovery Proxy where a Discovery Proxy MUST include "wsdd:DiscoveryProxy"
[in]Scopesan unordered set of Scopes the Target Service or Discovery Proxy is in
[in]MatchByunused (reserved)
[in]XAddrscontains the transport address(es) that MAY be used to communicate with the Target Service or Discovery Proxy
[in]MetadataVersionincremented by a positive value (>= 1) whenever there is a change in the metadata of the Target Service

Bye is a one-way message sent by a Target Service to announce its unavailability as a best effort when it leaves the network.

To maintain a global state between events, for example to internally register Target Services, Discovery Proxies, and update the status of these, use void *soap->user to point to a global state (that you need to define).

void wsdd_event_Hello ( struct soap *  soap,
unsigned int  InstanceId,
const char *  SequenceId,
unsigned int  MessageNumber,
const char *  MessageID,
const char *  RelatesTo,
const char *  EndpointReference,
const char *  Types,
const char *  Scopes,
const char *  MatchBy,
const char *  XAddrs,
unsigned int  MetadataVersion 
)

Handles and registers a Hello event from a TS or DP joining the network.

Parameters
soapcontext (use soap->user as a pointer to a global state if needed)
[in]InstanceId(see WS-Discovery 1.1 Section 7 Application Sequencing)
[in]SequenceId(see WS-Discovery 1.1 Section 7 Application Sequencing)
[in]MessageNumber(see WS-Discovery 1.1 Section 7 Application Sequencing)
[in]MessageIDWS-Addressing message ID of the Hello message
[in]RelatesToWS-Addressing RelatesTo message ID of the Hello message
[in]EndpointReferenceof the Target Service or Discovery Proxy that joins
[in]Typesan unordered string of QNames of services provided by the Target Service or Discovery Proxy where a Discovery Proxy MUST include "wsdd:DiscoveryProxy"
[in]Scopesan unordered set of Scopes the Target Service or Discovery Proxy is in
[in]MatchByunused (reserved)
[in]XAddrscontains the transport address(es) that MAY be used to communicate with the Target Service or Discovery Proxy
[in]MetadataVersionincremented by a positive value (>= 1) whenever there is a change in the metadata of the Target Service

Hello is a one-way message sent by a Target Service to announce its availability when it joins the network. It is also sent by a Discovery Proxy to reduce multicast traffic on an ad hoc network.

To maintain a global state between events, for example to internally register Target Services, Discovery Proxies, and update the status of these, use void *soap->user to point to a global state (that you need to define).

soap_wsdd_mode wsdd_event_Probe ( struct soap *  soap,
const char *  MessageID,
const char *  ReplyTo,
const char *  Types,
const char *  Scopes,
const char *  MatchBy,
struct wsdd__ProbeMatchesType matches 
)

Handles a Probe event from a Client.

Parameters
soapcontext (use soap->user as a pointer to a global state if needed)
[in]MessageIDWS-Addressing message ID of the message
[in]ReplyToWS-Addressing ReplyTo message ID of the message
[in]Typesan unordered string of QNames to probe
[in]Scopesan unordered set of scopes to probe
[in]MatchBymatching rule to apply for this probe
[out]matchescontains probe matches returned by event handler, use soap_wsdd_add_ProbeMatch to populate the matches in the handler
Returns
managed (SOAP_WSDD_MANAGED) or ad-hoc (SOAP_WSDD_ADHOC) mode to use to return the matches

A Client sends a probe to find Target Services by the Type of the Target Service, a Scope in which the Target Service resides, both, or simply all Target Services. The matches are returned by this server-side event handler that match the Client's probe.

To maintain a global state between events, for example to internally register Target Services, Discovery Proxies, and update the status of these, use void *soap->user to point to a global state (that you need to define).

void wsdd_event_ProbeMatches ( struct soap *  soap,
unsigned int  InstanceId,
const char *  SequenceId,
unsigned int  MessageNumber,
const char *  MessageID,
const char *  RelatesTo,
struct wsdd__ProbeMatchesType matches 
)

Handles a Probe event from a Client.

Parameters
soapcontext (use soap->user as a pointer to a global state if needed)
[in]InstanceId(see WS-Discovery 1.1 Section 7 Application Sequencing)
[in]SequenceId(see WS-Discovery 1.1 Section 7 Application Sequencing)
[in]MessageNumber(see WS-Discovery 1.1 Section 7 Application Sequencing)
[in]MessageIDWS-Addressing message ID of the message
[in]RelatesToWS-Addressing RelatesTo message ID of the message
[in]matchescontains the probe matches

A Client sends a probe to find Target Services by the Type of the Target Service, a Scope in which the Target Service resides, both, or simply all Target Services. The matches are provided to this client-side event handler.

To maintain a global state between events, for example to internally register Target Services, Discovery Proxies, and update the status of these, use void *soap->user to point to a global state (that you need to define).

soap_wsdd_mode wsdd_event_Resolve ( struct soap *  soap,
const char *  MessageID,
const char *  ReplyTo,
const char *  EndpointReference,
struct wsdd__ResolveMatchType match 
)

Handles a Resolve event from a Client.

Parameters
soapcontext (use soap->user as a pointer to a global state if needed)
[in]MessageIDWS-Addressing message ID of the message
[in]ReplyToWS-Addressing ReplyTo message ID of the message
[in]EndpointReferenceof the Target Service or Discovery Proxy
[out]matchcontains the match returned by the event handler
Returns
managed (SOAP_WSDD_MANAGED) or ad-hoc (SOAP_WSDD_ADHOC) mode to use to return the matches

A Client sends a resolve to locate a Target Service, i.e., to retrieve its transport address(es). This server-side event handler returns the match(es).

To maintain a global state between events, for example to internally register Target Services, Discovery Proxies, and update the status of these, use void *soap->user to point to a global state (that you need to define).

void wsdd_event_ResolveMatches ( struct soap *  soap,
unsigned int  InstanceId,
const char *  SequenceId,
unsigned int  MessageNumber,
const char *  MessageID,
const char *  RelatesTo,
struct wsdd__ResolveMatchType match 
)

Handles a Probe event from a Client.

Parameters
soapcontext (use soap->user as a pointer to a global state if needed)
[in]InstanceId(see WS-Discovery 1.1 Section 7 Application Sequencing)
[in]SequenceId(see WS-Discovery 1.1 Section 7 Application Sequencing)
[in]MessageNumber(see WS-Discovery 1.1 Section 7 Application Sequencing)
[in]MessageIDWS-Addressing message ID of the message
[in]RelatesToWS-Addressing RelatesTo message ID of the message
[in]matchcontains the resolve match

A Client sends a resolve to locate a Target Service, i.e., to retrieve its transport address(es). This client-side event handler receives the match.

To maintain a global state between events, for example to internally register Target Services, Discovery Proxies, and update the status of these, use void *soap->user to point to a global state (that you need to define).