Skip to main content
Solved

Reading multiple WFS with FeatureReader issue


oskar
Contributor
Forum|alt.badge.img+6
  • Contributor

I have a list containing 93 different WFS URLs, my goal is to be able to read these in one workbench without clutter and for the workflow to handle changes in the URLs for example, a new WFS is released and gets added to the list, I want it to work without having to change or add more to the workbench.

Im using FeatureReader to read the format OGC WFS (Web Feature Service) but it wont accept an attribute value as the Dataset, I mean I can put one in there put it does not know what to do with it. If I put the URL directly as the Dataset it knows exactly what to do and I can use the Feature Types to Read and select all an they end up as text separated by a space between each Feature Type. This theoretically means that I could just write a list of every Feature Type I need, use the Attribute Value as Dataset and get results. However, what I really need now is a way to get every Feature Type from the WFS List so that I can ad it in place of Feature Types to Read.

Dataset = Attribute Value
Feature Types to Read = Unknown
Dataset = WFS URL direct input
Feature Types to Read = all available for that WFS

 

Best answer by nielsgerrits

One way to do this is to use a FeatureReader (XML) to read the GetCapabilities and extract the Feature Type from the Feature Type List.

Elemenst to Match:

WFS_Capabilities/FeatureTypeList/FeatureType

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

9 replies

nielsgerrits
VIP
Forum|alt.badge.img+54
  • Best Answer
  • April 22, 2025

One way to do this is to use a FeatureReader (XML) to read the GetCapabilities and extract the Feature Type from the Feature Type List.

Elemenst to Match:

WFS_Capabilities/FeatureTypeList/FeatureType


crutledge
Enthusiast
Forum|alt.badge.img+32
  • Enthusiast
  • April 22, 2025

Hi ​@oskar Can you just cancel out of that and run the reader? 


oskar
Contributor
Forum|alt.badge.img+6
  • Author
  • Contributor
  • April 22, 2025
crutledge wrote:

Hi ​@oskar Can you just cancel out of that and run the reader? 

Do you mean to leave Feature Types to Read blank? 
That does not work, it won’t run.


oskar
Contributor
Forum|alt.badge.img+6
  • Author
  • Contributor
  • April 22, 2025
nielsgerrits wrote:

One way to do this is to use a FeatureReader (XML) to read the GetCapabilities and extract the Feature Type from the Feature Type List.

Elemenst to Match:

WFS_Capabilities/FeatureTypeList/FeatureType

I see that what you sent me is working fine, that’s great!
Where do you get “WFS_Capabilities/FeatureTypeList/FeatureType” ? I’m not sure mine has the same and I can’t seem to find a good way to find them. I think I’m looking for “fme_feature_type_name”


nielsgerrits
VIP
Forum|alt.badge.img+54

I first entered the complete url to dataset field the XML FeatureReader, went to Parameters… and clicked the “...” next to the Elements to Match field. I then selected the path in the tree. I then replaced the fixed url and replaced it with the concatenated url.

 

 


oskar
Contributor
Forum|alt.badge.img+6
  • Author
  • Contributor
  • April 24, 2025
nielsgerrits wrote:

I first entered the complete url to dataset field the XML FeatureReader, went to Parameters… and clicked the “...” next to the Elements to Match field. I then selected the path in the tree. I then replaced the fixed url and replaced it with the concatenated url.

 

 

I see, so that only works with that specific URL. The others that I tried have unique values or elements that I would need to check individually, defeating the purpose. Unable to do it dynamically.


nielsgerrits
VIP
Forum|alt.badge.img+54

Have not checked but I expect the getcapabilities to be equal over all services as it is a open standard?


oskar
Contributor
Forum|alt.badge.img+6
  • Author
  • Contributor
  • April 24, 2025
nielsgerrits wrote:

Have not checked but I expect the getcapabilities to be equal over all services as it is a open standard?

So from what I found, it works on some of them but most of them don’t have the same Elements to Match, meaning that I cant get the Features to Read from them.
But your way did help me get further than before! I’m grateful to you for that. I found that i needed to use the Attribute exposer to expose the keyword “Name” that holds the Feature to Read.

 


nielsgerrits
VIP
Forum|alt.badge.img+54
oskar wrote:
nielsgerrits wrote:

Have not checked but I expect the getcapabilities to be equal over all services as it is a open standard?

So from what I found, it works on some of them but most of them don’t have the same Elements to Match, meaning that I cant get the Features to Read from them.
But your way did help me get further than before! I’m grateful to you for that. I found that i needed to use the Attribute exposer to expose the keyword “Name” that holds the Feature to Read.

 

When you see this (exception) the url you tried to get to getcapabilities is probably incorrect. It should be

http://<server>/<path>?service=WFS&request=GetCapabilities


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