Select to view content in your preferred language

WCS 2.0.1 Not working with ESRI JavaScript 3.33?

1297
3
10-17-2020 03:55 PM
PickBounty
New Contributor
I am trying to implement ESRI WCSLayer Class to work with WCS 2.0.2. This works perfectly with WCS 1.0.0, however, when a using WCS with version 2.0.1, I get an error returned as follows: I am using ESRI Api 3.33.

Error: not a valid multipart coverage response
at WCSLayer.js:189
at c (3.33:104)
at e (3.33:104)
at b.Deferred.resolve.callback (3.33:105)
at c (3.33:105)
at e (3.33:104)
at b.Deferred.resolve.callback (3.33:105)
at c (3.33:105)
at e (3.33:104)
at b.Deferred.resolve.callback (3.33:105) "Error: not a valid multipart coverage response
at https://js.arcgis.com/3.33/esri/layers/WCSLayer.js:189:109
at c (https://js.arcgis.com/3.33:104:350)
at e (https://js.arcgis.com/3.33:104:139)
at b.Deferred.resolve.callback (https://js.arcgis.com/3.33:105:479)
at c (https://js.arcgis.com/3.33:105:63)
at e (https://js.arcgis.com/3.33:104:139)
at b.Deferred.resolve.callback (https://js.arcgis.com/3.33:105:479)
at c (https://js.arcgis.com/3.33:105:63)
at e (https://js.arcgis.com/3.33:104:139)
at b.Deferred.resolve.callback (https://js.arcgis.com/3.33:105:479)"

I get this not a valid multipart coverage response. I have tired this with multiple WCS endpoints and get the exact same error specifically with WCS version 2.0.1.

Any idea what multipart coverage response it is expecting?

Has anyone had any success using the WCSLayer with WCS 2.0.1?

I included my test code to recreate the error.

Thanks.

0 Kudos
3 Replies
by Anonymous User
Not applicable

Hi @PickBounty 

Thanks for providing the test app for troubleshooting.

The GetCoverage response from server doesn't have a multipart MIME type header/body, it's simply TIFF. This is not supported by the API because a multipart coverage is required per WCS 2.0.1 spec, you may want to check server configuration or seek help from the vendor.

Multipart coverage encoding is a major difference between 1.0.0 and newer 2.0.1 version, here's the spec requirement:

[OGC 09-110r4] requirement 36:

The contents of the response to a successful GetCoverage request shall be encoded as specif- ied in GMLCOV [OGC 09-146r2] conformance class multipart where ...

OGC 09-146r2 requirement 19:

A coverage encoded in a multipart message shall consist of a multipart MIME document as specified by IETF RFC 2387

Thanks,

0 Kudos
WenxueJu
Esri Contributor

Hi @PickBounty 

Thanks for providing the test app for troubleshooting.

The GetCoverage response from server doesn't have a multipart MIME type header/body, it's simply TIFF. This is not supported by the API because a multipart coverage is required per WCS 2.0.1 spec, you may want to check server configuration or seek help from the vendor.

Multipart coverage encoding is a major difference between 1.0.0 and newer 2.0.1 version, here's the spec requirement:

[OGC 09-110r4] requirement 36:

The contents of the response to a successful GetCoverage request shall be encoded as specif- ied in GMLCOV [OGC 09-146r2] conformance class multipart where ...

[OGC 09-146r2] requirement 19:

A coverage encoded in a multipart message shall consist of a multipart MIME document as specified by IETF RFC 2387

Thanks,

0 Kudos
PickBounty
New Contributor

Hi @WenxueJu 

Thank you very much for your response. I followed up with your recommendation and further investigation has allowed me to resolve the previous error but led me to another issue.

I no longer get the error. To solve this, I was able to pass through the mediatype parameter as part of the URL (?Mediatype=multipart/related). This returns a multipart response, however although there are no errors to report from the API the image is not rendered on the map.

I am actually not sure why the image does not render as there are no error flags being produced. I am wondering if this may be due to the API not being able to parse the XML properly?

I included an updated html for review.

Any thoughts?

Thanks.

0 Kudos