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

Check In using JSON API is not possible #1016

Open
david-San opened this issue Jul 26, 2019 · 3 comments

Comments

@david-San
Copy link

commented Jul 26, 2019

Describe the bug
Hi Ruben,

I have not been able to do checkin using the JSON API. I have tried all documentation and it seems there could be a bug somewhere.

I managed to do the checking, but the file is smaller than when I use the BIMView interface. It seems it is a bout 21 elements short. I can export the file and it seems fine, but it is not possible to see it on the online renderer.

A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:

  1. Go to the following web page to download the IFC file I am using to do this test. It's very small and simple:

http://openifcmodel.cs.auckland.ac.nz/Model/Details/268

  1. Open the BIMserver webpage, enter administrator credential. Create a project "Test" (meter;ifc2x3tc1). Once the project is created, enter in it. Click on the triangle, and check in the file. Drag and drop the file 171210eccentricity_physical.ifc. Deserializer ifc2x3tc1 (Streaming). On the comment I put again the name of the file: 171210eccentricity_physical.ifc. and press "check in new version".

  2. Click on the eye next to the project. You can see the beam on the right.

  3. Click on revisions and see the size. It says 75.

  4. Now open console: http://127.0.0.1:8082/apps/console/

  5. Navigate to checkinSync and fill the data. Using the same POID that the project has. In my case:

{
"token": "55ea429a566f7e6f04d9dd4a79f89e8107baed8250d4757a1f48e8095a9afc37b57f5a540407e1cced1378173d453386",
"request": {
"interface": "ServiceInterface",
"method": "checkinSync",
"parameters": {
"poid": 7995393,
"comment": "171210eccentricity_phisical.ifc",
"deserializerOid": 589865,
"fileSize": 3579,
"fileName": "17121eccentricity_physical.ifc",
"data": "SVNPLTEwMzAzLTIxOw0KSEVBREVSOw0KRklMRV9ERVNDUklQVElPTigNCi8qIGRlc2NyaXB0aW9uICovICgnVmlld0RlZmluaXRpb24gW0Nvb3JkaW5hdGlvblZpZXddJywgJ0NvbW1lbnQgW0VjY2VudHJpY2l0eSxTVEVQIENhc2VsaWI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VVTklULiwkLC5TRUNPTkQuKTsNCiMyMDY1PSBJRkNTSVVOSVQoKiwuQVJFQVVOSVQuLCQsLlNRVUFSRV9NRVRSRS4pOw0KIzIwNjY9IElGQ1NJVU5JVCgqLC5QUkVTU1VSRVVOSVQuLCQsLlBBU0NBTC4pOw0KIzIwNjc9IElGQ1NJVU5JVCgqLC5GT1JDRVVOSVQuLCQsLk5FV1RPTi4pOw0KIzIwNjg9IElGQ1NJVU5JVCgqLC5USEVSTU9EWU5BTUlDVEVNUEVSQVRVUkVVTklULiwkLC5ERUdSRUVfQ0VMU0lVUy4pOw0KRU5EU0VDOw0KDQpFTkQtSVNPLTEwMzAzLTIxOw0K",
"merge": "false"
}
}
}

  1. Hit send: Response:

{
"response": {
"exception": {
"__type": "ServerException",
"message": "org.bimserver.interfaces.objects.SLongActionState cannot be cast to org.bimserver.interfaces.objects.SLongCheckinActionState"
}
}
}

  1. Go the project. Even though there was an error the file was checkin but partially. If you to Revisions, it says it is 54 in size. You can see the tree but cannot see the 3D of the file in the interface. If you download the file, it seems it is exactly as the original one.

  2. Could you please tell me how to solve this?

Thank you so much in advance.

Expected behavior
Both size to be the same when doing the checkin via interface or via REST. The application I am working on can only access via REST. I need to be able to see the 3D of the element.

Screenshots
1 | 16 minutes ago | Administrator | 171210eccentricity_physical.ifc | 75
2 | 12 minutes ago | Administrator | 171210eccentricity_phisical.ifc | 54

Additional context
I tried all other methods and it is still the same issue. I tried using Postman and my app. Always is the same. It seems I am missing 21 bytes in the checkin always. I am using BIMserver 1.5.125 on macOS, Java 8.

@rubendel

This comment has been minimized.

Copy link
Member

commented Jul 27, 2019

  1. Just to be clear, BIMserver does not have a REST interface.
  2. The size in the revisions table is the amount of objects in the model, not the filesize, which would make no sense since BIMserver does not store the IFC files as files, as you have probably read in the documentation.

Can you try again in the latest release? I just did the same thing and it results in two models of 75 objects.

@david-San

This comment has been minimized.

Copy link
Author

commented Jul 30, 2019

Sorry for using the wrong name. I meant using the JSON API.

You are right, I checked using version 1.5.157 and it seems to do the checkin process correctly.

Unfortunately, as a result of the change, my application is now completely broken. I have to figure out what happened.

@david-San david-San changed the title Check In using REST is not possible Check In using JSON interface is not possible Jul 30, 2019

@david-San david-San changed the title Check In using JSON interface is not possible Check In using JSON API is not possible Jul 30, 2019

@motjokk

This comment has been minimized.

Copy link

commented Aug 13, 2019

In my experience, it is best to use the checkinFromUrlSync method.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.