0

我有一个资产和一个资产类型。现在,我想扩展资产类型。我怎样才能做到这一点。我使用 Java 1.0 SDK。

我尝试了以下但我总是得到一个异常(400响应代码)

AssetTypeDto dto = new AssetTypeDto();
        Integer etag = assetTypeClient.getAssetTypeById("mytype").getEtag();
        System.out.println(etag);

        AspectTypeClient aspectTypeClient = AspectTypeClient.builder().mindsphereCredentials(credentials)
                .restClientConfig(config).build();

        AspectTypeResource atr = aspecttypeClient.getAspectTypeById("mynewType");

        dto.addAspectsItem(atr);

        assetTypeResource = assetTypeClient.updateAssetType("mytype", dto,etag + "");
4

1 回答 1

0

错误响应说什么?快速解决方案:只需通过 UI 更新 Asset Manager 中的资产类型。

于 2020-09-02T11:35:56.857 回答