Skip to main content
Question

xml via url


Forum|alt.badge.img

Hi,

I have an issue executing my workbench (It use to work before).

I have a list of url (returning OSM XML files) which I read with a FeatureReader tranformer.

I set the proxy parameters of my orgnization correctly (FME options), and it seems to work fine, until the execution fails (and never at the same stage), see the log below :

XML Parser error: 'Error in input dataset:'http://api.openstreetmap.org/api/0.6/map?bbox=7.1459,43.6763,7.159,43.6858' line:1 column:1 message:invalid document structure'

The XML Module halted on error, see the logfile for details

The XML reader has encountered an error.

A fatal error has occurred. Check the logfile above for details

The url is valid when I test it... Does anyone have any ideas to solve this problem ?

Thanks in advance,

Fabien

5 replies

danilo_fme
Evangelist
Forum|alt.badge.img+41
  • Evangelist
  • April 19, 2018

Hi @flaganne

Try to use the transformer FeatureReader to connect in url, but use the format to Read OpenStreetMap (OSM) XML:

And in Parameters you choose the elements / layers.

Thanks,

Danilo


Forum|alt.badge.img
  • Author
  • April 19, 2018

this is what I do...


danilo_fme
Evangelist
Forum|alt.badge.img+41
  • Evangelist
  • April 19, 2018
flaganne wrote:

this is what I do...

OK. What is your FME version?

 

Check the parameters in configuration Parameters ( icon red ) in your image.

 

 


takashi
Contributor
Forum|alt.badge.img+21
  • Contributor
  • April 22, 2018

Hi @flaganne, probably the commas within the parameter value have to be encoded with URL (percent) encoding rules, if you will download and read the OSM data directly with a FeatureReader (OSM reader). You can use the TextEncoder (Encoding Type: URL (Percent Encoding)) to encode the parameter value and then build the full URL including the parameter.

http://api.openstreetmap.org/api/0.6/map?bbox=7.1459%2C43.6763%2C7.159%2C43.6858

Alternatively, you can  use the HTTPCaller to download and save a dataset into a temporary location and then read it with the FeatureReader. I think this way is easier and also more flexible.

0684Q00000ArLc1QAF.png


Forum|alt.badge.img
  • Author
  • April 23, 2018
takashi wrote:

Hi @flaganne, probably the commas within the parameter value have to be encoded with URL (percent) encoding rules, if you will download and read the OSM data directly with a FeatureReader (OSM reader). You can use the TextEncoder (Encoding Type: URL (Percent Encoding)) to encode the parameter value and then build the full URL including the parameter.

http://api.openstreetmap.org/api/0.6/map?bbox=7.1459%2C43.6763%2C7.159%2C43.6858

Alternatively, you can  use the HTTPCaller to download and save a dataset into a temporary location and then read it with the FeatureReader. I think this way is easier and also more flexible.

0684Q00000ArLc1QAF.png

Hi  @takashi,

 

Thank you for your expertise. It did work building the url with "%2C" instead of comas and using the url directly as reader in the FeatureReader.

 

Thanks,

 

Fabien Laganne

 

 


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