Hi,
I've used curl command,
curl -u admin -X POST -H 'Mime-type: application/xml' -T '/home/j/test.xml'
http://localhost:8081/geonetwork/srv/en/metadata.insert
But it gave the error message of
You may not have the privileges to do this operation
ServiceNotAllowedEx : Service not allowed
It would be really appreciated if anyone explains the solution to this
problem.
admin is administrator and test.xml looks like,
<?xml version="1.0" encoding="UTF-8"?>
<request>
<group>Sample group</group>
<category>_none_</category>
<styleSheet>_none_</styleSheet>
<data>
</data>
</request>
--
View this message in context: http://osgeo-org.1803224.n2.nabble.com/metadata-insert-error-tp6303364p6303364.html
Sent from the GeoNetwork users mailing list archive at Nabble.com.
Hi,
curl -u admin -X POST -H 'Mime-type: application/xml' -T '/home/j/test.xml'
http://localhost:8081/geonetwork/srv/en/metadata.insert
The -u option of curl allows to provide HTTP basic authentication mechanisms
; geonetwork would not be able to handle this. You may have to hit another
service ( xml.user.login, taking username and password as argument), then
save the cookie, and reuse it on the metadata.insert webservice. I'm not a
CURL expert, but I'm sure there are some options to save the cookie, and
reuse it after successful authentication on the desired service.
Hth,
--
Pierre Mauduit
Camptocamp France SAS
Savoie Technolac, BP 352
73377 Le Bourget du Lac Cedex
Tel : + 33 (0)4 79 44 44 92
http://www.camptocamp.com
pierre.mauduit@anonymised.com
Hi,
I really appreciate for your reply.
As your advice, I've tried xml.user.login like below,
curl -v -XPOST -H 'Mime-type: application/xml' -T '/home/j/user.xml'
http://localhost:8081/geonetwork/srv/en/xml.user.login
my user.xml looks like
<?xml version="1.0" encoding="UTF-8"?>
<request>
<username>admin</username>
<password>password</password>
</request>
But I got the error message like below.
"The requested operation could not be performed
MissingParameterEx : username"
As you can see in my user.xml, there is a username.
Also, the verbose message of curl showed that
< HTTP/1.1 100 Continue
< HTTP/1.1 500 Internal Server Error
< Server: Apache-Coyote/1.1
< Set-Cookie: JSESSIONID=5FBFA5D210A509D3844F1EAAADA7FA68; Path=/geonetwork
< Pragma: no-cache
< Cache-Control: no-cache
< Expires: -1
< Content-Type: text/html;charset=UTF-8
< Transfer-Encoding: chunked
< Date: Mon, 25 Apr 2011 19:57:58 GMT
< Connection: close
It would be appreciated if you let me know any reason/solution regarding to
this matter.
--
View this message in context: http://osgeo-org.1803224.n2.nabble.com/metadata-insert-error-tp6303364p6303785.html
Sent from the GeoNetwork users mailing list archive at Nabble.com.
Hi,
curl -v -XPOST -H 'Mime-type: application/xml' -T '/home/j/user.xml'
http://localhost:8081/geonetwork/srv/en/xml.user.login
As far as I remember, Jeeves (the framework used within GeoNetwork) does
handle GET and POST parameters differently. try to use
http://…/xml.user.login?username=blah&password=blah
instead (or find the option to use a GET instead of a POST query with curl).
Cheers,
--
Pierre