On 10/01/2010 12:33 PM, Volker Lapczynski wrote:
Hi Fabio!
Thanks for reply.
I am still working with the "creating TAG" problem. I am able to create a
page and upload a file.
I am not able to make a TAG with your code. I am editing the files with
notepad in windows with UTF-8.
Working with norwegian Windows XP, Autohotkey with unicode support and curl
for windows.
I tried:
page = test-page222 ;
; ---make a page--- working with umlaut ;)
curl.exe -u "Admin:admin" -X PUT -d "@C:\file.xml" -H
"Content-Type:
application/xml"
http://localhost:8080/xwiki/rest/wikis/xwiki/spaces/Main/pages/%page% ;
; --- upload a file --- working with umlaut ;)
curl.exe -u "Admin:admin" -T "C:\image.jpg"
http://localhost:8080/xwiki/rest/wikis/xwiki/spaces/Main/pages/%page%/attac…
;
; --- create a TAG--- NOT WORKING !
curl.exe -u "Admin:admin" -X POST -H "Content-type:
application/x-www-form-urlencoded" --data-ascii
"className=TagClass&property#tags=foo,bar"
http://localhost:8080/xwiki/rest/wikis/xwiki/spaces/Main/pages/%page%/objec…
;
; --- create a TAG--- WORKING but only without UMLAUT/Unicode/UTF-8
;RunWait ..\bin\curl\curl.exe --trace-ascii "trace-tagggg.txt" -u
"Admin:admin" -X POST --d
"className=XWiki.TagClass&property#tags=%page%|test1|test2"
http://localhost:8080/xwiki/rest/wikis/xwiki/spaces/Main/pages/%page%/objec…
What is wrong with my code?
Regards Volker
Apparently nothing.
When you see "NOT WORKING" what is exactly not working?
A "500 - Server rerror" reply? Tags not created correctly (i.e., with
invalid characters) ?
The second call to curl is functionally equivalent to the first (finally
the -d parameter sends data as "application/x-www-form-urlencoded") so I
really don't understand why the first is not working and the second one is.
If you provide more information (e.g., the trace-tagggg.txt file) maybe
I can help you better.
-Fabio