🎉Community Raffle - Win $25

An exclusive raffle opportunity for active members like you! Complete your profile, answer questions and get your first accepted badge to enter the raffle.
Join and Win

Retrieving data from RM Server using Tibco Spotfire

User: "SGolbert"
New Altair Community Member
Updated by Jocelyn
Hi RMers!

I've been trying to retrieve a dataset from inside Tibco Spotfire using a RM web service. I've just retrieved the Titanic dataset and connected to the output port. Then in the web service I select Odata as output format and then JSON (I have tested all other variants as well).

However, I obtain an exception on the Spotfire side.

An exception was thrown by the data connection.<br>Exception text:<br>System.NullReferenceException: Der Objektverweis wurde nicht auf eine Objektinstanz festgelegt.<br>   at Spotfire.Dxp.Data.Access.CancellationHelper.Execute(CancellationToken token, Action action)<br>   at Spotfire.Dxp.Data.Access.CancellationHelper.Execute[T](CancellationToken token, Func`1 function)<br>   at Spotfire.Dxp.Data.Adapters.OData.ODataAdapterConnection.ListTablesCore(CancellationToken cancellationToken, ReadOnlyCollection`1& tables)<br>   at Spotfire.Dxp.Data.Access.Adapters.DataAdapterConnection.ListTables(CancellationToken cancellationToken, ReadOnlyCollection`1& tables)<br>   at Spotfire.Dxp.Data.Access.Adapters.DataAdapter.TryListTables(IDataAdapterExecutionContext executionContext, AdapterCredentialsValue credentials, CancellationToken cancellationToken, ReadOnlyCollection`1& tables)<br>   at Spotfire.Dxp.Data.Access.Adapters.DataAccessDataSourceLink.<>c__DisplayClass47_1.<ListTables>b__0(CancellationToken token)<br>   at Spotfire.Dxp.Data.Access.Adapters.DataAccessDataSourceLink.ExecuteAdapterMethod(ImpersonationPolicy impersonationPolicy, AdapterMethodDelegate method, Nullable`1 cancellationToken)
I have used user and password authentification, but that doesn't seem to be the problem. Could using anonymous login help? Has anybody tried something similar?

Thanks!
Sebastian

Sort by:
1 - 2 of 21
    User: "jwpfau"
    Altair Employee
    Accepted Answer
    Updated by jwpfau
    Hi Sebastian,

    Have you tried to retrieve the data with another tool like Postman?

    It seems to fail during the retrieval of the Service Metadata Document
    http://rapidminer-vm.qs.intra:8080/api/rest/process/Titanic?/$metadata
    A 404 page would also cause the NPE in Spotfire.

    Maybe don't use OData but just some generic JSON parsing.

    Greetings,
    Jonas
    User: "SGolbert"
    New Altair Community Member
    OP
    Accepted Answer
    Hi all,

    I have used a R script in the end, but it was far easier that I thought:
    library("httr")<br>library("jsonlite")<br><br>fullDomain <- "http://server_ip:8080/api/rest/process/Titanic?"<br>r <- GET(fullDomain, <br>         authenticate("sgolbert", "My Password"))<br><br>document <- fromJSON(content(r,"text"))

    That actually brings the data to Spotfire, the rest is Spotfire specific. There is a workaround to make the user input user name and password and then encode it to base64, if you are concerned about security.

    Regards,
    Sebastian