Tags

    Default Functions: 4

    _FmNx_GetPref( key )

    Preferences have been greatly simplified in the 2.0 release. Now instead of having preferences at the global, WSDL, and WSDL function level you now have them only globally. This means that if you need to have some preferences set before you execute a particular WSDL function then you should include those settings in your script. For example you might need to send some authentication headers as part of your request. In this case you would be setting the user, and password information before you execute any other function calls. This has also reduced the number of functions that we have to support and the number of functions you have to learn about.
    Possible keys include:
      • wsdl_count
      • wsdl_names
      • function_count
      • function_names
      • function_prototypes
      • verbose
      • host
      • port
      • wsdl:user
      • wsdl:password
      • wsdl:timeout

    wsdl_count returns the number of WSDLs installed
    Example:
    _FmNx_GetPref( “wsdl_count” )
    Returns 4 if 4 WSDLs were installed

    wsdl_names returns the names of all the WSDLs installed
    Example:
     _FmNx_GetPref( “wsdl_names” )
    Returns the list of wsdl names (example assumes you have only 4 WSDLs installed)
    xQuotes
    Demographics
    PhoneNotify
    SMSNotify
    function_count returns the number of WSDL functions installed
    Example: 
    _FmNx_GetPref( “function_count” )
    Returns 82 for the 4 WSDLs installed

    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 “true” or “false”. This is helpful when debugging what is sent and returned by the request. On a Mac it can be viewed using the console application. By default this option is set to “true”.
    Example:
    _FmNx_GetPref( “verbose” )
    Returns “true” if previously set with 
    _FmNx_SetPref( “verbose=true” )

    host returns the host ip address of request's destination.
    Example:
    _FmNx_GetPref( “host” )
    Returns  "125.168.26.36” if previously set with 
    _FmNx_SetPref( “host=125.168.26.36” )

    port returns the destination port number of the request.
    Example:
    _FmNx_GetPref( “port” )
    Returns “591” if previously set with 
    _FmNx_SetPref( “port=591” )

    Note: the following 3 you would substitute the WSDL name in the place of “wsdl”

    wsdl:user – [required format] – returns the user name associated with this wsdl.
    Example:
    _FmNx_GetPref( “xQuotes:user” ) 
    Returns “fmnexus” if previously set with 
    _FmNx_SetPref( “xQuotes:user=fmnexus” )

    wsdl:password – [required format] – returns the password associated with this wsdl
    Example:
    _FmNx_GetPref( “xQuotes:password” ) 
    Returns “abc123” if is was previously set with 
    _FmNx_SetPref( “xQuotes:password=abc123” )

    wsdl:timeout – needs to be supplied in this format – returns the timeout value in seconds.
    Example:
    _FmNx_GetPref( “xQuotes:timeout” )
    Returns “10” if is was previously set with
    _FmNx_SetPref( “xQuotes:timeout=10” )



    _FmNx_Load_WSDL( wsdl_name; wsdl_document )

    This function allows you the ability to dynamically load the WSDL functions. Because you can load the WSDL functions dynamically from fields then you don't need to worry about also distributing the WSDLs to each client. For example you could have a table with 2 fields; the WSDL name, and the WSDL data. Your script could then loop over all these records and automatically load the functions. As soon as you have loaded the functions from the WSDL they become instantly available in your solution. 
    Note: the WSDL name can be set to anything you would like it to be. Sometimes it is a good idea to keep it short as there is little space available in the External functions list to view the WSDL name and its function name. But once you have started using the WSDL with the name you have selected don't change it because your function references will not be able to be resolved. View information about the WSDL used in this example.
    Download the Download file "n2t.zip" the example file to experiment with this function.
    Load_WSDL has 2 parameters:
    • wsdl_name: text - the name of the WSDL
    • wsdl_document: text - the entire contents of the WSDL you wish to load
    Example:
    _FmNx_Load_WSDL( “n2t”; WSDL::data )
    Result: Loads the following 2 functions as FileMaker native functions - Ready to be used!

    n2t_NumberToDollars( NumberToDollars_dNum )
    n2t_NumberToWords( NumberToWords_ubiNum )


    _FmNx_Register( license_key; owner )

    This function is used to register your plug-in
    Register has 2 parameters:
      • license_key
      • owner
    Example:

    _FmNx_Register( "WEB-2.0-YWXL-LTL1-Y9UI-T17F1"; "FM Nexus" )

    Result: Returns "Success" if valid and "Error: Invalid license number or owner name"


    _FmNx_Reload_All

    This function can be used to load new WSDL functions. Drop a new WSDL file in your WSDL directory (which should be located at the root of your Extensions directory), and call this function to load its functions to become instantly available as FIleMaker native functions. Lets say you wanted to dynamically load the functions available to you from the Demographics WSDL provided by CDYNE.
    Important: WSDLs that you put into the WSDL directory should have the extension of .xml or .wsdl
    Example:

    _FmNx_Reload_All

    Result: Returns "Loaded: Demographics" followed by the list of function prototypes see example file 
    Download file "sample_result.txt"


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

    Set Preferences allow you to set the following perferences
    Keys that can be set are:
      • verbose = true/false
      • host = url
      • port = number
      • wsdl:user = text string
      • wsdl:password = text string
      • wsdl:timeout = number (seconds)

    verbose setting this to true will output the outgoing and incoming request to the console on the mac.
    Example:

    _FmNx_SetPref( "verbose=true" )



    _FmNx_Unload( wsdl_name )


    _FmNx_Version( short/long )

    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