
![]() |
Show Changes |
![]() |
Edit |
![]() |
|
![]() |
Recent Changes |
![]() |
Subscriptions |
![]() |
Lost and Found |
![]() |
Find References |
![]() |
Rename |
![]() |
Administration Page |
| Search |
History
| 9/12/2007 12:58:58 PM |
| -10.10.192.22 |
| 9/11/2007 2:31:14 PM |
| -74.12.234.30 |
![]() |
List all versions |
Related Topics
The FlexWikiWebService is undergoing a rearchitecture to reflect changes in the internal implementation. Below are several sections: one describing the proposed architecture for the new web service, one archiving previous discussion of the existing web service architecture, one discusses and one identifies outstanding issues that need to be resolved.
In this document, "current architecture" refers to the first revision of the web service, which was in effect as of build 1615. "Proposed architecture" refers to the web service scheduled to be implemented around January 2005.
Please direct discussion of this proposed architecture to the FlexWikiUsersMailingList - this page is intended for documentation, not discussion. I will update this documentation with any consensus reached on the lists.
--CraigAndera 2004-12-23
Atoms are the data structures that describe the contents of a FlexWiki instance. Web service messages are made up of combinations of one or more atoms.
| Item | Type | Description |
| Name | string | The name of the namespace |
A TopicIdentifier contains information to identify a particular topic.
| Item | Type | Description |
| Namespace | string | The TopicNamespace this topic belongs to. |
| Name | string | The local (i.e. unqualified) name of this topic. |
| Version | string | The particular version of this topic. If omitted, the semantics are that the latest version is desired. |
TopicInformation describes the state of a particular topic.
| Item | Type | Description |
| Identifier | TopicIdentifier | Identifies which topic |
The HTML representation of a particular topic.
| Item | Type | Description |
| Topic | TopicIdentifier | The topic this HTML is for. |
| HTML | string | The HTML for this topic. |
The wiki text for a topic.
| Item | Type | Description |
| Topic | TopicIdentifier | The topic this text is for. |
| Contents | string | The wiki text for this topic. |
The identity of a visitor to the wiki.
| Item | Type | Description |
| Identity | string | Freeform text identifying the visitor. |
Operations correspond to WebMethods in ASP.NET terminology. The consist of a (potentially empty) request message and an optional response message, each of which contains zero or more atoms (above).
Returns all the namespaces in the Federation.
| Parameter | Direction | Description |
| Namespace[] | Out | A list of all namespaces in the federation |
Returns the default namespace in the Federation.
| Parameter | Direction | Description |
| Namespace | Out | The default namespace in the Federation. |
Returns all topics in a given namespace or namespaces.
| Parameter | Direction | Description |
| Namespace[] | In | The namespaces for which to retrieve all topics. |
| TopicIdentifier[] | Out | The list of all topics from the requested namespaces. |
Returns the formatted HTML for a given topic or topics.
| Parameter | Direction | Description |
| TopicIdentifier[] | In | A list of topics for which HTML is desired |
| RenderedTopic[] | Out | The HTML for the requested topics. |
Returns the wiki text for a given topic or topics.
| Parameter | Direction | Description |
| TopicIdentifier[] | In | A list of topics for which to retrieve the wiki text |
| TopicContents[] | Out | The wiki text for the requested topics. |
Sets the wiki text for a given topic.
| Parameter | Direction | Description |
| TopicContents[] | In | A list of topics identifiers and the wiki text each should be set to. Note that the version information in the TopicIdentifier is ignored. |
| VisitorIdentity | In | The identity of the person making the change. |
Returns a collection of versions for a given topic.
| Parameter | Direction | Description |
| TopicIdentifier[] | In | A list of topics for which version history information is requested. Note that version information is ignored. |
| TopicIdentifier[] | Out | A list of topics with version numbers for all previous versions for the requested topics. |
Returns the preview HTML for a given topic.
| Parameter | Direction | Description |
| TopicIdentifier[] | In | A list of topics for which to retrieve the preview HTML. |
| RenderedTopic[] | Out | The preview HTML for the requested topics. |
Restores a given Topic to a previous version.
| Parameter | Direction | Description |
| TopicIdentifier[] | In | A list of previous topics and versions to restore. |
| VisitorIdentity | In | The identity of the visitor making the change. |
| Parameter | Direction | Description |
| string | Out | The version of software the FlexWiki instance is using. Allows clients to gracefully degrade behavior. |
Versioning is tricky. Several questions need to be answered:
We implement a new endpoint and disable the old one. Clients need to update to use the new definition - old tools will no longer work against new servers.
We implement a new endpoint, but maintain the old one. Internally, one of them can call the other one for operations that overlap.
New operations are added to the existing endpoint, and all existing operations are maintained. This is similar to the old IFoo2 COM approach.
The FlexWikiWebService has the following methods.
public string CanEdit()
public ContentBaseCollection GetAllNamespaces()
public ContentBase GetDefaultNamespace()
public AbsoluteTopicNameCollection GetAllTopics(ContentBase cb)
public string GetHtmlForTopic(AbsoluteTopicName topicName)
public string GetHtmlForTopicVersion(AbsoluteTopicName topicName, string version)
public string GetTextForTopic(AbsoluteTopicName topicName)
public void SetTextForTopic(AbsoluteTopicName topicName, string postedTopicText, string visitorIdentityString)
public StringCollection GetVersionsForTopic(AbsoluteTopicName topicName)
public string GetPreviewForTopic(AbsoluteTopicName topicName, string textToFormat)
public void RestoreTopic(AbsoluteTopicName topicName, string visitorIdentityString, string version)
FlexWikiWebService is in Alpha right now. If you target this service before it's final, be prepared to have to refresh your proxy for the service.
Q Will you be able to specify the version of the topic you want in the methods above that affect topics? -- TommyWilliams
A? I would assume that you would use the canonical string representation of a topic name (which allows for an optional namespace and an optional version number). Take a look at the address bar when you're looking at a previous version of a topic and you'll see what I mean. -- DavidOrnstein
A I've revised the list of methods. As you can see, GetVersionsForTopic returns all versions for a given topic. Then you can pass in one of those version numbers into GetHtmlForTopic.
I've also added support for RestoreTopic -- OmarShahine
I wonder if this web service might be the basis for SharePointIntegration? Especially since SharePoint has a web services integration feature (which I think you need FrontPage 2003 to really play with). -- DavidOrnstein
What about overloads on the methods? If you don't specify a version or a namespace, for example, you would get the the most-recent version in the default namespace. For example:
Maybe all of these methods should just use the full string representation of a topic name? That way you don't have to have all the different overloaded versions. If you have the parts you can always easily combine. If you have the fullname, you can avoid having to split it (which would be error prone). -- DavidOrnstein
What is the full Topic name version? Would it be cool for me to check in the code at this point (it's a single file). I'd like to have another set of eyes look at it becaues I am still a newbie
.
BTW if you pass in null for version you get the latest version. -- OmarShahine
The full TopicName version for the previous version of this page (previous before your edit) is:
FlexWikiWebService(2004-01-03-10-25-42.8175-davidorn@microsoft.com-12.207.223.254)
If you look at the filesystem, you'll see this is how the files are named. I see no problem with you checking in the code since it's all brand-new. Be sure to add it to the appropriate .csproj file, too -- my first check-in, I forgot. -- TommyWilliams
Here is an idea. Instead of returning and passing in strings all over the place how about I create two simple collection classes in Welcome to Fuck Wiki Forum 2_666.Web.Services namespace. They would simply wrap the existing TopicNames for a ContentBase and the ContentBases for a WikiFederation.
Doing this means I have to modify ContentBase, TopicName and Federation and put XmlIgnore so that I don't get a million exceptions trying to serialze/deserialize them.
Said classes would be:
[Serializable]
public class TopicNameCollection: System.Collections.CollectionBase
{
...
}
[Serializable]
public class TopicNameSpaceCollection: System.Collections.CollectionBase
{
...
}
Sounds reasonable. It does sounds like a change that will require some serious attention to TestingFlexWiki. -- DavidOrnstein
Just for kicks I ran all the NUnit tests. Seems if you run them all, you get failures here and there. However, if you run each test seperatley this doesn't happen. Very random, any ideas?
I fonund the problem. Increasing the timeout values for Thread.Sleep to 100 miliseconds from 10 (waiting a bit more for the files to appear, fixes the problem. This probably reproes on other prople that are using a RAID-2 array. Write times are probably slower than a non RAID disk arreay.
I checked in the fix. BTW - I was runnin the tests on the latest checked out code, not mine.
I'd like to see a method to get changes since a given date
public AbsoluteTopicNameCollection GetRecentChangedTopics(ContentBase cb, DateTime startTime)
This could be useful for a WinForm editor or a SharePoint WebPart. -- ThomasFreudenberg