Skip to main content
Question

xml via url

  • April 19, 2018
  • 5 replies
  • 56 views

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

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

5 replies

danilo_fme
Celebrity
Forum|alt.badge.img+51
  • Celebrity
  • 2077 replies
  • 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
  • 11 replies
  • April 19, 2018

this is what I do...


danilo_fme
Celebrity
Forum|alt.badge.img+51
  • Celebrity
  • 2077 replies
  • April 19, 2018

this is what I do...

OK. What is your FME version?

 

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

 

 


takashi
Celebrity
  • 7843 replies
  • 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
  • 11 replies
  • April 23, 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

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