[GeoNetwork-users] CSW Getrecords

Hi,

I'm having some trouble with http request for Getrecords.

For example, the url for GetRecordByID is:
http://localhost:8080/geonetwork/srv/en/csw?SERVICE=CSW&VERSION=2.0.2&REQUEST=GetRecordById&ID=1ac0ce0a-85ed-4b0b-a466-ec91cac3e22c&outputSchema=csw:IsoRecord

What is the correct url for GetRecords and GetRecords by keyword with CSW?

Any help is appreciated.

KM
--
View this message in context: http://osgeo-org.1803224.n2.nabble.com/CSW-Getrecords-tp5694007p5694007.html
Sent from the GeoNetwork users mailing list archive at Nabble.com.

Hi KM,

You can use http get or http post for GetRecords request.

For example:

GET request (using CQL language):

Url:
http://localhost:8080/geonetwork/srv/en/csw?request=GetRecords&service=CSW&version=2.0.2&namespace=xmlns(csw%3Dhttp%3A%2F%2Fwww.opengis.net%2Fcat%2Fcsw%2F2.0.2)%2Cxmlns(gmd%3Dhttp%3A%2F%2Fwww.isotc211.org%2F2005%2Fgmd)&constraint=Keywords+like+%25africa%25&constraintLanguage=CQL_TEXT&constraint_language_version=1.1.0&typeNames=csw%3ARecord

POST request:

Url:
http://localhost:8080/geonetwork/srv/en/csw

Mime-type:
application/xml

Post data:
<?xml version="1.0" encoding="UTF-8"?>
<csw:GetRecords xmlns:csw="http://www.opengis.net/cat/csw/2.0.2&quot; service="CSW" version="2.0.2">
  <csw:Query typeNames="csw:Record">
    <csw:Constraint version="1.1.0">
      <Filter xmlns="http://www.opengis.net/ogc&quot; xmlns:gml="http://www.opengis.net/gml&quot;&gt;
        <PropertyIsLike wildCard="%" singleChar="_" escape="\\">
          <PropertyName>Keywords</PropertyName>
          <Literal>%africa%</Literal>
        </PropertyIsLike>
      </Filter>
    </csw:Constraint>
  </csw:Query>
</csw:GetRecords>

You can get help from official website:
http://geonetwork-opensource.org/stable/developers/xml_services/csw_services.html#getrecordbyid

Kai
Joint Center for Intelligent Spatial Computing
703-395-2337

----- Original Message -----
From: KM <haroku91@anonymised.com>
Date: Monday, November 1, 2010 11:04 am
Subject: [GeoNetwork-users] CSW Getrecords

Hi,

I'm having some trouble with http request for Getrecords.

For example, the url for GetRecordByID is:
http://localhost:8080/geonetwork/srv/en/csw?SERVICE=CSW&VERSION=2.0.2&REQUEST=GetRecordById&ID=1ac0ce0a-85ed-4b0b-a466-ec91cac3e22c&outputSchema=csw:IsoRecord

What is the correct url for GetRecords and GetRecords by keyword
with CSW?

Any help is appreciated.

KM
--
View this message in context: http://osgeo-
org.1803224.n2.nabble.com/CSW-Getrecords-tp5694007p5694007.html
Sent from the GeoNetwork users mailing list archive at Nabble.com.

--------------------------------------------------------------------
----------
Nokia and AT&T present the 2010 Calling All Innovators-North
America contest
Create new apps & games for the Nokia N8 for consumers in U.S. and
Canada$10 million total in prizes - $4M cash, 500 devices, nearly
$6M in marketing
Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi
Store
http://p.sf.net/sfu/nokia-dev2dev
_______________________________________________
GeoNetwork-users mailing list
GeoNetwork-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geonetwork-users
GeoNetwork OpenSource is maintained at
http://sourceforge.net/projects/geonetwork

Hi,

if you are using GeoNetwork 2.6 you may go to the menue "Administration" and
pick "CSW ISO Profile test". There you have examples for all of the
Requests. (Usually requesting csw does not work really via internetbrowser -
as far as I know.)

Maybe at first you should make a request "csw-GetRecords | SortBy title".
Then you chose an uuid from one of your records presented in the lower part
of the window. After that you make the "csw-GetRecordById"-request for that
uuid.

csw-GetRecordById is:

<?xml version="1.0"?>
<csw:GetRecordById xmlns:csw="http://www.opengis.net/cat/csw/2.0.2&quot;
service="CSW" version="2.0.2">
    <csw:Id>here-is-some-uuid-from-your-metadata</csw:Id>
</csw:GetRecordById>

Press the "Send request (POST)" button and in the lower part of the window
there is the answer to your request. Now the csw should show you the
metadata you have requested by UUID.

This is the way I do it. Maybe it works fine for you, as well...

Tara,
Anja

--
View this message in context: http://osgeo-org.1803224.n2.nabble.com/CSW-Getrecords-tp5694007p5694083.html
Sent from the GeoNetwork users mailing list archive at Nabble.com.

Thanks for the answers, I tried the GET request (using CQL language) URL and
I get the following errors:
Error during CQL to Filter conversion :
org.geotools.filter.text.cql2.CQLException: Lexical error at line 1, column
15. Encountered: "%" (37), after : "", Current Token : Keywords

Can someone provide me with a working link so I can test it out?

Thanks.
KM
--
View this message in context: http://osgeo-org.1803224.n2.nabble.com/CSW-Getrecords-tp5694007p5694753.html
Sent from the GeoNetwork users mailing list archive at Nabble.com.