Model Derivative API responses not mapping through Jackson

后端 未结 2 937
暗喜
暗喜 2021-01-25 09:24

Have there been updates made to the response objects from the Model Derivative API as we are having issues mapping the responses from requests for 3D models back into the Manife

相关标签:
2条回答
  • This is to answer the second question as references for all.

    The problem is due to the header is set to "gzip" format when calling GET :urn/metadata/:guid. If it is not "gzip", all work well. While with other ways such as Postman, the header with gzip can also work.

    In the past, when clients used gzip header, actually it doesn't trigger a gzip encoding. So everything is fine. After the release recently, the content returns the content in gzip if gzip is specified, while the SDK doesn't handle it correctly. Postman unzips the gzip to json automatically, so it looks working.

    So, the fix could be adding one line in the ApiClient.java at line 115: client.addFilter(new GZIPContentEncodingFilter(false));

    I also forked the source github repository in my space with the fixes on the two problems. a pull request is commit to the main repo. that is to allow the response of API call can handle gzip content and unzip it. https://github.com/xiaodongliang/forge-api-java-client

    We apologize for the two issues that have affected some projects using SDK.

    0 讨论(0)
  • 2021-01-25 10:04

    I got what's wrong with the issue. The response of Get Manifest endpoint did changed a bit recently. There will a property database node aside the geometry nodes for Revit generated manifest. So one new role is 'Autodesk.CloudPlatform.PropertyDatabase'. While the old JAVA object ManifestChildren.JAVA does not declare the role. which caused the failure.

    To fix it, you can simply add the new role in ManifestChildren.JAVA e.g.

    i have requested a commit for JAVA SDK. you could modify it directly at your side if you merge the SDK source code to your project.

    Hope this helps.

    0 讨论(0)
提交回复
热议问题