Witsml/> Core Application Program Interface Version 1



Download 0.54 Mb.
Page14/21
Date31.07.2017
Size0.54 Mb.
#24987
1   ...   10   11   12   13   14   15   16   17   ...   21

8.8PUBLISH Functions


This section describes the PUBLISH interface functions.
The following functions are defined:
WMLP_GetBaseMsg - get the fixed "base" description of a return value
WMLP_GetCap - get the Publisher’s Capabilities object
WMLP_GetVersion - retrieves the data version(s) that are supported
WMLP_Subscribe - to request subscriptions to data objects
These functions are documented on the following pages.

8.8.1WMLP_GetBaseMsg


Returns a string containing the fixed ("base") message text associated with a return value.

string = WMLP_GetBaseMsg(
[in] integer ReturnValueIn,
);

Parameters (all required):
ReturnValueIn - input integer

- a valid Return Value (see Appendix C - Defined Values)




Return Value:

string - the fixed descriptive message text associated with the Return


Value (a null string is returned if ReturnValueIn is invalid)
Notes:
1) this function returns only the fixed description of the specified Return Value.

2) Variable, context-specific "supplemental" message text and diagnostic


information, if any, is returned in the SuppMsgOut parameter of the various
PUBLISH functions.

8.8.2WMLP_GetCap


Returns the capPublisher object which represents the capabilities of the Publisher for one data schema. The capPublisher object is returned in the form of an XML document. Multiple calls to WMLP_GetCap are required in order to determine the capabilities of the server for all data schemas that it supports.
integer = WMLP_GetCap(

[in] string OptionsIn,

[out] string CapabilitiesOut,

[out] string SuppMsgOut

);
Parameters (all required):
OptionsIn - input string

- The keyword "dataVersion" with a value of a data schema version specifies that capabilities information is desired for that particular data version. The returned capabilities object will utilize the namespace that is appropriate for the data version. For example:


dataVersion=1.3.1.0
requests information about data version 1.3.1.0 utilizing a 1.3.1 capabilities object. The data schemas that are supported by the server can be determined using WMLP_GetVerson. The version string must match the value of attribute "version" on the plural object container. The default is for the server to return information about the oldest data version that is supported by the server
CapabilitiesOut - output string - case sensitive (an XML document)
SuppMsgOut - output string

- supplemental message text


Return Value:

short (see Appendix C - Defined Values)


Notes:
none

8.8.3WMLP_GetVersion


Returns a string containing the data version(s) that are supported by the Publisher. A particular data version can be passed to WMLP_GetCap via its OptionsIn parameter to request information about the server capabilities with respect to that data version.

string = WMLP_GetVersion();
Parameters:
none


Return Value:

string - A comma separated list of schema versions (without spaces) that


are supported by the server. The oldest version should be listed
first, followed by the next oldest, etc
Example: 1.2.0,1.3.1.0
Notes:
Each version number must match the contents of the version attribute on the plural container element for each object.
For more information, see the topic on Versioning in the Terminology and Basic Concepts section of this document.

8.8.4WMLP_Subscribe


Receives and processes Subscription Requests from Subscribers.
integer = WMLP_Subscribe(

[in] string SubscriptionIn,

[in] string OptionsIn,

[in] string CapabilitiesIn,

[out] string SubscriptionOut,

[out] string SuppMsgOut

);
Parameters (all required):
SubscriptionIn – input string – case sensitive (an XML document)

- one or more WITSML Subscription Requests containing the


object types names to which a subscription is to be created, the
subscriber’s host and receiving process name and other
properties of the subscription.
OptionsIn - input string
- The keyword of ‘returnElements’ with a value of "all" requests that all elements and attributes be returned. The template should be treated as if all elements and attributes had explicitly been specified in the template. A value of "requested" requests the mode of "you only get what you ask for". The default is "requested". For example:
returnElements=all

CapabilitiesIn - input string - case sensitive (an XML document)
- the Subscriber’s capabilities object (capSubscriber) to be sent to
the Publisher; may be a null string if no capabilities object is to
be provided to the Publisher.

SubscriptionOut – output string – case sensitive (an XML document)

- the WITSML Subscription Requests returned by the Publisher


with return codes inserted for each subscription request.

SuppMsgOut - output string

- supplemental message text


Return Value:


short (see Appendix C- Defined Values)
Notes:
1) output parameters are valid only if Return Value = 1
2) For various reasons, some servers may impose restrictions on subscriptions. For example:

  1. A publisher may not allow more than one subscription (total).

  2. A publisher may not allow more than one subscription per subscriber.

  3. A publisher may not allow more than one subscription per object per subscriber.

  4. When subscribing to realtime, a publisher may require that the subscriber specify a specific well and/or wellbore and/or mnemonic.

  5. A publisher may not allow multiple templates per subscription request.





Download 0.54 Mb.

Share with your friends:
1   ...   10   11   12   13   14   15   16   17   ...   21




The database is protected by copyright ©ininet.org 2024
send message

    Main page