Skip to Content
0
May 29, 2018 at 06:43 AM

RestFul - issue with prompt when changing universe in a dataprovider

141 Views

I have detected an issue or a missed information with the interaction between Java Code (with RestFul communication) and the BOXI Server during the change of the datasource id of a dataproviders in a WebI Report.

Usually, on own code, we update the universe linked to a dataprovider by this RestFul communication:

requestMethod :POST

url :http://dlnxsbsboxi01.brus.be.soprabanking:6405/biprws/raylight/v1/documents/2619052/dataproviders/mappings?originDataproviderIds=DP13⌖DatasourceId=2618913

-----------before send to server-----------------

[null] null

=== Request content ===

null

=== Response code ===

0

=== Response message ===

null

=== Response content ===

null

-----------after send to server-----------------

| [POST] http://dlnxsbsboxi01.brus.be.soprabanking:6405/biprws/raylight/v1/documents/2619052/dataproviders/mappings?originDataproviderIds=DP13⌖DatasourceId=2618913

| === Request content ===

| null

| === Response code ===

| 200

| === Response message ===

| OK

| === Response content ===

| <?xml version="1.0" encoding="UTF-8" standalone="yes"?>

| <success>

| <message>The resource of type "Document" with identifier "2619052" has been successfully updated.</message>

| <id>2619052</id>

| </success>

|

| === Headers ===

| null: [HTTP/1.1 200 OK]

| Server: [Apache-Coyote/1.1]

| Content-Length: [210]

| Date: [Mon, 28 May 2018 11:48:06 GMT]

| Content-Type: [application/xml]

In this above case, it’s working well.

But some reports/dataproviders have @prompt and a dialog box for filling the values appear when we refresh the corresponding report.

On the RestFul communication, the response code is always 200 but the message is not ‘success’ but seems the prompt wanted by the BOXI Server.

url :http://dlnxsbsboxi01.brus.be.soprabanking:6405/biprws/raylight/v1/documents/2619052/dataproviders/mappings?originDataproviderIds=DP2⌖DatasourceId=2618913

-----------before send to server-----------------

[null] null

=== Request content ===

null

=== Response code ===

0

=== Response message ===

null

=== Response content ===

null

-----------after send to server-----------------

| [POST] http://dlnxsbsboxi01.brus.be.soprabanking:6405/biprws/raylight/v1/documents/2619052/dataproviders/mappings?originDataproviderIds=DP2⌖DatasourceId=2618913

| === Request content ===

| null

| === Response code ===

| 200

| === Response message ===

| OK

| === Response content ===

| <?xml version="1.0" encoding="UTF-8" standalone="yes"?>

| <mappings>

| <parameters>

| <parameter optional="false" type="prompt" dpId="DP15">

| <id>4</id>

| <technicalName>Nom du rapport</technicalName>

| <name>Nom du rapport</name>

| <answer constrained="false" type="Text">

| <info cardinality="Single" keepLastValues="true">

| <values>

| <value>BEAC</value>

| </values>

| </info>

| <values>

| <value>BEAC</value>

| </values>

| </answer>

| </parameter>

| <parameter optional="false" type="prompt" dpId="DP15">

| <id>5</id>

| <technicalName>Numéro d'édition</technicalName>

| <name>Numéro d'édition</name>

| <answer constrained="false" type="Numeric">

| <info cardinality="Single" keepLastValues="true">

| <values>

| <value>1</value>

| </values>

| </info>

| <values>

| <value>1</value>

| </values>

| </answer>

| </parameter>

| </parameters>

| </mappings>

|

| === Headers ===

| null: [HTTP/1.1 200 OK]

| Server: [Apache-Coyote/1.1]

| Content-Length: [1247]

| Date: [Mon, 28 May 2018 11:49:01 GMT]

| Content-Type: [application/xml]

I have tried to fill the ‘mapping’ without result. When I try with GET instead of PUT, I have a “mapping” but without “parameter” tag.

In my point of view, the behaviour is not identical than the BOXI version 3.1.

Do you have an example of code to understand what it should be on the mapping.

I use, for my code, the class provided on your sample code with Base.java and Request.java.

Feel free to contact me.

Thanks upfront for your help,

Gilles