How to specify profile information for google wave robot

In my earlier post, How to publish google wave robot capabilities, I talked about capabilities.xml file that each robot publishes to declare what event(s) it can handle. And one of the nodes in the XML file was profile. The original specification was that robots could provide their profile information in that node. It looks like that this specification was changed. Now this profile node is ignored in capabilities.xml. Wave client sends a separate request to /wave/robot/profile url to your robot. And it expects a JSON response for that request. That JSON response has the following format and structure.

  "profileUrl": "",
  "imageUrl": "",
  "name": "StockBlocks",
  "javaClass": ""

Specifying google wave robot profile information

In your .Net implementation of the robot, it is very easy to provide the profile information. You can add ParticipantProfile attribute to your ASHX handler class. And you are all set to go. You can see from the following code snippet how easy it is do so.

[WebService(Namespace = "")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
[ParticipantProfile(Name = "StockBlocks", 
   ImageUrl = "", 
   ProfileUrl = "")]
public class Stocky : EventDrivenRobotBase

The API will take care of sending the appropriate response to wave client.

Update version

If you want to update existing profile of your robot, then you will need to change version of it as well. The client caches the profiles of robots. Unless it sees that there is a newer version available, it will keep using older profile.




20.5 °C / 68.9 °F

weather conditions Clear

Monthly Posts

Blog Tags