Re: [xwiki-users] Translations cannot be fetched using XML/RPC interface

2009-03-19 Thread Ari Oinas
Hi,

And thanks for your efforts regarding this issue. I found the problem which
caused my translations not to work.

I used getPage -method to get page details. Which returned translations ok.
But after that, I used renderContent method without defining content, which
resulted that function returning default language content. After I added
content to method call, translated content is returned.
So it was my fault, not Xwiki's. sorry :)

Still, some things to consider:

- should renderContent function also handle pageId so that language could be
embedded in the end of pageId? Same way as getPage handles pageId.

- getPages function returns PageSummaries with default language pageTitles.
It would be convenient to call this function with language id, so that
pagetitles would be in correct language. Now I have to loop through every
pagesummary and get page title to get correct pageTitles to show on
navigation tree.

Thanks for superb customer support!

Best regards,

Ari




-Original Message-
From: users-boun...@xwiki.org [mailto:users-boun...@xwiki.org] On Behalf Of
Florin Ciubotaru
Sent: 18. maaliskuuta 2009 14:47
To: XWiki Users
Subject: Re: [xwiki-users] Translations cannot be fetched using XML/RPC
interface

Hi,

I recreated your scenario an published a basic XmlRpc proxy on this page:
- http://xoffice.xwiki.org/xwiki/bin/view/CodeBase/XmlRpcProxy

Getting the wiki content of a translated page seems to work fine. Here's 
how it can be used:

Page pageInfo = proxy.GetPage(token, Main.WebHome?language=fr);
String frenchContent = pageInfo.content;

The language parameter value must be a value present in the translations 
array.

Notes:
- The translations array contains all available translations for that 
page, except the default language of the page.
- The default language of the page is the default language of the wiki 
at the moment when the page is created. If ,in time, you change the 
wiki's default language, the page default language for the page will not 
change.
- If you need the rendered content you will need to make another call to 
this API method:

public String renderContent(String token, String space, String pageId,
String content) throws Exception;

Please let me know of your progress

Thanks,
Florin Ciubotaru


Ari Oinas wrote:
 Ok, my setup is as follows:

 Xwiki Enterprise 1.71 installed on Apache Tomcat server (Win Xp Pro Sp3)
and
 it's working fine.

 Im trying to create .NET Managed -application using C# (Visual Studio
2008)
 which connects to Xwiki and displays Xwiki content on a dialog. 
 Im using CookComputing.XmlRpc -library.

 So far I've managed to do the following:
 - Connect and login successfully to Xwiki
 - Fetch pagesummaries, pages and attachments from Xwiki and displayed them
 in Windows.Forms.WebBrowser component.

 I have created a space in Xwiki which holds the pages I want to show in my
 application. (Space name contains spaces, is this a problem?)

 I have created a page inside this space and also translated it to another
 language. This page is displayed properly in Xwiki web-client. Page is
 created using Xwiki 1.0 syntax.

 If I debug my program and inspect PageSummary -properties, I can see that
 there is a translation called en in translations array. 

 Best regards, 

 paristo


 -Original Message-
 From: users-boun...@xwiki.org [mailto:users-boun...@xwiki.org] On Behalf
Of
 Fabio Mancinelli
 Sent: 17. maaliskuuta 2009 15:07
 To: XWiki Users
 Subject: Re: [xwiki-users] Translations cannot be fetched using XML/RPC
 interface


 On Mar 17, 2009, at 1:37 PM, Ari Oinas wrote:

   
 Hi,



 My problem is that I cannot fetch translated pages from Xwiki using  
 XML/RPC
 interface.



 I have tried it like this:

 xwikiInterface.getPage(iToken, Space.Page + ?language=en);

 but it returns the default page.

 
 Hi,

 could you tell me your exact setup?

 I tried with a multilanguage wiki and a Main.WebHome translated in fr  
 and it.

 rpc.getPage(Main.WebHome?language=en).getContent() - English
 rpc.getPage(Main.WebHome?language=it).getContent() - Italiano
 rpc.getPage(Main.WebHome?language=fr).getContent() - Français

 The available translations are accessible using the  
 Page.getTranslations()

 In the previous example, this call returns [it, fr] (Maybe here we  
 should explicitly add also the default translation)

 Let me know.

 Cheers,
 Fabio

 ___
 users mailing list
 users@xwiki.org
 http://lists.xwiki.org/mailman/listinfo/users

 ___
 users mailing list
 users@xwiki.org
 http://lists.xwiki.org/mailman/listinfo/users

   

___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users

___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] Translations cannot be fetched using XML/RPC interface

2009-03-19 Thread Fabio Mancinelli

On Mar 19, 2009, at 8:48 AM, Ari Oinas wrote:

 Hi,

 And thanks for your efforts regarding this issue. I found the  
 problem which
 caused my translations not to work.


Happy that you solved your problem.

 Still, some things to consider:

 - should renderContent function also handle pageId so that language  
 could be
 embedded in the end of pageId? Same way as getPage handles pageId.

 - getPages function returns PageSummaries with default language  
 pageTitles.
 It would be convenient to call this function with language id, so that
 pagetitles would be in correct language. Now I have to loop through  
 every
 pagesummary and get page title to get correct pageTitles to show on
 navigation tree.

Thank you for spotting these improvements.
I will open Jira issues in order to add these feature in the next  
release.

 Thanks for superb customer support!

You are welcome.

Cheers,
Fabio
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] Translations cannot be fetched using XML/RPC interface

2009-03-19 Thread Guillaume Lerouge
Hi Ari,

On Thu, Mar 19, 2009 at 12:48 PM, Ari Oinas ari.oi...@jidea.fi wrote:

 Some other improvements also came to mind:
 - Search -method should also have ability to set language
 - It would be nice if search -method could also search rendered contents.
 For example if I have a macro on one page, which trancludes text from
 another page, page containing the macro doesn't show in search results. I
 think that this feature is very hard to implement very efficiently. And
 theres definitely should be possibility to turn it on or off. Maybe it
 would
 require a copy of renderedContent to be stored on the database and thus
 increases database size.
 - Util class should contain function to strip HTML-tags from string.

 There is much of small things that need to be fixed in Xwiki to make it
 perfect, but it's a pretty good and flexible already.
 I evaluated about 5 different wiki-systems before I decided to go with
 Xwiki. Every wiki had some constraints which rendered them useless for my
 needs, but Xwiki was the most flexible system.

Thanks for your feedback. I would be glad to know a bit more about what you
were looking for, which wikis you tried and what made you choose XWiki
rather than another system. This would help us understand better what makes
XWiki stand out and what it lacks compared with other platforms.
If you've got a little time, do you think you could tell us a bit about
that?
Many thanks in advance,
Guillaume



 Keep up the good work!

 Cheers,

 Ari


 -Original Message-
 From: users-boun...@xwiki.org [mailto:users-boun...@xwiki.org] On Behalf
 Of
 Fabio Mancinelli
 Sent: 19. maaliskuuta 2009 13:09
 To: XWiki Users
 Subject: Re: [xwiki-users] Translations cannot be fetched using XML/RPC
 interface


 On Mar 19, 2009, at 8:48 AM, Ari Oinas wrote:

  Hi,
 
  And thanks for your efforts regarding this issue. I found the
  problem which
  caused my translations not to work.
 
 
 Happy that you solved your problem.

  Still, some things to consider:
 
  - should renderContent function also handle pageId so that language
  could be
  embedded in the end of pageId? Same way as getPage handles pageId.
 
  - getPages function returns PageSummaries with default language
  pageTitles.
  It would be convenient to call this function with language id, so that
  pagetitles would be in correct language. Now I have to loop through
  every
  pagesummary and get page title to get correct pageTitles to show on
  navigation tree.
 
 Thank you for spotting these improvements.
 I will open Jira issues in order to add these feature in the next
 release.

  Thanks for superb customer support!
 
 You are welcome.

 Cheers,
 Fabio
 ___
 users mailing list
 users@xwiki.org
 http://lists.xwiki.org/mailman/listinfo/users

 ___
 users mailing list
 users@xwiki.org
 http://lists.xwiki.org/mailman/listinfo/users




-- 
Guillaume Lerouge
Product Manager - XWiki
Skype ID : wikibc
http://guillaumelerouge.com/
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] Translations cannot be fetched using XML/RPC interface

2009-03-19 Thread Sergiu Dumitriu
Ari Oinas wrote:
 - It would be nice if search -method could also search rendered contents.
 For example if I have a macro on one page, which trancludes text from
 another page, page containing the macro doesn't show in search results. I
 think that this feature is very hard to implement very efficiently. And
 theres definitely should be possibility to turn it on or off. Maybe it would
 require a copy of renderedContent to be stored on the database and thus
 increases database size.

This could be done using Lucene, once we start refactoring our 
lucene-based search.
-- 
Sergiu Dumitriu
http://purl.org/net/sergiu/
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] Translations cannot be fetched using XML/RPC interface

2009-03-18 Thread Florin Ciubotaru
Hi,

I recreated your scenario an published a basic XmlRpc proxy on this page:
- http://xoffice.xwiki.org/xwiki/bin/view/CodeBase/XmlRpcProxy

Getting the wiki content of a translated page seems to work fine. Here's 
how it can be used:

Page pageInfo = proxy.GetPage(token, Main.WebHome?language=fr);
String frenchContent = pageInfo.content;

The language parameter value must be a value present in the translations 
array.

Notes:
- The translations array contains all available translations for that 
page, except the default language of the page.
- The default language of the page is the default language of the wiki 
at the moment when the page is created. If ,in time, you change the 
wiki's default language, the page default language for the page will not 
change.
- If you need the rendered content you will need to make another call to 
this API method:

public String renderContent(String token, String space, String pageId, String 
content) throws Exception;

Please let me know of your progress

Thanks,
Florin Ciubotaru


Ari Oinas wrote:
 Ok, my setup is as follows:

 Xwiki Enterprise 1.71 installed on Apache Tomcat server (Win Xp Pro Sp3) and
 it's working fine.

 Im trying to create .NET Managed -application using C# (Visual Studio 2008)
 which connects to Xwiki and displays Xwiki content on a dialog. 
 Im using CookComputing.XmlRpc -library.

 So far I've managed to do the following:
 - Connect and login successfully to Xwiki
 - Fetch pagesummaries, pages and attachments from Xwiki and displayed them
 in Windows.Forms.WebBrowser component.

 I have created a space in Xwiki which holds the pages I want to show in my
 application. (Space name contains spaces, is this a problem?)

 I have created a page inside this space and also translated it to another
 language. This page is displayed properly in Xwiki web-client. Page is
 created using Xwiki 1.0 syntax.

 If I debug my program and inspect PageSummary -properties, I can see that
 there is a translation called en in translations array. 

 Best regards, 

 paristo


 -Original Message-
 From: users-boun...@xwiki.org [mailto:users-boun...@xwiki.org] On Behalf Of
 Fabio Mancinelli
 Sent: 17. maaliskuuta 2009 15:07
 To: XWiki Users
 Subject: Re: [xwiki-users] Translations cannot be fetched using XML/RPC
 interface


 On Mar 17, 2009, at 1:37 PM, Ari Oinas wrote:

   
 Hi,



 My problem is that I cannot fetch translated pages from Xwiki using  
 XML/RPC
 interface.



 I have tried it like this:

 xwikiInterface.getPage(iToken, Space.Page + ?language=en);

 but it returns the default page.

 
 Hi,

 could you tell me your exact setup?

 I tried with a multilanguage wiki and a Main.WebHome translated in fr  
 and it.

 rpc.getPage(Main.WebHome?language=en).getContent() - English
 rpc.getPage(Main.WebHome?language=it).getContent() - Italiano
 rpc.getPage(Main.WebHome?language=fr).getContent() - Français

 The available translations are accessible using the  
 Page.getTranslations()

 In the previous example, this call returns [it, fr] (Maybe here we  
 should explicitly add also the default translation)

 Let me know.

 Cheers,
 Fabio

 ___
 users mailing list
 users@xwiki.org
 http://lists.xwiki.org/mailman/listinfo/users

 ___
 users mailing list
 users@xwiki.org
 http://lists.xwiki.org/mailman/listinfo/users

   

___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


[xwiki-users] Translations cannot be fetched using XML/RPC interface

2009-03-17 Thread Ari Oinas
Hi,

 

My problem is that I cannot fetch translated pages from Xwiki using XML/RPC
interface.

 

I have tried it like this:

xwikiInterface.getPage(iToken, Space.Page + ?language=en);

but it returns the default page.

 

My Xwiki-interface getPage method is defined as follows:

[XmlRpcMethod(confluence1.getPage)]

PageStruct getPage(String token, String pageId);

 

I'm using C# language and Visual Studio 2008 and I currently have a working
prototype of an application which fetches Xwiki-pages from remote
Xwiki-installation. But now the problem is how to get also translated pages.

 

Any help regarding this issue would be greatly appreciated.

 

Best regards

 

-paristo

 

___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] Translations cannot be fetched using XML/RPC interface

2009-03-17 Thread Fabio Mancinelli

On Mar 17, 2009, at 1:37 PM, Ari Oinas wrote:

 Hi,



 My problem is that I cannot fetch translated pages from Xwiki using  
 XML/RPC
 interface.



 I have tried it like this:

 xwikiInterface.getPage(iToken, Space.Page + ?language=en);

 but it returns the default page.

Hi,

could you tell me your exact setup?

I tried with a multilanguage wiki and a Main.WebHome translated in fr  
and it.

rpc.getPage(Main.WebHome?language=en).getContent() - English
rpc.getPage(Main.WebHome?language=it).getContent() - Italiano
rpc.getPage(Main.WebHome?language=fr).getContent() - Français

The available translations are accessible using the  
Page.getTranslations()

In the previous example, this call returns [it, fr] (Maybe here we  
should explicitly add also the default translation)

Let me know.

Cheers,
Fabio

___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] Translations cannot be fetched using XML/RPC interface

2009-03-17 Thread Ari Oinas
Ok, my setup is as follows:

Xwiki Enterprise 1.71 installed on Apache Tomcat server (Win Xp Pro Sp3) and
it's working fine.

Im trying to create .NET Managed -application using C# (Visual Studio 2008)
which connects to Xwiki and displays Xwiki content on a dialog. 
Im using CookComputing.XmlRpc -library.

So far I've managed to do the following:
- Connect and login successfully to Xwiki
- Fetch pagesummaries, pages and attachments from Xwiki and displayed them
in Windows.Forms.WebBrowser component.

I have created a space in Xwiki which holds the pages I want to show in my
application. (Space name contains spaces, is this a problem?)

I have created a page inside this space and also translated it to another
language. This page is displayed properly in Xwiki web-client. Page is
created using Xwiki 1.0 syntax.

If I debug my program and inspect PageSummary -properties, I can see that
there is a translation called en in translations array. 

Best regards, 

paristo


-Original Message-
From: users-boun...@xwiki.org [mailto:users-boun...@xwiki.org] On Behalf Of
Fabio Mancinelli
Sent: 17. maaliskuuta 2009 15:07
To: XWiki Users
Subject: Re: [xwiki-users] Translations cannot be fetched using XML/RPC
interface


On Mar 17, 2009, at 1:37 PM, Ari Oinas wrote:

 Hi,



 My problem is that I cannot fetch translated pages from Xwiki using  
 XML/RPC
 interface.



 I have tried it like this:

 xwikiInterface.getPage(iToken, Space.Page + ?language=en);

 but it returns the default page.

Hi,

could you tell me your exact setup?

I tried with a multilanguage wiki and a Main.WebHome translated in fr  
and it.

rpc.getPage(Main.WebHome?language=en).getContent() - English
rpc.getPage(Main.WebHome?language=it).getContent() - Italiano
rpc.getPage(Main.WebHome?language=fr).getContent() - Français

The available translations are accessible using the  
Page.getTranslations()

In the previous example, this call returns [it, fr] (Maybe here we  
should explicitly add also the default translation)

Let me know.

Cheers,
Fabio

___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users

___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] Translations cannot be fetched using XML/RPC interface

2009-03-17 Thread Fabio Mancinelli

On Mar 17, 2009, at 2:38 PM, Ari Oinas wrote:

 Ok, my setup is as follows:


Thank you for your answer.

I'll try to reproduce your setup in order to check what's going on.

I'll keep you informed.

Cheers,
Fabio
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users