About the author
The following is the complete Delphi code and instruction to blog to .Text (v0.95) using Web Services.
Note: The code doesn't post the blog to any categories.
var Intf: ASPNetWebLogApiSoap; AEntry: Entry; EntryID: Integer; Headers: ISOAPHeaders; AuthenticationInfo: BlogUser; ANow: TDateTime;begin Intf := GetASPNetWebLogApiSoap(false, '', HTTPRIO1); AuthenticationInfo := BlogUser.Create; Headers := Intf as ISOAPHeaders; AuthenticationInfo.UserName := 'myusername'; AuthenticationInfo.Password := 'mypassword'; Headers.OwnsSentHeaders := true; Headers.Send(AuthenticationInfo); AEntry := Entry.Create; AEntry.PostType := BlogPost; ANow := Now; AEntry.DateCreated := DateTimeToXSDateTime(ANow); AEntry.DateUpdated := DateTimeToXSDateTime(ANow); AEntry.Author := 'Author Name'; AEntry.Description := 'WSDL testing'; // Excerpt, may be left blank. AEntry.ParentID := -1; // should always be -1 for a new post AEntry.Email := ''; // may be left blank AEntry.IsActive := true; // doesn't work, use PostConfig AEntry.DisplayOnHomePage := true; // doesn't work, use PostConfig AEntry.IsXHMTL := false; // doesn't work, use PostConfig AEntry.Body := 'Hmm, experiment'; // HTML text here AEntry.AllowComments := true; // doesn't work, use PostConfig AEntry.Title := 'A Title'; AEntry.PostConfig := 'IsActive DisplayOnHomePage AllowComments IncludeInMainSyndication IsAggregated'; EntryID := Intf.InsertEntry(AEntry); AEntry.Free; Intf := nil;end;
This article discusses the new Delphi 8 property access specifiers.
Continued discussion of undocumented Delphi 8 Property Access Specifiers, and other ways of adding and removing delegates / events handlers, including clearing the list of all the delegates / event handlers.