WebMapServiceRasterOverlay not getting data

I upgraded my Unreal version and Cesium version from 1.24.0 to 2.6.0. and Unreal 5.1.1 to 5.3.2. One thing that I have run into is the camera seems to not stop moving and accelerating toward the terrain. However more importantly than that I have an issue with the WebMapServiceRasterOverlay. When I try to pass an url to the overlay, I lose all imagery.

With a WebMapServiceRasterOverlay attached i get no data:

But when I remove that, I get data imagery, also the data never comes through. When I remove the web map raster overlay:

The base terrain comes back.
I am also seeing an issue that says:
LogCesium: Error: [2024-07-31 14:34:11.894] [error] [RasterOverlayCollection.cpp:127] Web map service XML document does not have a Service element.
LogCesium: Error: [2024-07-31 14:34:13.188] [error] [RasterOverlayCollection.cpp:127] Web map service XML document does not have a Service element.

Given how the plugin works, I have an Api call that provides the initial data in this format from geoserver for example:

//I have excluded parameters given the nature of the data I am working with, but could post a url.
builder.AppendFormat(“{0}/geoserver/{1}/wms{2}&TRANSPARENT={3}&version={4}&service={5}&format={6}&styles={7}&width={8}&height={9}&bbox={10}&layers={11}&crs={12}”

And then when the plugin makes a second call, I send the data in this format:
//I have excluded parameters given the nature of the data I am working with, but could post a url.
builder.AppendFormat(“{0}/geoserver/{1}/wms{2}”
http://100.01.01.4:8080/geoserver/North_America/wms

This has worked in the previous versions, and I am wondering what may have change and what I need to adjust perhaps in the Api to fix this. It looks like the previous version of the plugin would call the Base Url twice, but the updated one seems to only call it once and I am not sure what the parameters are that need to be included to fix the service element issue.

image

When I try to pass in the wms url directly without my API passthrough, I get this error:

LogCesium: Error: [2024-08-01 14:58:15.149] [error] [RasterOverlayCollection.cpp:127] Error while creating tile provider: Request failed.
LogCesium: Error: [2024-08-01 14:58:15.151] [error] [RasterOverlayCollection.cpp:127] Error while creating tile provider: Request failed.

One thing that I have run into is the camera seems to not stop moving and accelerating toward the terrain.

This could be caused by the “Enable World Bounds Checks” option being enabled in your level. See step 3.2:

With a WebMapServiceRasterOverlay attached i get no data

If the WMS overlay can’t load, then the entire tileset will not load. So those “Web map service XML document does not have a Service element” errors are the immediate problem. Cesium for Unreal dislikes something about your WMS.

This has worked in the previous versions, and I am wondering what may have change and what I need to adjust perhaps in the Api to fix this.

I’m not really sure. It might be helpful to see the complete URL that you’re providing to the raster overlay. It’s also possible that something changed on the server side, so if you can go back to the previous version and confirm that it still works as expected, that would be helpful.

Hi Kevin,

No I have that option disabled for a while now.
image

As for the WMS issue, when I go back to a previous version it works perfectly fine. The previous version calls my Api with the same URL, but it resolves the first time then calls the same Api call again with more expansive wms data calls as it pulls in the tiles.

The url I am providing to the RasterOverlay is my api url with a token for validation with our API. Then our API translates this to the correct WMS call and sends it back. This worked in version 1.24.0.

Here is an example URL:
https://localhost:7023/api/Cesium/GetData?Token=Blank&serverName=North_America
This returns from our API as a passthrough
[http://100.01.01.4:8080/geoserver/North_America/wms]

In the previous version once that occurred, the same api call would be called again but this time include proper parameters like: TRANSPARENT={3}&version={4}&service={5}&format={6}&styles={7}&width={8}&height={9}&bbox={10}&layers={11}&crs={12}

When I look at what the old plugin sends on the initial call i get this as a parameter:
“North_America?request=GetCapabilities”
North America being the layer name that I placed in the layer field. Also the old version sends a parameter for service which is WMS as the value.
However when I run this exact same thing in the new version, I only get:
“North_America”
and the service parameter is missing or null.

Then in the old version, using the parameters that the plugin sends to me, I construct the full url:
http://100.01.01.4:8080/geoserver/North_America/wms?request=GetCapabilities
Once I pass that in, the url is called again with parameters like I mentioned before. I will try adding the “wms?request=GetCapabilities” portion myself instead of getting it from the plugin and see what occurs.

So, I tested out adding:
[?request=GetCapabilities]
so that I get (http://100.1.1.4:8080/geoserver/North_America/wms?request=GetCapabilities)
and now the plugin properly returns the second call with the accurate data parameters.
The second call looks like this:
http://100.1.1.4:8080/geoserver/North_America/wms?request=GetCapabilities&TRANSPARENT=TRUE&version=1.3.0&service=WMS&format=image/png&styles=&width=256&height=256&bbox=0.000000,0.000000,90.000000,90.000000&layers=conus_base_reflectivity_mosaic&crs=EPSG:4326
I think I am getting data, but I am doing this on local host to test so there is a large slow down versus running my Api in the cloud like on Azure.

This will require an API change on my end to add back the parameters that the cesium plugin no longer supplies. Was this change supposed to happen or is it a bug or perhaps just a change from the many versions that I was behind?

I’m a little lost in all the URLs and versions. Let’s just focus on the new version. You said you’re supplying a URL like this:

https://localhost:7023/api/Cesium/GetData?Token=Blank&serverName=North_America

When you do that, what does Cesium for Unreal request?

Correct, I supply to the plugin:

https://localhost:7023/api/Cesium/GetData?Token=Blank&serverName=North_America

But when the plugin calls the above url it hits my api, and my api redirects it to this url as a passthrough:
[http://100.01.01.4:8080/geoserver/North_America/wms] based on what the plugin sends me.

In the old version, the plugin provided:
[?request=GetCapabilities]

In the new plugin, it does not. However, it needs to have this parameter.

This is the url that my api sends to the new plugin that works:
[http://100.01.01.4:8080/geoserver/North_America/wms?request=GetCapabilities]
however, I have to manually add the GetCapabilities parameter for it to work.

I am not sure if the lack of this parameter is due a bug in the plugin or it was removed for some other reason.

Once the url is supplied:
[http://100.01.01.4:8080/geoserver/North_America/wms?request=GetCapabilities]

Then the plugin will call the api again, with more parameters and thus I make another call with the new parameters:
http://100.1.1.4:8080/geoserver/North_America/wms?request=GetCapabilities&TRANSPARENT=TRUE&version=1.3.0&service=WMS&format=image/png&styles=&width=256&height=256&bbox=0.000000,0.000000,90.000000,90.000000&layers=conus_base_reflectivity_mosaic&crs=EPSG:4326

I hope that makes sense.

@Kevin_Ring When I plug in the URL [http://100.01.01.4:8080/geoserver/North_America/wms]
Into the plugin I can get the data to load correctly, however my issue is that I am trying to proxy this URL through my Api to the plugin, and I am unable to get it to work in the new version, like I was able to in the old version.
I need to feed the plugin my secure Api URL and the Api will passthrough the base URL.

When I try with or without the [?request=GetCapabilities] parameter, I am unable to get data to load via the API, but when I include the parameter, I get the next step that I would expect if I was using the older version.

Please tell me what URL Cesium for Unreal itself requests from your proxy server. It doesn’t help me very much to know what your proxy server turns it into at your origin server, because there’s a whole layer in there that I have no insight into. But if Cesium for Unreal is requesting an incorrect WMS URL to begin with, I can help with that.

That is fair, it seems that If I just add a raster service overlay to an existing tileset this URL works:
http://100.1.1.4:8080/geoserver/North_America/wms
This URL is a direct URL to the data. I can get this to load.

This is the URL that I need to send into the Cesium for Unreal URL parameter:
https://localhost:7023/api/Cesium/GetData?Token=Blank&serverName=North_America

However, I cannot pass in the direct URL as it is not accessible outside of our network, So I need to be able to pass an Api to it that resolves to the direct URL. This is what I had working in the old version, but it seems that this has changed in the new version.

What confuses me is that my Api is passing in the direct URL to the plugin and nothing comes back at all. Its only when I include extra parameters that the plugin begins loading specific tiles.

I will keep tinkering on my side to see if I can pinpoint the cause of the issue. I can only see what the plugin is doing when I pass in my Api URL, because I can see what is returned. I do not think that Cesium for Unreal is requesting an incorrect WMS URL, I think that it does not return tiles unless certain parameters are included that are missing between versions.

I’m struggling to help you because you’re still not answering my question. You put https://localhost:7023/api/Cesium/GetData?Token=Blank&serverName=North_America in the URL parameter of the WMS raster overlay. Then Cesium for Unreal does some requests to your server running on localhost:7023 and those are somehow wrong or inadequate, right? But exactly what URL(s) is Cesium for Unreal requesting? And in what way is it inadequate? Is it dropping those extra Token=Blank&serverName=North_America parameters? Something else?

Let me try this way:
Using the newest version of the plugin that I mentioned above,
When I put https://localhost:7023/api/Cesium/GetData?Token=Blank&serverName=North_America
In the Base url field,
I get the error message: Web map service XML document does not have a Service element.


In the image below.
When I check my code, the url that my code is sending is
http://100.1.1.4:8080/geoserver/North_America/wms
This results in a Web map service XML document does not have a Service element error.
What I get in the parameters of my api are

  1. the token
  2. the wms service name in this regard it would be North_America.

If I remove my api from the equation and just use http://100.1.1.4:8080/geoserver/North_America/wms directly, the data will load on a tileset.

So ultimately I am trying to determine why when I use my API, I get the error message
“Web map service XML document does not have a Service element.”

From there, I compared the new version to the old version using the exact same api call, and what I noticed is that when I include that url, I get 2 parameters back

  1. the token
  2. the wms service name in this regard it would be North_America PLUS ?request=GetCapabilities
    So this would be the URL passed to the old version of the plugin because my api parses the “North_America?request=GetCapabilities” string returned from the older version of the plugin and builds the correct wms call as shown below.
    http://100.01.01.4:8080/geoserver/North_America/wms?request=GetCapabilities

When I add this ?request=GetCapabilities to the NorthAmerica parameter returned in the new plugin, I am able to make it to the second step of the Cesium for Unreal plugin call, which then sends more data for the tile that it is trying to load.
As seen here in the code:

In this image, I have taken the “North_America” parameter that the CesiumforUnreal plugin has sent back to me, and appended “?request=GetCapabilities”. Then eventually the CesiumforUnreal plugin will call the API again with more parameters for the tile as shown in this image and allows me to build the longer URL which I then pass for the tiles.

http://100.01.01.4:8080/geoserver/North_America/wms?request=GetCapabilities&TRANSPARENT=TRUE&version=1.3.0&service=WMS&format=image/png&styles=&width=256&height=256&bbox=0.000000,0.000000,90.000000,90.000000&layers=conus_base_reflectivity_mosaic&crs=EPSG:4326

However, the data still does not load in the New Cesium for Unreal plugin, the second call is extremely slow and sometimes doesn’t fire, so I am not sure what I am doing wrong. This method worked in the old plugin, and I didn’t have to append “?request=GetCapabilities” because the old Cesium for Unreal plugin sent that back to me on the first pass, so I could just use it. So, I am stuck.
I hope this makes more sense.

Long story short, I am not sure why when I send
http://100.01.01.4:8080/geoserver/North_America/wms it works,
but when I use the API sending the exact same URL, I get the “Web map service XML document does not have a Service element.” error. I do not get this error when I include the extra appended data, and I seem to make progress but I still don’t load the tiles.

1 Like

We found the issue, I needed to pass in the entire Query String through to the URl so the proxy would send in all the information. Needed to only supply what was visible to me, and not worry about the secondary parameters that the CesiumForUnreal plugin was sending me and just proxy those through as well.
Thank you for all the help!

1 Like