Skip to main content

I'm using FeatureReader with following parameters:

Dataset: $(Source_WFS:)

Feature Types To Read – From Attribute: _FETURE_TYPES

$(Source_WFS:) is composed of some fixed URL address (below is an example one, not the real one I'm using) plus dynamically generated token by Python script in private parameter called Token which is:

import fmeobjects
import urllib
import urllib2
import json

username = FME_MacroValues>'Username']
password = FME_MacroValuesc'Password']
client = FME_MacroValuesE'Client']
expiration = FME_MacroValuesE'Expiration']
format = FME_MacroValuesF'Format']
url = 'https://www.example.com/tokengen/'
values = {'username': username, 'password': password, 'client': client, 'expiration': expiration, 'f': format}
data = urllib.urlencode(values)
request = urllib2.Request(url, data)
response = urllib2.urlopen(request).read()
jsonToken = json.loads(response)
return jsonTokenl'token']

This worklfow works perfecty in FME 2014, but in FME 2018 I get the error, when trying to load features to Output ports:

Failed to retrieve feature types. Received HTTP response header: 'HTTP/1.1 498 498' from 'https://www.example.com/MapServer/WFSServer?SERVICE=WFS&REQUEST=GetCapabilities&token=$(Token)&VERSION=1.1.0'

 

I suppose $(Token) value is not generated prior to reading WFS address. How can I bypass this issue in 2018?

0684Q00000ArEQIQA3.png

0684Q00000ArEeFQAV.png

What is the parameter type of "Source WFS:"? If it's not already the case, can you try to recreate it as a regular Text parameter.


It is set to Type: Text.


It is set to Type: Text.

Can you still try to recreate it? Ideally without including the ":" in the parameter name.


It is set to Type: Text.

Recreated $(Source_WFS), but still the same issue.


Recreated $(Source_WFS), but still the same issue.

That is really weird. I tried to recreate the issue in FME 2018.1 but it all worked as expected.

Are you able to post a minimal workspace here that lets ut reproduce the problem?


Also, try using a ParameterFetcher with a Logger to see what the actual value of the WFS URL parameter is when the workspace is running.


That is really weird. I tried to recreate the issue in FME 2018.1 but it all worked as expected.

Are you able to post a minimal workspace here that lets ut reproduce the problem?

Unfortunately I can't share this workspace. I'm using FME 2018.0.1.1. Maybe this could be an issue?


Unfortunately I can't share this workspace. I'm using FME 2018.0.1.1. Maybe this could be an issue?

You don't need to share the actual workspace. But if you could try to create a new, minimal workspace (Creator + FeatureReader would suffice) with a fictitious URL that you could post here, that would be helpful.


Unfortunately I can't share this workspace. I'm using FME 2018.0.1.1. Maybe this could be an issue?

Also, you could consider installing FME 2018.1 in a separate folder and try your workspace there as well.

Download: https://www.safe.com/support/support-resources/fme-downloads/archived/


Minimal workspace attached bellow. Hope it helps.

Workspace_WFS.fmw


Minimal workspace attached bellow. Hope it helps.

Workspace_WFS.fmw

Tested with both FME 2017.1 and 2018.1, but unable to reproduce the issue.

You may want to send your workspace to Safe support, complete with logs and a pointer to this thread.


It is set to Type: Text.

I agree that trying this with the latest FME 2018 release (1.2.1) would be a good start: https://www.safe.com/support/support-resources/fme-downloads/archived/


Tested with both FME 2017.1 and 2018.1, but unable to reproduce the issue.

You may want to send your workspace to Safe support, complete with logs and a pointer to this thread.

Unfortunately FME 2018.1.2 didn't solve the problem. I should send the workspace to Safe suport?


Unfortunately FME 2018.1.2 didn't solve the problem. I should send the workspace to Safe suport?

Hi @fikusas, yes please file a support ticket with us through this form. And reference this Forum thread in the case. Our team will help further investigate this issue.


Reply