Bonjour,
je fais des requêtes OLS qui ne font pas toujours la même réponse.
par exemple :
Code XML : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18 <?xml version="1.0" encoding="UTF-8"?> <XLS xmlns:xls="http://www.opengis.net/xls" xmlns:gml="http://www.opengis.net/gml" xmlns="http://www.opengis.net/xls" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.2" xsi:schemaLocation="http://www.opengis.net/xls http://schemas.opengis.net/ols/1.2/olsAll.xsd"> <RequestHeader/> <Request requestID="1" version="1.2" maximumResponses="1" methodName="LocationUtilityService"> <GeocodeRequest returnFreeForm="false"> <Address countryCode="StreetAddress"> <freeFormAddress>RUEIL-MALMAISON</freeFormAddress> <Place type="Departement">92</Place> </Address> </GeocodeRequest> </Request> </XLS>
renvoie la bonne réponse :
Code XML : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33 <?xml version="1.0" encoding="UTF-8"?> <XLS version="1.2" xmlns="http://www.opengis.net/xls" xmlns:gml="http://www.opengis.net/gml" xmlns:xls="http://www.opengis.net/xls" xmlns:xlsext="http://www.opengis.net/xlsext" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://wxs.ign.fr/schemas/olsAll.xsd"> <ResponseHeader/> <Response requestID="1" version="1.2"> <GeocodeResponse> <GeocodeResponseList numberOfGeocodedAddresses="1"> <GeocodedAddress> <gml:Point> <gml:pos>48.882770 2.176948</gml:pos> </gml:Point> <Address countryCode="StreetAddress"> <StreetAddress> <Street/> </StreetAddress> <Place type="Municipality">Rueil-Malmaison</Place> <Place type="Territoire">FXX</Place> <Place type="Qualite">30.0</Place> <Place type="Bbox">2.148015;48.847639;2.213212;48.895815</Place> <Place type="INSEE">92063</Place> <Place type="Departement">92</Place> <Place type="Commune">Rueil-Malmaison</Place> <PostalCode>92500</PostalCode> </Address> <GeocodeMatchCode accuracy="1.0" matchType="City"/> </GeocodedAddress> </GeocodeResponseList> </GeocodeResponse> </Response> </XLS>
ou renvoie la mauvaise réponse :
Code XML : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13 <?xml version="1.0" encoding="UTF-8"?> <XLS version="1.2" xmlns="http://www.opengis.net/xls" xmlns:gml="http://www.opengis.net/gml" xmlns:xls="http://www.opengis.net/xls" xmlns:xlsext="http://www.opengis.net/xlsext" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://wxs.ign.fr/schemas/olsAll.xsd"> <ResponseHeader/> <Response requestID="1" version="1.2"> <GeocodeResponse> <GeocodeResponseList numberOfGeocodedAddresses="0"/> </GeocodeResponse> </Response> </XLS>
Est-ce que le fait de toujours utiliser requestID="1" peut poser problème ? Faudrait-il le modifier à chaque requête ?
Partager