Jump to content

Connecting Spotfire to Jira through JSON API


Pedro Esposito

Recommended Posts

Hello,

We are trying to connect Spotifre to Jira through its API, which returns a JSON.

We had some success through an ironpython script. However, the password has to be hardcoded into the script. Is there any way to show an input popup from ironpython

Using input controls writing to document properties it works, but there may be some security issues. Willa property be stored or transmitted unencrypted Also, I couldn't consistently keep an input field's text always hidden, even using javascript.

When trying to use TDV, we had issues while readingJIRA's JSON. Has anyone ever had success in this

Thank you in advance!

Link to comment
Share on other sites

  • 3 weeks later...

Hello Shandilya,Thank you for your answer! We were able to make it work, with the exception of the "assignee" field, which is one of the most important fields from the API. Some of its attributes start with numbers (e.g. 16x16), which generate invalid XML tags, and return an error. Do you know how can we make TDV ignore or rename these fieldsThank you in advance. JSON excerpt:"assignee" : {"self" : https://jira...,"name" : xxxx,"emailAddress" : johndoe@test.com,"avatarUrls" : {"16x16" : https://jira...,"24x24" : https://jira...,"32x32" : https://jira...,"48x48" : https://jira...}"displayName" : John Doe,"active" : true} Error:An internal error has occurred.

Cause: Cannot decode parameter "result" at position 0 to data type XMLcom.compositesw.cdms.webapi.WebapiException: An internal error has occurred.

Cause: Cannot decode parameter "result" at position 0 to data type XML

    Cannot decode parameter "result" at position 0 to data type XML

    at com.compositesw.common.CompositeRuntimeException.rethrow(CompositeRuntimeException.java:138)

    at com.compositesw.cdms.ds.rest.RestRequest.invoke(RestRequest.java:69)

    at com.compositesw.server.request.HookProcedureRequest.invoke(HookProcedureRequest.java:79)

    at com.compositesw.cdms.webapi.service.WProcResultImpl$InvokerThread.run(WProcResultImpl.java:755)

    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)

    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)

    at java.lang.Thread.run(Unknown Source)

Caused by: com.compositesw.cdms.datasource.IafException: Cannot decode parameter "result" at position 0 to data type XML

    at com.compositesw.cdms.ds.rest.RestConnection.callRestService(RestConnection.java:550)

    at com.compositesw.cdms.ds.rest.RestConnection.call(RestConnection.java:120)

    at com.compositesw.cdms.ds.rest.RestRequest.invoke(RestRequest.java:57)

    ... 5 more

Caused by: java.lang.IllegalStateException: Cannot decode parameter "result" at position 0 to data type XML

    at com.compositesw.cdms.ds.rest.RestConnection.callRestService(RestConnection.java:524)

    ... 7 more    at com.compositesw.cdms.webapi.WebapiException_SOAPSerializer.doDeserialize(WebapiException_SOAPSerializer.java:58)

    at com.sun.xml.rpc.encoding.ObjectSerializerBase.deserialize(ObjectSerializerBase.java:209)

    at com.sun.xml.rpc.encoding.ReferenceableSerializerImpl.deserialize(ReferenceableSerializerImpl.java:172)

    at com.compositesw.cdms.webapi.service.WMetaDataSvc_procresult_getOutputValues_Fault_SOAPSerializer.deserializeDetail(WMetaDataSvc_procresult_getOutputValues_Fault_SOAPSerializer.java:54)

    at com.sun.xml.rpc.encoding.SOAPFaultInfoSerializer.doDeserialize(SOAPFaultInfoSerializer.java:151)

    at com.sun.xml.rpc.encoding.ObjectSerializerBase.deserialize(ObjectSerializerBase.java:209)

    at com.sun.xml.rpc.encoding.ReferenceableSerializerImpl.deserialize(ReferenceableSerializerImpl.java:172)

    at com.compositesw.cdms.webapi.service.WMetaDataSvc_Stub._readBodyFaultElement(WMetaDataSvc_Stub.java:24612)

    at com.sun.xml.rpc.client.StreamingSender._send(StreamingSender.java:238)

    at com.compositesw.cdms.webapi.service.WMetaDataSvc_Stub.procresult_getOutputValues(WMetaDataSvc_Stub.java:7341)

    at com.compositesw.cdms.webapi.WProcResult.getOutputParameterCount(WProcResult.java:36)

    at com.compositesw.ui.modeler.view.result.ComplexProgressTasks$ComplexExecuteQueryTask.displayQueryResult(ComplexProgressTasks.java:508)

    at com.compositesw.ui.modeler.view.result.Comp

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...