Skip to main content
Solved

Consume WMS service

  • September 5, 2018
  • 8 replies
  • 47 views

sunsilk11
Contributor
Forum|alt.badge.img+6

@DaveAtSafe

Hi I am trying to follow the instructions provided in

https://knowledge.safe.com/articles/19640/how-to-create-a-wms-service-using-fme-server.html

to create a wms service.

I have created the 2 services GetCapabilities and GetPNG in FME server, and I can test each successfully using following urls:

http://myserver/fmedatastreaming/TestOGC/GetCapabilities.fmw?SERVICE=WMS&REQUEST;=GetCapabilities&VERSION;=1.1.1

http://myserver/fmedatastreaming/TestOGC/GetPNG.fmw?SERVICE=WMS&VERSION;=1.1.1&REQUEST;=GetMap&LAYERS;=PETROLSTATION_PT&STYLES;=&FORMAT;=image%2Fpng&TRANSPARENT;=TRUE&BBOX;=350000%2C284000%2C460000%2C370000&WIDTH;=1024&HEIGHT;=1024&EXCEPTIONS;=application%2Fvnd.ogc.se_xmlHowever using FME web user interface, the GetPNG service does not create any outputAlso, should I be able to consume this wms service in any web client using http://myserver/fmedatastreaming/TestOGC/GetCapabilities.fmw?

Best answer by daveatsafe

Hi @sunsilk11,

The GetPNG workspace is set up to extract the bounds of the output PNG from the URL that called it. It is not possible to set these values when running the workspace through the FME Server web interface, and so the workspace will fail.

The URL http://myserver/fmedatastreaming/TestOGC/GetCapabilities.fmw should work in your WMS clients.

View original
Did this help you find an answer to your question?

8 replies

sunsilk11
Contributor
Forum|alt.badge.img+6
  • Author
  • Contributor
  • September 5, 2018
From the web user interface, when I run GetPNG.fmw, I get

 

There was an Error

 

There was nothing to download as the workspace didn't generate any output.

 

Go back or start from the beginning.

 

 

 


daveatsafe
Safer
Forum|alt.badge.img+19
  • Safer
  • September 5, 2018
sunsilk11 wrote:
From the web user interface, when I run GetPNG.fmw, I get

 

There was an Error

 

There was nothing to download as the workspace didn't generate any output.

 

Go back or start from the beginning.

 

 

 

When you run GetPNG form the FME web interface, what bounds values are you providing?

 

 


sunsilk11
Contributor
Forum|alt.badge.img+6
  • Author
  • Contributor
  • September 6, 2018
I have tried to publish the original workspace (connecting to sample spatiallite database), without changing the bounds. This also came up with

 

"There was an ErrorThere was nothing to download as the workspace didn't generate any output.start from the beginning. "

 

I am using FME desktop and server 2018.1

 

 

I then replaced with my own filegdb and changed to bounds in the workbench before publishing it to fme server. This returns the same error.

 

 

 


mygis
Supporter
Forum|alt.badge.img+13
  • Supporter
  • September 6, 2018
sunsilk11 wrote:
I have tried to publish the original workspace (connecting to sample spatiallite database), without changing the bounds. This also came up with

 

"There was an ErrorThere was nothing to download as the workspace didn't generate any output.start from the beginning. "

 

I am using FME desktop and server 2018.1

 

 

I then replaced with my own filegdb and changed to bounds in the workbench before publishing it to fme server. This returns the same error.

 

 

 

Hi @sunsilk11 I suggest you try to run the workspace from the server, perhaps there is no data that are being processed.

 

 


sunsilk11
Contributor
Forum|alt.badge.img+6
  • Author
  • Contributor
  • September 6, 2018
Hi @ gisinnovationsb I am running workspace on same machine as spatiallite database.

 

@DaveAtSafe, I don't see an option to set the bounds in FME web interface (see attached).

 

Am I missing something here as I would have expected the sample you provided to work from FME server.

 

Thanks

 

fme-getpng.png

 

 


daveatsafe
Safer
Forum|alt.badge.img+19
  • Safer
  • Best Answer
  • September 6, 2018

Hi @sunsilk11,

The GetPNG workspace is set up to extract the bounds of the output PNG from the URL that called it. It is not possible to set these values when running the workspace through the FME Server web interface, and so the workspace will fail.

The URL http://myserver/fmedatastreaming/TestOGC/GetCapabilities.fmw should work in your WMS clients.


sunsilk11
Contributor
Forum|alt.badge.img+6
  • Author
  • Contributor
  • September 7, 2018
daveatsafe wrote:

Hi @sunsilk11,

The GetPNG workspace is set up to extract the bounds of the output PNG from the URL that called it. It is not possible to set these values when running the workspace through the FME Server web interface, and so the workspace will fail.

The URL http://myserver/fmedatastreaming/TestOGC/GetCapabilities.fmw should work in your WMS clients.

@DaveAtSafe

 

Thanks. I have added the WMS service to my WMS client. However the url requested when panning the map is as follows, which doesn't work.

 

http://myserver/fmedatastreaming/TestOGC/GetCapabilities.fmw?SERVICE=WMS&REQUEST;=GetMap&FORMAT;=image%2Fpng&TRANSPARENT;=TRUE&STYLES;=&VERSION;=1.1.1&LAYERS;=PETROLSTATION_PT&WIDTH;=672&HEIGHT;=307&SRS;=EPSG%3A27700&BBOX;=386902.94208973384%2C277072.6206946977%2C431353.0309899117%2C297379.43214165396

 

If I replace GetCapabilities.fmw with GetPNG in above url, then it returns an image

 

 

 


daveatsafe
Safer
Forum|alt.badge.img+19
  • Safer
  • September 7, 2018
sunsilk11 wrote:
@DaveAtSafe

 

Thanks. I have added the WMS service to my WMS client. However the url requested when panning the map is as follows, which doesn't work.

 

http://myserver/fmedatastreaming/TestOGC/GetCapabilities.fmw?SERVICE=WMS&REQUEST;=GetMap&FORMAT;=image%2Fpng&TRANSPARENT;=TRUE&STYLES;=&VERSION;=1.1.1&LAYERS;=PETROLSTATION_PT&WIDTH;=672&HEIGHT;=307&SRS;=EPSG%3A27700&BBOX;=386902.94208973384%2C277072.6206946977%2C431353.0309899117%2C297379.43214165396

 

If I replace GetCapabilities.fmw with GetPNG in above url, then it returns an image

 

 

 

Hi @sunsilk11,

 

The GetCapabilities URL is used to get the information about the WMS service (ie. layers, bounds, coordinate system, etc.) and so won't return an image. The GetPNG URL is used to get the desired image.

 

The WMS client should be given the GetCapabilities URL. It will then use the capabilities information to automatically create the GetPNG urls for the images it needs.

 


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings