This repository has been archived by the owner on Jan 21, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 71
Creation of second or third level pages in Wikis #1746
Comments
@SiriSch this is not a SocialSDK question, nor a notification mechanism. please use stackoverflow. http://stackoverflow.com/questions/tagged/ibm-connections to answer your question - refer to http://bastide.org/2014/05/06/creating-a-new-wiki-page-as-a-child/ |
Dear Paul, firstly I have to say thanks! I have tested this but without success. // Variables.baseURL is my URL
public static void createWikiChildPageTest(String wikiLabel, String parentUuid) throws ClientServicesException {
String serviceURL = Variables.baseURL + "/wikis/basic/api/wiki/" + wikiLabel + "/feed";
String content = "<entry xmlns=\"http://www.w3.org/2005/Atom\">" + "<category term=\"Test\" label=\"Test\"></category>"
+ "<category term=\"page\" label=\"page\" scheme=\"tag:ibm.com,2006:td/type\"></category>"
+ "<parentUuid xmlns=\"urn:ibm.com/td\">$PARENTUUID</parentUuid>" + "<title>Tes4</title>" + "<summary></summary>"
+ "<label xmlns=\"urn:ibm.com/td\">Tes4</label>"
+ "<content type=\"text/html\"><?xml version=\"1.0\" encoding=\"UTF-8\"?><!DOCTYPE html [<!ENTITY amp \"&#38;\"><!ENTITY lt \"<#60;\"><!ENTITY gt \">#62;\"><!ENTITY nbsp \" \"><!ENTITY apos \"'\"><!ENTITY quot \""\">]><div></div></content></entry>";
content = content.replace( "$PARENTUUID", parentUuid );
Variables.anActivityService.createData( serviceURL, null, content );
} Calling: createWikiChildPageTest( "STAW003%20-%20Blue_standalonewiki", "be154b1d-c685-47e5-b8ff-b63b4f6e25d2" ); Error:
com.ibm.sbt.services.client.ClientServicesException: Request to url https://OURHOST.COM/wikis/basic/api/wiki/STAW003%20-%20Blue_standalonewiki/feed returned an error response 400:Bad Request HTTP/1.1 400 Bad Request [Date: Mon, 14 Dec 2015 10:34:24 GMT, X-Frame-Options: SAMEORIGIN, Strict-Transport-Security: max-age=max-age=31536000;includeSubDomains, X-XSS-Protection: 1;mode=block, X-Permitted-Cross-Domain-Policies: master-only, X-Powered-By: Servlet/3.0, X-LConn-Auth: false, X-UA-Compatible: IE=9,8, X-Update-Nonce: 10c0f1b2-abfc-4ac6-bb36-8a4d798a7939, Cache-Control: no-cache,must-revalidate,private,max-age=0, Set-Cookie: LtpaToken=UBqbMhDmRzgZDSBIi+om7+9QxmMrseGs8LMCqdBfLf6rmf+/HGLXLea6N/T9h3KnFmju1MUHcnzKoqsbGZ84w8gZiP/Bqg6jYH8vEtfOIWQLib5dhsLgtnRWRFWleoct9bbX/W5WKBtCEKqmapz7eTcmGKbqPiRcUv85+B7p0QIygLDtSsF2itj+Z0TDMSrqmly4afRDh47Z1/Vy2Murlcn9BD7g5uwNUq4/rzmb1xsDnynNLY9WMX9vKd+EGCISobVqsnlkYOBv0+kbTga4ByNgAsZ9zhFD4eWtqgP2n+qijHcykFEF/CCrtgxv9BwIPnF+Ar8a8GnTyB+6H2d0soOm2BPLxnGM; Path=/, Set-Cookie: LtpaToken2=AUIdxeONeYV4CU5lnaqi8Jt80/I0TNU5dFY4ZklNRTX9KDy8fcCkdrukMRgUEAisT7o7mODqrzFIAAv8eVRBVmBpvftaOKSljUHQSHnbeuzGjtf3opxIEP3OHhw+cWP1pu0HcXmrtp2JV8w2VJJx0R8Bpf4v7G4Xkc7rJWso8TJFjNohjt38m7GaqqY6zPFfFiJYnB7FExHMhufSkZmP7AD2lS2r8dQ1TN+9v7gM9pHq+LxVh0pyir8aB+IadKabuU/MUOKDcDM5kU5hTEu+Ro+51Uz2zysDCaWIygZc+Eb7yRPf1tblX0qNHr/iFHPZdWVOaz6XMPXLpVkorvvtJOvqGbKXTK7M5Jkl/YSyqyCC7fPQPEloynbVuIvEgUMDNCQwXBvz1i4XFf6sqMsTrtkJlhPBMH/wpkNLTi9JQhQwVuAbtsNJwCNQPF0RXu26PctlNcszXvQGUUNUul7mdBbno8g6uh7XYrbZCobxewjA7NuM2WmmxSDX3hVcZCzzL2ra2Xo22jXxMEWWFn/uVnVNTj2lDyPm9796x/XQX3Kv2V5Hx2Fo41m89D0FXgls1emtEpMf/km7gQqbgRMH/7IxKwGP2/wgZrtnLDXnlC7tvhMxzzCJ6Sn06r2OzFER/OFzzVMkhscTKzhxc0GhLHDUrOm4K1lilvDD8SpheGN7a31XjoqdFI7CKeB+Dy6B; Path=/, Set-Cookie: connect=de_de; Path=/; Domain=.OurHOST.com., Set-Cookie: JSESSIONID=0000PNfjJUNwi0yf0JPjsQECrar:19aro79o6; Path=/; HttpOnly, Expires: Thu, 01 Dec 1994 16:00:00 GMT, Content-Length: 476, Vary: Accept-Encoding,User-Agent, Connection: close, Content-Type: application/xml; charset=UTF-8, Content-Language: de-DE] Can you see any mistakes in my code? I am looking forward to hearing from you! Best regards, Siri |
You need to log your output and test your call with a Browser based REST Client. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Hey Paul,
I do know how to create a WikiPage within a Wiki, but what do I have to use if I want to create a subpage of a Wikientry within a Community Wiki?
For instance I have got a community namely "Hello World" and I have created a Wikitopic
namely "Test".
Within this "Test" I would like to create a subpage named "SubTest" and in this page
I would like to create another subpage named "SubSubTest".
What do I have to do to reach that? I couldn't find any information about subpages in Wikis.
Best regards,
Siri
The text was updated successfully, but these errors were encountered: