TIBCO Spotfire® Server Web Services API Examples - Library and User Directory Services

Last updated:
11:10pm Aug 26, 2019

Note: In TIBCO Spotfire Server 7.13, the URL and authentication method for accessing the supported Web Services changed.  The Web Services API for 7.12 and previous versions is deprecated, but still available by enabling the legacy SOAP API.  This page includes documentation and sample code for TIBCO Spotfire Server 7.13 and above and for TIBCO Spotfire Server 7.12 and previous.  The documentation and code for 7.13 and above has 7.13 in the name - spotfire_server_api_samples_7.13.pdf, tss_wsapi_csharp_7.13.zip and tss_wsapi_java_7.13.zip.  The documentation and sample code for Spotfire Server 7.12 and previous versions is spotfire_server_api_samples.pdf, tss_wsapi_csharp.zip and tss_wsapi_java.zip.

TIBCO Spotfire® Server exposes Web Services that can used for various tasks.  As of TIBCO Spotfire Server 7.13, the current set of Spotfire Server Web Services APIs contains the following services:

  • Information Model Service
  • Library Service
  • License Service
  • User Directory Service
  • Security Service
  • Update Analysis Service

Attached to this article is documentation and sample code for C# and Java that walk through examples of the Library and User Directory Services.  The document is a companion to the sample code and explains:

  • How to configure Spotfire Server to enable and grant access to the Web Services
  • How to understand the sample code 
  • How to compile the sample code using Visual Studio for C# and Eclipse for the Java Code
  • How to run the compiled samples

Attached to this article is different sample code and documentation for TIBCO Spotfire Server 7.13 and above and TIBCO Spotfire Server 7.12 and below.  Starting with Spotfire Server 7.13, the Web Services API use the OAuth 2.0 protocol for authentication and authorization.  The documentation and sample code for 7.13 show how to use this protocol to configure and call the Web Services API. 

The sample code for Spotfire Server 7.12 and previous versions handles the extra security provided by CSRF protection as discussed in the Spotfire Server Web Services API Reference.  This sample code will be useful to those that are connecting to other Spotfire Server Web Services, since the code for connecting and handling a CSRF protected service will be useful.

See also TIBCO Spotfire® Web Services API Tutorials and Examples.

Feedback (3)

Getting Unexpected file error always whenver trying to run code. Not sure what could be wrong here. Any idea on the error message ?

----

Retrieving OAuth Token from: https://spotfirexlab.abc.com:443/spotfire/oauth2/token

Searching for user 'sampletest'

An Exception Occurred: java.net.SocketException: Unexpected end of file from server

javax.xml.ws.WebServiceException: java.net.SocketException: Unexpected end of file from server

shubham.yadav 5:34pm Jan. 22, 2020

Schmitt,

Thanks for the reminder. There does exist a wsimport.bat/sh project which I found here finally: https://search.maven.org/search?q=g:com.sun.xml.ws%20AND%20a:jaxws-ri&core=gav.  I used the latest one which is 2.3.2 as of August 16, 2019.  It worked similar to the previous wsimport that was included with the JDK.  When one downloads and unzips the zip file, the bin directory has wsimport.bat/sh files. I will update the article when I get a chance.

Thanks,

Peter

Peter McKinnis 12:47pm Aug. 16, 2019

These samples are great, but limited to Oracle Java 8.

With OpenJDK 11, there is no longer any WSIMPORT utility.

I have found an alternative solution, using axis2 libraries (org.apache.axis2.wsdl.WSDL2Java)

schmitt 5:26pm Jul. 24, 2019