Question

xml via url

  • 19 April 2018
  • 5 replies
  • 14 views

Badge

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

Userlevel 4
Badge +30

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

Badge

this is what I do...

Userlevel 4
Badge +30

this is what I do...

OK. What is your FME version?

 

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

 

 

Userlevel 2
Badge +17

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

Badge

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