BIMserver icon indicating copy to clipboard operation
BIMserver copied to clipboard

Can’t use download with a "MessagingSerializerPlugin" .

Open KevinFournier opened this issue 6 years ago • 3 comments

Hello,

Context

  • I am using Unity3D and I am trying to get data from BIMServer.
  • I am just trying to get the data, not to display 3d object, for now.
  • I am using serializer plugins available with the installation of BIMServer (Ifc2x3tc1, gltf, binarySerializers, json, etc.).
  • I am using C# and I request BIMServer with the json API.
  • I had no problem to download data with those serializers :
    • ifc2x3tc1--> get a readable ifc file
    • gltf 2 --> get a readable glb file
    • json (with and without geometry)

Problem

Just before beginning I use the convention below to differentiate the types and methods I talk about in the issue : json api methodes Classes Interfaces

I tried different download from the server using the ServiceInterface.download query from the api. I used different serializers based on the response from the PluginInterface.getAllSerializers.

It works well but not with the BinaryGeometryMessagingSerializer(Plugin); an exception is raised inside the DownloadByNewJsonQueryDatabaseAction class (line 94), where a cast is done. It is because here, the plugin referenced inside the download query is cast as a SerializerPlugin but the BinaryGeometryMessagingSerializerPlugin does not implement it, it implements MessagingSerializerPlugin.

I understand that those interfaces are two different type of plugin but in the api a request to PluginInterface.getAllSerializers return the BinaryGeometryMessagingSerializer (and its streaming version). I found out that a call to PluginInterface.getAllSerializerPluginDescriptors does not return the descriptor for implementation of MessagingSerializerPlugin so it is possible to filter the serializer.

Despite that, I still have few questions:

  • The ServiceInterface.download query should return an error when not using an SerializerPlugin, shouldn’t it?
  • Is there any other mean to get data from a MessagingSerializerPlugin through download ?

Note that I just start using BimServer. Excuse me if I misunderstood something.

Kévin F.

KevinFournier avatar Dec 18 '19 16:12 KevinFournier

Is this still an issue?

hlg avatar May 12 '21 10:05 hlg