Tags

    Setting and Getting Preferences

    _FmNx_SetPref( key=value[, key=value[,...]] )


    The _FMNx_SetPref function allows you to set the following preferences. None of the preferences are persistent. You need to set them with every launch.

    Keys that can be set are:
    verbose = log file path
    host=url
    port=number
    proxy_user=string
    proxy_password=string
    {wsdl/domain:}http_user=string
    {wsdl/domain:}http_password=string
    {wsdl:}timeout=seconds
    {wsdl/domain:}client_certificate=cert path
    {wsdl/domain:}client_key=key file path
    {wsdl/domain:}client_key_password=key file password
    {wsdl/domain:}strict_ssl=true/false
    default_encoding=default/utf8/iso_8859_1
    param_delimiter=character (delimiter cannot contain colon)

    NOTE: Setting for WSDL/Domain. New in version 3.5 a number of the settings can be used for a WSDL or for a domain name. If you use the WSDL name, it will set the preference for that specific WSDL and associated SOAP service. If you include a domain name it will set the preference for REST functions that call that domain ( _FmNX_HTTP_DELETE, _FmNX_HTTP_GET, _FmNX_HTTP_POST, _FmNX_HTTP_PUT , and _FmNX_Load_WSDL_From_URL ). We do not validate the WSDL/Domain name so typos may result in unexpected behaviors. The domain name needs to be exactly the same as the one used in the call. For example, www.fmnexus.com is different from fmnexus.com or rest.fmnexus.com. When sending a request the names are first checked against the list of WSDL names we know, then against the list of domains. If you have a domain name that is the same as a WSDL name all setting will end up going to the WSDL.

    IMPORTANT: It is advised that you specify domains in your preferences if you are using REST with more than one service and running on FileMaker Server. This will avoid multi threading issues.


    verbose Set verbose equal to a file path of a file where you want to have your requests logged to. The file path needs to be in the native syntax of the platform you are working on. Incoming and outgoing requests will then be written to that log file.
    Example for Windows: _FmNx_SetPref( "verbose=C:\WebServicesLog.txt" )
    Example for Mac: _FmNx_SetPref( "verbose=/Users/Vince/Desktop/WebServicesLog.txt" )

    host This is the domain of the proxy server. If you are using the proxy server you will need to set it as your host.
    Example: _FmNx_SetPref( “host=proxy.myDomain.com” )


    port This is the port used for your proxy server. If you are using a proxy server you will need to use this to set the port used for http traffic.
    Example: _FmNx_SetPref( "port=591" )


    proxy_user If you are using a proxy server that requires a user and password, use this setting to set the user.
    Example: _FmNx_SetPref( "proxy_user=ABC" )

    proxy_password If you are using a proxy server that requires a user and password, use this setting to set the password.
    Example: _FmNx_SetPref( "proxy_password=XYZ" )

    {WSDL/Domain:}http_user If the service you are accessing requires HTTP Authentication use this setting to set the User name that will be included as part of the HTTP headers. Replace WDSL/Domain with the name of the WSDL or Domain you are setting this for.
    Note: Also changed the name of the name value pair from wsdl:user version 2.0 to wsdl:http_user in version 3.0 functionality stayed the same.
    Example for WSDL/SOAP Operations: _FmNx_SetPref( “wsdl_name:http_user=tony" )
    // “wsdl”_name is the name of the WSDL, and "tony" is the user name
    Example for REST Operations: _FmNx_SetPref( “domain.com:http_user=tony" )
    // “domain.com is the name of the Domain, and "tony" is the user name

    {WSDL/Domain:}http_password If the service you are accessing requires HTTP Authentication use this setting to set the Password that will be included as part of the HTTP headers. Replace WDSL/Domain with the name of the WSDL or Domain you are setting this for.
    Note: Also changed the name of the name value pair from wsdl:password version 2.0 to wsdl:http_password in version 3.0 functionality stayed the same.
    Example for WSDL/SOAP: _FmNx_SetPref( “wsdl_name:http_password=top_secret_password" )
    // “wsdl_name” is the name of the WSDL, and "top_secret_password" is the password
    Example for Domain: _FmNx_SetPref( “domain.com:http_password=top_secret_password" )
    // “domain.com” is the name of the Domain, and "top_secret_password" is the password


    wsdl:timeout This is the time out in seconds for WSDL/SOAP operations. Replace “WSDL” with the name of the WSDL you are setting this for.
    Example for WSDL/SOAP: _FmNx_SetPref( “wsdl_name:timeout=4” )
    // “wsdl_name” is the name of the WSDL, and “4” is the number of seconds before timing out.
    WARNING: If you are connecting to a slow server, do NOT set the timeout to 60 seconds or higher. Use 30 or 40 seconds instead.
    There is no timeout preference for REST operations.

    {WSDL/Domain:}client_certificate If the service you are accessing requires a client certificate for authentication use this setting to set the path to the client side certificate. Replace WSDL/Domain with the name of the WSDL or Domain you are setting this for. For more information on this see the chapter on Client Certificate Authentication.
    Example for WSDL/SOAP: _FmNx_SetPref( “wsdl_name:client_certificate=/Users/vince/my_certificate_file” )
    // “wsdl_name” is the name of the WSDL.

    {WSDL/Domain:}client_key If the service you are accessing requires a client certificate for authentication use this setting to set the path to the Private Key file you are using with this certificate. Replace WSDL/Domain with the name of the WSDL or Domain you are setting this for. For more information on this see the chapter on Client Certificate Authentication.
    Example for WSDL/SOAP: _FmNx_SetPref( “wsdl_name:client_key=/Users/vince/mykey.private” )
    // “wsdl_name” is the name of the WSDL.

    {WSDL/Domain:}client_key_password If the service you are accessing requires a client certificate for authentication use this setting to set the password used for your key. Replace WDSL/Domain with the name of the WSDL or Domain you are setting this for. For more information on this see the chapter on Client Certificate Authentication.
    Example for WSDL/SOAP: _FmNx_SetPref( “wsdl_name:client_key=/Users/vince/mykey.private” )
    // “wsdl_name” is the name of the WSDL.

    {WSDL/Domain:}strict_ssl Set to TRUE or FALSE. If TRUE it will validate certificate used by the server with a Certificate Authority. If FALSE it will allowed self signed certificates. Frequently internal systems will used self signed certificates. Replace WSDL/Domain with the name of the WSDL or Domain you are setting this for.
    Example: _FmNx_SetPref( “wsdl_name:http_strict_ssl=TRUE" )

    default_encoding This setting is used to let FileMaker know what the returned data encoding will be. The options are:
    default - Treat the data as you would normally
    utf8 - Treat the data as UTF8
    iso_8859_1 - Treat the data as ISO-8859-1 (Latin-1)
    Example: _FmNx_SetPref( "default_encoding=utf8" )


    param_delimiter If the web service you are working with supports arrays of simple data types you can use this preference to set a delimiter between the array elements. For example if the web services allows an array of numbers for one of it parameters you might set the delimiter to “-”. When you pass the data for the parameter it might look like this “12-654-78-234-513” The colon is not supported as a delimiter.

    NOTE: The Web Services Plugin does not support arrays of complex datatype.
    Example: _FmNx_SetPref( "param_delimeter=-" )


    _FmNx_GetPref( key )

    Preferences have been expanded in 3.0. We have added a few new preferences that you can get. The following preferences are new (proxy_user, proxy_password, wsdl:strict_ssl, default_encoding, and parameter_delimiter).


    NOTE: Setting for WSDL/Domain. New in version 3.1 a number of the settings can be used for a WSDL or for a Domain name. If you use the WSDL name, it will set the preference for that specific WSDL. If you include a domain name it will set the preference for REST functions that call that domain ( _FmNX_HTTP_DELETE, _FmNX_HTTP_GET, _FmNX_HTTP_POST, _FmNX_HTTP_PUT , and _FmNX_Load_WSDL_From_URL ). We do not validate the WSDL/Domain name so typos may result in unexpected behaviors. The domain name needs to be exactly the same as the one used in the call. For example www.fmnexus.com is different from fmnexus.com or rest.fmnexus.com. When sending a request the names are first checked against the list of WSDL names we know, then against the list of domains. If you have a domain name that is the same as a WSDL name, all setting will end up going to the WSDL.


    Possible keys include:

      • wsdl_count
      • wsdl_names
      • function_count
      • function_names
      • function_prototypes
      • verbose
      • host
      • port
      • proxy_user
      • proxy_password
      • {WSDL/Domain:}http_user // replace "wsdl" with the wsdl name
      • {WSDL/Domain:}http_password // replace "wsdl" with the wsdl name
      • wsdl:timeout // replace "wsdl" with the wsdl name
      • {WSDL/Domain:}strict_ssl // replace "wsdl" with the wsdl name
      • default_encoding
      • param_delimiter


    wsdl_count Returns the number of WSDLs loaded. It does not matter how the WSDL was loaded.

    Example: _FmNx_GetPref( “wsdl_count” )

    Returns 4 if 4 WSDLs were loaded


    wsdl_names Returns the names of all the WSDLs loaded. It does not matter how the WSDL was loaded.

    Example: _FmNx_GetPref( “wsdl_names” )

    Returns the list of WSDL names (example assumes you have only 4 WSDLs loaded)

    xQuotes

    Demographics

    PhoneNotify

    SMSNotify


    function_count Returns the number of WSDL functions loaded

    Example: _FmNx_GetPref( “function_count” )

    Returns 82 for the 4 WSDLs loaded


    function_names Returns the function names of each installed function

    Example: _FmNx_GetPref( “function_names” )

    Returns 82 function names

    NOTE: the list is reduced to only show a few entries to save space

    SMS_GetCountryCodes

    xQuotes_GetChartDesign

    PhoneNotify_CancelNotify

    Demographics_GetIncomeHouseValueByAddress …


    function_prototypes Returns the function name and parameters of each installed function.

    Example: _FmNx_GetPref( “function_prototypes” )

    Returns 82 function prototypes (and yes those would be 82 new FileMaker functions you could use)

    NOTE: the list is reduced to only show a few entries to save space

    SMS_GetCountryCodes( EmailAddress; UserID; Password )

    PhoneNotify_LM_AddNewList( ListName; ParentListID; LicenseKey )

    xQuotes_GetChartDesign( Username; Password; Tracer ) …


    verbose Returns the path of the verbose log file. If the verbose setting has not been set it will return an empty string.

    Example: _FmNx_GetPref( “verbose” )

    Returns "verbose=/Users/Vince/Desktop/WebServicesLog.txt“ if previously set with _FmNx_SetPref( "verbose=/Users/Vince/Desktop/WebServicesLog.txt“ )


    host This setting is for the domain name or IP address of the proxy server. Getting this value will return the Domain or IP address that was set. If this setting was never set it will return an empty string.

    Example: _FmNx_GetPref( “host” )

    Returns "125.168.26.36” if previously set with _FmNx_SetPref( “host=125.168.26.36” )


    port This setting for the port used for the proxy server. Getting this value will return the port that was set. If this setting was never set it will return an empty string.

    Example:_FmNx_GetPref( “port” )

    Returns “591” if previously set with _FmNx_SetPref( “port=591” )


    proxy_user If you are using a proxy server that requires a user and password, this is the setting that is used to store the user name. It will return the user name that was set or an empty string if no user was set.

    Example: _FmNx_GetPref( “proxy_user” )

    Returns “TestProxyUser” if previously set with _FmNx_SetPref( “proxy_user=TestProxyUser” )


    proxy_password If you are using a proxy server that requires a user and password, this is the setting that is used to store the password. It will return the password that was set or an empty string if no password was set.

    Example: _FmNx_GetPref( “proxy_password” )

    Returns “TestProxyPassword” if previously set with _FmNx_SetPref( “proxy_password=TestProxyPassword” )


    default_encoding This is to let FileMaker know what the default encoding is of the return data. It will return to what ever it was previously set to or “native” in the event that it has not been set.

    Example: _FmNx_GetPref( "default_encoding” )

    Returns “utf8” if is was previously set with _FmNx_SetPref( “default_encoding=utf8” )


    param_delimiter If the web service you are working with supports arrays of simple data types you can use this preference to set a delimiter between the array elements. Getting this setting will return the value previously set or an empty string if it was not set.

    Example: _FmNx_GetPref( "param_delimiter” )

    Returns “-” if is was previously set with _FmNx_SetPref( “param_delimiter=-” )



    {WSDL/Domain:}http_user If the service you are accessing requires HTTP Authentication this setting will need to be set for the user name to be included as part of the HTTP headers. Replace WSDL/Domain with the name of the WSDL or Domain. Getting this values will return the user name or an empty string if no value was set.

    Example: _FmNx_GetPref( “wsdl_name:http_user” )

    Returns “fmnexus” if previously set with _FmNx_SetPref( “wsdl_name:http_user=fmnexus” )


    {WSDL/Domain:}http_password If the service you are accessing requires HTTP Authentication this setting will need to be set for the password to be included as part of the HTTP headers. Replace WSDL/Domain with the name of the WSDL or Domain. Getting this values will return the password or an empty string if no value was set.

    Example: _FmNx_GetPref( “wsdl_name:http_password” )

    Returns “abc123” if is was previously set with _FmNx_SetPref( “wsdl_name:http_password=abc123” )


    WSDL:http_timeout This setting is for the timeout in seconds for WSDL / SOAP operations. Getting this values will return the timeout in seconds. If no timeout has been set it will have a default value of 10 seconds.

    Example: _FmNx_GetPref( “wsdl_name:http_timeout” )

    Returns “10” if is was previously set with _FmNx_SetPref( “wsdl_name:http_timeout=10” )


    {WSDL/Domain:}http_strict_ssl Set to “true” or “false”. If “true” it will validate certificate used by the server with a Certificate Authority. If “false” it will allowed self signed certificates. Frequently internal systems will used self signed certificates. Replace WSDL/Domain with the name of the WSDL or Domain you are setting this for. Results will always be in lowercase.

    Example: _FmNx_GetPref( “wsdl_name:http_strict_ssl” )

    Returns “true” if is was previously set with _FmNx_SetPref( “wsdl_name:http_strict_ssl=TRUE” )

    Comments

    /groups/ws/search/index.rss?tag=hotlist/groups/ws/search/?tag=hotWhat’s HotHotListHot!?tag=hot0/groups/ws/sidebar/HotListNo items tagged with hot.hot/groups/ws/search/index.rss?sort=modifiedDate&kind=all&sortDirection=reverse&excludePages=wiki/welcomelist/groups/ws/search/?sort=modifiedDate&kind=all&sortDirection=reverse&excludePages=wiki/welcomeRecent ChangesRecentChangesListUpdates?sort=modifiedDate&kind=all&sortDirection=reverse&excludePages=wiki/welcome0/groups/ws/sidebar/RecentChangesListmodifiedDateallRecent ChangesRecentChangesListUpdateswiki/welcomeNo recent changes.reverse5search