[GeoNetwork-devel] GN v2.6.3 xml GetCapabilities errors [SEC=UNCLASSIFIED]

Hi All,

A contractor that has been working with integrating a metadata Java application with GeoNetwork has identified that there may be a problem with GN’s CWS transactions. Below is his transaction to identify the problem.

Has anyone else identified this issue?

Thanks.

John Hockaday
Spatial Standards Group (OSDM)
http://www.osdm.gov.au/

Ok…I’ve confirmed that GetCapabilities in GeoNetwork v2.6.3 xml request is broken.

I send:

<csw:GetCapabilities xmlns:csw=“http://www.opengis.net/cat/csw/2.0.2”>

<ows:AcceptVersions xmlns:ows=“http://www.opengis.net/ows”>

ows:Version2.0.2</ows:Version>

</ows:AcceptVersions>

<ows:AcceptFormats xmlns:ows=“http://www.opengis.net/ows”>

ows:OutputFormatapplication/xml</ows:OutputFormat>

</ows:AcceptFormats>

</csw:GetCapabilities>

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

With header:

2011/02/10 16:22:43:865 EST [DEBUG] headers - >> POST /geonetwork/srv/en/csw HTTP/1.1

2011/02/10 16:22:43:865 EST [DEBUG] headers - >> Accept: application/xml

2011/02/10 16:22:43:865 EST [DEBUG] headers - >> Content-Length: 376

2011/02/10 16:22:43:865 EST [DEBUG] headers - >> Content-Type: application/xml; charset=ISO-8859-1

2011/02/10 16:22:43:865 EST [DEBUG] headers - >> Host: localhost:8080

2011/02/10 16:22:43:881 EST [DEBUG] headers - >> Connection: Keep-Alive

2011/02/10 16:22:43:881 EST [DEBUG] headers - >> User-Agent: Apache-HttpClient/4.1 (java 1.5)

GN Output:

2011-02-10 16:22:43,881 INFO [jeeves.request] - ==========================================================

2011-02-10 16:22:43,881 INFO [jeeves.request] - HTML Request (from 127.0.0.1) : /geonetwork/srv/en/csw

2011-02-10 16:22:43,881 DEBUG [jeeves.request] - Method : POST

2011-02-10 16:22:43,881 DEBUG [jeeves.request] - Content type : application/xml; charset=ISO-8859-1

2011-02-10 16:22:43,881 DEBUG [jeeves.request] - Accept : : application/xml

2011-02-10 16:22:43,881 DEBUG [jeeves.request] - Session id is 1evrc7mzahrp

2011-02-10 16:22:43,881 INFO [jeeves.service] - Dispatching : csw

2011-02-10 16:22:43,881 DEBUG [jeeves.service] - → parameters are :

<csw:GetCapabilities xmlns:csw=“http://www.opengis.net/cat/csw/2.0.2”>

<ows:AcceptVersions xmlns:ows=“http://www.opengis.net/ows”>

ows:Version2.0.2</ows:Version>

</ows:AcceptVersions>

<ows:AcceptFormats xmlns:ows=“http://www.opengis.net/ows”>

ows:OutputFormatapplication/xml</ows:OutputFormat>

</ows:AcceptFormats>

</csw:GetCapabilities>

2011-02-10 16:22:43,881 INFO [jeeves.webapp.csw] - Received:

<csw:GetCapabilities xmlns:csw=“http://www.opengis.net/cat/csw/2.0.2”>

<ows:AcceptVersions xmlns:ows=“http://www.opengis.net/ows”>

ows:Version2.0.2</ows:Version>

</ows:AcceptVersions>

<ows:AcceptFormats xmlns:ows=“http://www.opengis.net/ows”>

ows:OutputFormatapplication/xml</ows:OutputFormat>

</ows:AcceptFormats>

</csw:GetCapabilities>

2011-02-10 16:22:43,881 INFO [jeeves.service] - → dispatching to output for : csw

2011-02-10 16:22:43,881 INFO [jeeves.service] - → writing xml for : csw

2011-02-10 16:22:43,881 DEBUG [jeeves.service] - Service xml is :

<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=“MissingParameterValue” locator=“service” />

</ows:ExceptionReport>

2011-02-10 16:22:43,881 INFO [jeeves.service] - → output ended for : csw

2011-02-10 16:22:43,881 INFO [jeeves.service] - → dispatch ended for : csw

Response I get:

2011/02/10 16:22:43:881 EST [DEBUG] headers - << HTTP/1.1 200 OK

2011/02/10 16:22:43:881 EST [DEBUG] headers - << Date: Thu, 10 Feb 2011 05:22:43 GMT

2011/02/10 16:22:43:881 EST [DEBUG] headers - << Content-Type: application/xml; charset=UTF-8

2011/02/10 16:22:43:881 EST [DEBUG] headers - << Pragma: no-cache

2011/02/10 16:22:43:881 EST [DEBUG] headers - << Cache-Control: no-cache

2011/02/10 16:22:43:881 EST [DEBUG] headers - << Expires: -1

2011/02/10 16:22:43:881 EST [DEBUG] headers - << Transfer-Encoding: chunked

2011/02/10 16:22:43:881 EST [DEBUG] headers - << Server: Jetty(6.1.14)

<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=“MissingParameterValue” locator=“service” />

</ows:ExceptionReport>

However, on the other hand, if I set change the heading of my request from GetCapabilities to Transaction, I get a transaction summary:

Log: <csw:Transaction xmlns:csw=“http://www.opengis.net/cat/csw/2.0.2”>

<ows:AcceptVersions xmlns:ows=“http://www.opengis.net/ows”>

ows:Version2.0.2</ows:Version>

</ows:AcceptVersions>

<ows:AcceptFormats xmlns:ows=“http://www.opengis.net/ows”>

ows:OutputFormatapplication/xml</ows:OutputFormat>

</ows:AcceptFormats>

</csw:Transaction>

2011/02/10 16:39:52:381 EST [DEBUG] SingleClientConnManager - Get connection for route HttpRoute[{}->http://localhost:8080]

2011/02/10 16:39:52:381 EST [DEBUG] DefaultClientConnectionOperator - Connecting to localhost/127.0.0.1:8080

2011/02/10 16:39:52:381 EST [DEBUG] RequestAddCookies - CookieSpec selected: best-match

2011/02/10 16:39:52:381 EST [DEBUG] RequestAddCookies - Cookie [version: 0][name: JSESSIONID][value: 1evrc7mzahrp][domain: localhost][path: /geonetwork][expiry: null] match [localhost:8080/geonetwork/srv/en/csw]

2011/02/10 16:39:52:381 EST [DEBUG] DefaultHttpClient - Attempt 1 to execute request

2011/02/10 16:39:52:381 EST [DEBUG] DefaultClientConnection - Sending request: POST /geonetwork/srv/en/csw HTTP/1.1

2011/02/10 16:39:52:381 EST [DEBUG] headers - >> POST /geonetwork/srv/en/csw HTTP/1.1

2011/02/10 16:39:52:381 EST [DEBUG] headers - >> Accept: application/xml

2011/02/10 16:39:52:381 EST [DEBUG] headers - >> Content-Length: 368

2011/02/10 16:39:52:381 EST [DEBUG] headers - >> Content-Type: application/xml; charset=ISO-8859-1

2011/02/10 16:39:52:381 EST [DEBUG] headers - >> Host: localhost:8080

2011/02/10 16:39:52:381 EST [DEBUG] headers - >> Connection: Keep-Alive

2011/02/10 16:39:52:381 EST [DEBUG] headers - >> User-Agent: Apache-HttpClient/4.1 (java 1.5)

2011/02/10 16:39:52:396 EST [DEBUG] headers - >> Cookie: JSESSIONID=1evrc7mzahrp

2011/02/10 16:39:52:396 EST [DEBUG] headers - >> Cookie2: $Version=1

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

2011/02/10 16:39:52:412 EST [DEBUG] DefaultClientConnection - Receiving response: HTTP/1.1 200 OK

2011/02/10 16:39:52:412 EST [DEBUG] headers - << HTTP/1.1 200 OK

2011/02/10 16:39:52:412 EST [DEBUG] headers - << Date: Thu, 10 Feb 2011 05:39:52 GMT

2011/02/10 16:39:52:412 EST [DEBUG] headers - << Content-Type: application/xml; charset=UTF-8

2011/02/10 16:39:52:412 EST [DEBUG] headers - << Pragma: no-cache

2011/02/10 16:39:52:412 EST [DEBUG] headers - << Cache-Control: no-cache

2011/02/10 16:39:52:412 EST [DEBUG] headers - << Expires: -1

2011/02/10 16:39:52:412 EST [DEBUG] headers - << Transfer-Encoding: chunked

2011/02/10 16:39:52:412 EST [DEBUG] headers - << Server: Jetty(6.1.14)

2011/02/10 16:39:52:412 EST [DEBUG] SingleClientConnManager - Releasing connection org.apache.http.impl.conn.SingleClientConnManager$ConnAdapter@anonymised.com

2011/02/10 16:39:52:412 EST [DEBUG] SingleClientConnManager - Released connection open but not reusable.

2011/02/10 16:39:52:412 EST [DEBUG] DefaultClientConnection - Connection shut down

Log: <csw:TransactionResponse xmlns:csw=“http://www.opengis.net/cat/csw/2.0.2”>

csw:TransactionSummary

csw:totalInserted0</csw:totalInserted>

csw:totalUpdated0</csw:totalUpdated>

csw:totalDeleted0</csw:totalDeleted>

</csw:TransactionSummary>

</csw:TransactionResponse>

GN Output:

2011-02-10 16:39:52,412 INFO [jeeves.request] - HTML Request (from 127.0.0.1) : /geonetwork/srv/en/csw

2011-02-10 16:39:52,412 DEBUG [jeeves.request] - Method : POST

2011-02-10 16:39:52,412 DEBUG [jeeves.request] - Content type : application/xml; charset=ISO-8859-1

2011-02-10 16:39:52,412 DEBUG [jeeves.request] - Accept : application/xml

2011-02-10 16:39:52,412 DEBUG [jeeves.request] - Session id is 1evrc7mzahrp

2011-02-10 16:39:52,412 INFO [jeeves.service] - Dispatching : csw

2011-02-10 16:39:52,412 DEBUG [jeeves.service] - → parameters are :

<csw:Transaction xmlns:csw=“http://www.opengis.net/cat/csw/2.0.2”>

<ows:AcceptVersions xmlns:ows=“http://www.opengis.net/ows”>

ows:Version2.0.2</ows:Version>

</ows:AcceptVersions>

<ows:AcceptFormats xmlns:ows=“http://www.opengis.net/ows”>

ows:OutputFormatapplication/xml</ows:OutputFormat>

</ows:AcceptFormats>

</csw:Transaction>

2011-02-10 16:39:52,412 INFO [jeeves.webapp.csw] - Received:

<csw:Transaction xmlns:csw=“http://www.opengis.net/cat/csw/2.0.2”>

<ows:AcceptVersions xmlns:ows=“http://www.opengis.net/ows”>

ows:Version2.0.2</ows:Version>

</ows:AcceptVersions>

<ows:AcceptFormats xmlns:ows=“http://www.opengis.net/ows”>

ows:OutputFormatapplication/xml</ows:OutputFormat>

</ows:AcceptFormats>

</csw:Transaction>

2011-02-10 16:39:52,412 INFO [jeeves.service] - → dispatching to output for : csw

2011-02-10 16:39:52,412 INFO [jeeves.service] - → writing xml for : csw

2011-02-10 16:39:52,412 DEBUG [jeeves.service] - Service xml is :

<csw:TransactionResponse xmlns:csw=“http://www.opengis.net/cat/csw/2.0.2”>

csw:TransactionSummary

csw:totalInserted0</csw:totalInserted>

csw:totalUpdated0</csw:totalUpdated>

csw:totalDeleted0</csw:totalDeleted>

</csw:TransactionSummary>

</csw:TransactionResponse>

2011-02-10 16:39:52,412 INFO [jeeves.service] - → output ended for : csw

2011-02-10 16:39:52,412 INFO [jeeves.service] - → dispatch ended for : csw

This suggests that it complains about the request parameter in the GetCapabilities request and not for the Transaction request while both requests are sent to the same service url and encoded the same way.

I am about to test the latest beta release but thought you could forward it to simon if it’s a bug worth fixing.

Best regards,

Nahid