bonjour,
des idées sur la question ?
merci d'avance de votre aide.
cordialement,
I. Mallet
rebonjour,
je ne réussis pas à procéder à une mise à jour de métadonnées avec
requête csw:Update
la réponse est systématiquement la suivante :
<?xml version="1.0" encoding="UTF-8"?>
<ows:ExceptionReport xmlns:ows="http://www.opengis.net/ows"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
version="1.0.0" xsi:schemaLocation="http://www.opengis.net/ows
http://schemas.opengis.net/ows/1.0.0/owsExceptionReport.xsd">
<ows:Exception exceptionCode="NoApplicableCode">
<ows:ExceptionText>Cannot process transaction:
null</ows:ExceptionText>
</ows:Exception>
</ows:ExceptionReport>
nous utilisons la version Géosource 2.7.1.0
et je procéde de la manière suivante :
1) requete csw:GetRecordById avec l'uuid de la métadonnée à mettre à
jour
2) je recupere l'enregistrement XML complet <gmd:MD_Metadata>...
</gmd:MD_Metadata>
3) modification des valeurs à mettre à jour dans l'enregistrement XML
<gmd:MD_Metadata>
4) login avec xml.user.login => réponse = OK
4) requete csw:Update avec l'enregistrement XML complet
<gmd:MD_Metadata> ... </gmd:MD_Metadata>
et la contrainte
<csw:Constraint version="1.1.0">
<ogc:Filter>
<ogc:PropertyIsEqualTo>
<ogc:PropertyName>Identifier</ogc:PropertyName>
<ogc:Literal>valeur_uuid</ogc:Literal>
</ogc:PropertyIsEqualTo>
</ogc:Filter>
</csw:Constraint>
voir ci-dessous un exemple de requête <csw:Update> envoyée (POST) au
service /geosource/srv/fre/csw
<?xml version="1.0" encoding="UTF-8"?>
<csw:Transaction service="CSW" version="2.0.2"
xmlns:csw="http://www.opengis.net/cat/csw/2.0.2"
xmlns:ogc="http://www.opengis.net/ogc"
xmlns:apiso="http://www.opengis.net/cat/csw/apiso/1.0">
<csw:Update>
<gmd:MD_Metadata xmlns:gmd="http://www.isotc211.org/2005/gmd"
xmlns:gts="http://www.isotc211.org/2005/gts"
xmlns:gmx="http://www.isotc211.org/2005/gmx"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:fra="http://www.cnig.gouv.fr/2005/fra"
xmlns:gco="http://www.isotc211.org/2005/gco"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:gml="http://www.opengis.net/gml"
xmlns:geonet="http://www.fao.org/geonetwork">
<gmd:fileIdentifier>
<gco:CharacterString>d54ac67d-9cde-43d9-84f7-187cd5e643cd</gco:CharacterString>
</gmd:fileIdentifier>
<gmd:language>
<gmd:LanguageCode codeList=""
codeListValue="fre"></gmd:LanguageCode>
</gmd:language>
<gmd:characterSet>
<gmd:MD_CharacterSetCode codeListValue="utf8"
codeList="MD_CharacterSetCode"></gmd:MD_CharacterSetCode>
</gmd:characterSet>
<gmd:hierarchyLevel>
<gmd:MD_ScopeCode codeListValue="dataset"
codeList="http://www.isotc211.org/2005/resources/codeList.xml#MD_ScopeCode"></gmd:MD\_ScopeCode
( 'http://www.isotc211.org/2005/resources/codeList.xml#MD_ScopeCode" )>
</gmd:hierarchyLevel>
<gmd:hierarchyLevelName>
<gco:CharacterString>Précision sur le niveau de hiérarchie (non
INSPIRE)</gco:CharacterString>
</gmd:hierarchyLevelName>
<gmd:dateStamp>
<gco:DateTime>2013-06-06T11:19:57</gco:DateTime>
</gmd:dateStamp>
<gmd:metadataStandardName>
<gco:CharacterString>ISO 19115:2003/19139</gco:CharacterString>
</gmd:metadataStandardName>
<gmd:metadataStandardVersion>
<gco:CharacterString>1.0</gco:CharacterString>
</gmd:metadataStandardVersion>
<gmd:identificationInfo>
<gmd:MD_DataIdentification
namespace="http://www.isotc211.org/2005/gmd">
<gmd:citation>
<gmd:CI_Citation>
<gmd:title>
<gco:CharacterString>Chantier
perturbant</gco:CharacterString>
</gmd:title>
<gmd:identifier>
<gmd:MD_Identifier>
<gmd:code>
<gco:CharacterString>FRE-246900245-PVOCHANTIERPERTURBANT</gco:CharacterString>
</gmd:code>
</gmd:MD_Identifier>
</gmd:identifier>
</gmd:CI_Citation>
</gmd:citation>
<gmd:abstract>
<gco:CharacterString>Le chantier perturbant est un objet
surfacique décrivant une emprise temporaire de chantier perturbant la
circulation. Il porte des informations descriptives : dates, type de
perturbation, intervenant, ...</gco:CharacterString>
</gmd:abstract>
<gmd:pointOfContact>
<gmd:CI_ResponsibleParty>
<gmd:individualName>
<gco:CharacterString>Qualité MOI Pôle
Géomatique</gco:CharacterString>
</gmd:individualName>
<gmd:organisationName>
<gco:CharacterString>GRAND LYON (DV) Direction de la
voirie</gco:CharacterString>
</gmd:organisationName>
<gmd:contactInfo>
<gmd:CI_Contact>
<gmd:phone>
<gmd:CI_Telephone>
<gmd:voice>
<gco:CharacterString>+33
478957008</gco:CharacterString>
</gmd:voice>
<gmd:facsimile>
<gco:CharacterString>+33
426993023</gco:CharacterString>
</gmd:facsimile>
</gmd:CI_Telephone>
</gmd:phone>
<gmd:address>
<gmd:CI_Address>
<gmd:deliveryPoint>
<gco:CharacterString>83 cours de la
Liberté</gco:CharacterString>
</gmd:deliveryPoint>
<gmd:city>
<gco:CharacterString>LYON</gco:CharacterString>
</gmd:city>
<gmd:postalCode>
<gco:CharacterString>69003</gco:CharacterString>
</gmd:postalCode>
<gmd:country>
<gco:CharacterString>FRANCE</gco:CharacterString>
</gmd:country>
<gmd:electronicMailAddress>
<gco:CharacterString>geomatique-voirie@anonymised.com</gco:CharacterString>
</gmd:electronicMailAddress>
</gmd:CI_Address>
</gmd:address>
</gmd:CI_Contact>
</gmd:contactInfo>
<gmd:role>
<gmd:CI_RoleCode
codeList="./resources/codeList.xml#CI_RoleCode"
codeListValue="custodian"></gmd:CI_RoleCode>
</gmd:role>
</gmd:CI_ResponsibleParty>
</gmd:pointOfContact>
<gmd:graphicOverview
xmlns:srv="http://www.isotc211.org/2005/srv">
<gmd:MD_BrowseGraphic>
<gmd:fileName>
<gco:CharacterString>PVO_chantier_perturbant.png</gco:CharacterString>
</gmd:fileName>
</gmd:MD_BrowseGraphic>
</gmd:graphicOverview>
<gmd:descriptiveKeywords>
<gmd:MD_Keywords>
<gmd:keyword>
<gco:CharacterString>Réseaux de
transport</gco:CharacterString>
</gmd:keyword>
<gmd:type>
<gmd:MD_KeywordTypeCode
codeList="http://www.isotc211.org/2005/resources/codeList.xml#MD_KeywordTypeCode"
codeListValue="theme"></gmd:MD_KeywordTypeCode>
</gmd:type>
<gmd:thesaurusName>
<gmd:CI_Citation>
<gmd:title>
<gco:CharacterString>GEMET - INSPIRE themes, version
1.0</gco:CharacterString>
</gmd:title>
</gmd:CI_Citation>
</gmd:thesaurusName>
</gmd:MD_Keywords>
</gmd:descriptiveKeywords>
<gmd:resourceConstraints>
<gmd:MD_LegalConstraints></gmd:MD_LegalConstraints>
</gmd:resourceConstraints>
<gmd:resourceConstraints>
<gmd:MD_Constraints>
<gmd:useLimitation>
<gco:CharacterString>Pas de restriction d'accès
public</gco:CharacterString>
</gmd:useLimitation>
</gmd:MD_Constraints>
</gmd:resourceConstraints>
<gmd:spatialRepresentationType>
<gmd:MD_SpatialRepresentationTypeCode
codeList="http://www.isotc211.org/2005/resources/codeList.xml#MD_SpatialRepresentationTypeCode"
codeListValue="vector"></gmd:MD_SpatialRepresentationTypeCode>
</gmd:spatialRepresentationType>
<gmd:spatialResolution>
<gmd:MD_Resolution>
<gmd:distance>
<gco:Distance uom="m">10</gco:Distance>
</gmd:distance>
</gmd:MD_Resolution>
</gmd:spatialResolution>
<gmd:spatialResolution>
<gmd:MD_Resolution>
<gmd:equivalentScale>
<gmd:MD_RepresentativeFraction>
<gmd:denominator>
<gco:Integer>5000</gco:Integer>
</gmd:denominator>
</gmd:MD_RepresentativeFraction>
</gmd:equivalentScale>
</gmd:MD_Resolution>
</gmd:spatialResolution>
<gmd:language>
<gco:CharacterString>fre</gco:CharacterString>
</gmd:language>
<gmd:characterSet>
<gmd:MD_CharacterSetCode
codeList="http://www.isotc211.org/2005/resources/codeList.xml#MD_CharacterSetCode"
codeListValue="utf8"></gmd:MD_CharacterSetCode>
</gmd:characterSet>
<gmd:topicCategory>
<gmd:MD_TopicCategoryCode>transportation</gmd:MD_TopicCategoryCode>
</gmd:topicCategory>
<gmd:topicCategory>
<gmd:MD_TopicCategoryCode>planningCadastre</gmd:MD_TopicCategoryCode>
</gmd:topicCategory>
<gmd:extent>
<gmd:EX_Extent>
<gmd:geographicElement>
<gmd:EX_GeographicBoundingBox>
<gmd:westBoundLongitude>
<gco:Decimal>4.6810</gco:Decimal>
</gmd:westBoundLongitude>
<gmd:southBoundLatitude>
<gco:Decimal>45.5500</gco:Decimal>
</gmd:southBoundLatitude>
<gmd:eastBoundLongitude>
<gco:Decimal>5.0670</gco:Decimal>
</gmd:eastBoundLongitude>
<gmd:northBoundLatitude>
<gco:Decimal>45.9170</gco:Decimal>
</gmd:northBoundLatitude>
</gmd:EX_GeographicBoundingBox>
</gmd:geographicElement>
</gmd:EX_Extent>
</gmd:extent>
</gmd:MD_DataIdentification>
</gmd:identificationInfo>
<gmd:distributionInfo>
<gmd:MD_Distribution>
<gmd:distributionFormat>
<gmd:MD_Format>
<gmd:name gco:nilReason="missing">
<gco:CharacterString></gco:CharacterString>
</gmd:name>
<gmd:version gco:nilReason="missing">
<gco:CharacterString></gco:CharacterString>
</gmd:version>
</gmd:MD_Format>
</gmd:distributionFormat>
<gmd:transferOptions>
<gmd:MD_DigitalTransferOptions>
<gmd:onLine>
<gmd:CI_OnlineResource>
<gmd:linkage>
<gmd:URL>jdbc:postgresql://46.105.245.178:5432/grandlyon:xxxxxx@anonymised.com</gmd:URL>
</gmd:linkage>
</gmd:CI_OnlineResource>
</gmd:onLine>
<gmd:onLine>
<gmd:CI_OnlineResource>
<gmd:linkage>
<gmd:URL>http://46.105.245.177/maps/gdlyon</gmd:URL>
</gmd:linkage>
</gmd:CI_OnlineResource>
</gmd:onLine>
<gmd:onLine>
<gmd:CI_OnlineResource>
<gmd:linkage>
<gmd:URL>http://46.105.245.177/maps/gdlyon</gmd:URL>
</gmd:linkage>
</gmd:CI_OnlineResource>
</gmd:onLine>
<gmd:onLine>
<gmd:CI_OnlineResource>
<gmd:linkage>
<gmd:URL>http://ogc.data.grandlyon.com/gdlyon?SERVICE=WFS&REQUEST=GetFeature&typename=pvo_patrimoine_voirie.pvochantierperturbant&outputformat=SHAPEZIP&VERSION=1.1.0&SRSNAME=EPSG:3946</gmd:URL>
</gmd:linkage>
</gmd:CI_OnlineResource>
</gmd:onLine>
<gmd:onLine>
<gmd:CI_OnlineResource>
<gmd:linkage>
<gmd:URL>http://ws.data.grandlyon.com/pvo_patrimoine_voirie.pvochantierperturbant.json</gmd:URL>
</gmd:linkage>
</gmd:CI_OnlineResource>
</gmd:onLine>
<gmd:onLine>
<gmd:CI_OnlineResource>
<gmd:linkage>
<gmd:URL>http://opendata.data.grandlyon.com/Licence_ODbL_Grand_Lyon.pdf</gmd:URL>
</gmd:linkage>
</gmd:CI_OnlineResource>
</gmd:onLine>
</gmd:MD_DigitalTransferOptions>
</gmd:transferOptions>
</gmd:MD_Distribution>
</gmd:distributionInfo>
<gmd:dataQualityInfo>
<gmd:DQ_DataQuality>
<gmd:lineage>
<gmd:LI_Lineage>
<gmd:statement>
<gco:CharacterString>Mise à jour en continu : remontée
d'informations travaux des services du Grand Lyon et des partenaires et
vérification de la donnée sur le terrain.</gco:CharacterString>
</gmd:statement>
</gmd:LI_Lineage>
</gmd:lineage>
</gmd:DQ_DataQuality>
</gmd:dataQualityInfo>
</gmd:MD_Metadata>
<csw:Constraint version="1.1.0">
<ogc:Filter>
<ogc:PropertyIsEqualTo>
<ogc:PropertyName>Identifier</ogc:PropertyName>
<ogc:Literal>d54ac67d-9cde-43d9-84f7-187cd5e643cd</ogc:Literal>
</ogc:PropertyIsEqualTo>
</ogc:Filter>
</csw:Constraint>
</csw:Update>
</csw:Transaction>
merci d'avance de votre aide
I. Mallet
Francois Prunayre <fx.prunayre@anonymised.com> 04/06/13 07:20 >>>
Bonjour,
Le 3 juin 2013 20:31, Isabelle MALLET <IMALLET@anonymised.com> a écrit
:
bonjour,
nous utilisons la version geosource 2.7.1
j'ai besoin de mettre en place un traitement batch qui met à jour
une
métadonnée (datestamp) chaque fois que la donnée correspondante est
mise à jourje récupère les id des MD à mettre à jour par une requête HTTP du
genre
http://<serveur>/geosource/srv/fr/xml.search? + paramètres
et/ou
http://<serveur>/geosource/srv/fr/xml.metadata.get? + paramètreset je pensais pouvoir mettre à jour simplement les MD en appelant un
service du genre xml.metadata.update + paramètres
(cf : manuel Développeur Geonetwork 2.8)mais le manuel Développeur de geonetwork 2.6 n'est plus accessible
en
ligne et j'ai l'impression que ce service n'est pas implémenté dans
geonetwork 2.6 ?
- existe-t'il dans Geosource 2.7.1 un service de type "update
metadata"
accessible par requête HTTP ?
- si oui où puis-je trouver la documentation ?dans le manuel Développeur Geonetwork 2.8, le service
xml.metadata.update indique qu'une authentification est nécessaire
- est-il possible de passer les paramètres d'authentification dans
l'url d'appel au service update ?
- ou bien faut-il appeler auparavant le service xml.user.login ?
J'opterai sans doute pour une transaction via le CSW avec un XPath qui
sera dans ce cas sans doute plus simple que les services de mise à
jour.
cf. http://localhost:8080/geonetwork/srv/fre/test.csw
Pour se connecter, vous pouvez reproduire ce que fait la page test.csw
(via xml.user.login) et conserver la session pour les requêtes
suivantes. En version 2.9 et +, l'authentification basique est
supportée.
Salutations.
Francois
merci d'avance de votre aide
cordialement,
I. Mallet------------------------------------------------------------
Isabelle MALLET
Communauté Urbaine de LYON
DSIT / Service Informatique
20 Rue du Lac - BP 3103 - 69399 LYON Cedex 03
Tél : 04 26 99 38 62
Fax : 04 26 99 38 11
Email : imallet@anonymised.com
------------------------------------------------------------------------------
How ServiceNow helps IT people transform IT departments:
1. A cloud service to automate IT design, transition and operations
2. Dashboards that offer high-level views of enterprise services
3. A single system of record for all IT processes
http://p.sf.net/sfu/servicenow-d2d-j
_______________________________________________
GeoNetwork-users-fr mailing list
GeoNetwork-users-fr@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geonetwork-users-fr