Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

downloadByOids, downloadByTypes Services doesn't work as expected #220

Closed
igunawardana opened this issue Jun 30, 2015 · 5 comments
Closed

Comments

@igunawardana
Copy link

  1. I called the above services it returns the topic id.
  2. Send the topic id to getProgress and the response comes as follows,
    {
    "response": {
    "result": {
    "__type": "SLongActionState",
    "end": null,
    "errors": [],
    "infos": [],
    "oid": -1,
    "progress": 0,
    "rid": 0,
    "stage": 1,
    "start": 1435667546944,
    "state": "STARTED",
    "title": "Starting download",
    "warnings": []
    }
    }
    }
  3. Then I tried getDownloadData service but it just returned empty result as follows,
    {
    "response": {
    "result": {}
    }
    }
  4. And I also tried using following url to download the expected data, but nothing recieved,
    http://ip:port/bimserver/download?token={token}&longActionId=4&serializerOid=2687014&topicId=4
  5. But I tried the same steps by calling download service and it worked.

What can be the reason behind this? Am I doing something wrong? Or the data that I am expecting is not there? I gave the IFCDOOR as a type to downloadByTypes, as it was there in ifc file which was checked in.

@dlabz
Copy link
Contributor

dlabz commented Jun 30, 2015

There is a few things you might be doing wrong:

  1. response from getProgress should look like this when download is ready:
{"response":{"result":{
"__type":"SLongActionState",
"end":null,
"errors":[],
"infos:[],
"oid":-1,
"progress":0,
"rid":0,
"stage":2,
"start":1435673937837,
"state":"STARTED",
"title":"Done preparing",
"warnings":[]
}}}
  1. If you are using Javascript api with BIMserver 1.4.0, there is an issue which was fixed after FINAL release. You could try setting includeAllSubTypes to false in your initial request, to go around the issue, or get the updated bimserverapi.js

@igunawardana
Copy link
Author

Thank you for the quick reply,

I am just calling services from api client application provide in bimview. 1.4.0-RC-2015-03-14 is the version of the bimserver I am currently using. How to get the
"stage":1,
"state": "STARTED",
"title": "Starting download",

TO

"stage":2,
"state":"STARTED",
"title":"Done preparing",

I had been waiting for hours and tried but still the stage is 1. And "includeAllSubtypes": "false", is set in download request.

@dlabz
Copy link
Contributor

dlabz commented Jul 1, 2015

You should check the BIMserver log for errors.

@igunawardana
Copy link
Author

Found the following Null Pointer error when calling the downloadByTypes service.

01-07-2015 07:28:33 ERROR (org.bimserver.longaction.LongAction.java:187)
java.lang.NullPointerException
01-07-2015 07:28:33 ERROR (org.bimserver.BimServer.java:222)
java.lang.NullPointerException
at org.bimserver.longaction.LongAction.changeActionState(LongAction.java:90)
at org.bimserver.longaction.LongAction.error(LongAction.java:190)
at org.bimserver.longaction.LongDownloadAction.execute(LongDownloadAction.java:67)
at org.bimserver.longaction.LongActionManager$1.run(LongActionManager.java:43)
at java.lang.Thread.run(Unknown Source)

And the request I sent is,
{
"token": "{token}",
"request": {
"interface": "Bimsie1ServiceInterface",
"method": "downloadByTypes",
"parameters": {
"roids": ["327683"],
"schema": "ifc2x3tc1",
"classNames": ["IFCDOOR"],
"serializerOid": "2687014",
"includeAllSubtypes": "false",
"useObjectIDM": "false",
"deep": "false",
"sync": "false"
}
}
}

Can this be because of, unavailability of IFCDOOR ?, but I double check the checked in file has IFCDOOR object as follows,

#7022= IFCDOOR('1hOSvn6df7F8_7GcBWlRGQ',#38,'M_Single-Flush:1250mm x 2010mm:1250mm x 2010mm:146596',$,'1250mm x 2010mm',#14080,#17208,'146596',2.009999999999999,1.25);

@rubendel
Copy link
Member

rubendel commented Jul 1, 2015

IFCDOOR should be camelcased

@rubendel rubendel closed this as completed Jul 1, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants