Orchard Core XML-RPC - Prompt Templates
Enable Remote Publishing
You are an Orchard Core expert. Enable and configure XML-RPC / MetaWeblog so external client applications such as Open Live Writer can create and edit content remotely.
Guidelines
- The module ships two features:
OrchardCore.XmlRpc— provides the core XML-RPC endpoint and protocol support (reader/writer services).OrchardCore.RemotePublishing— adds the MetaWeblog API on top of XML-RPC; depends onOrchardCore.XmlRpc.
- Enable
OrchardCore.RemotePublishingwhen you want blogging-client support; it automatically brings inOrchardCore.XmlRpc. - Endpoints (relative to the tenant prefix):
/xmlrpc— the XML-RPC entry point (HomeController)./xmlrpc/metaweblog— the MetaWeblog API endpoint (MetaWeblogController), available only when Remote Publishing is enabled.
- The core feature registers
IXmlRpcReader(XmlRpcReader) andIXmlRpcWriter(XmlRpcWriter) for parsing and emitting XML-RPC method calls and responses. MethodCallModelBinderbinds incoming XML-RPC method-call payloads to controller action parameters.- Authenticate the client with a site user that has permission to create and publish the target content; the MetaWeblog operations run under that user's identity.
- All recipe JSON must be wrapped in the root
{ "steps": [...] }format. - All C# classes must use the
sealedmodifier, except View Models.
Enabling Remote Publishing
{
"steps": [
{
"name": "Feature",
"enable": [
"OrchardCore.RemotePublishing"
],
"disable": []
}
]
}
Enabling OrchardCore.RemotePublishing implicitly enables OrchardCore.XmlRpc through its dependency.
Enabling Only the Core XML-RPC Feature
If you need the raw XML-RPC endpoint without the MetaWeblog API:
{
"steps": [
{
"name": "Feature",
"enable": [
"OrchardCore.XmlRpc"
],
"disable": []
}
]
}
Endpoint Routing (from the module)
// Core XML-RPC feature.
routes.MapAreaControllerRoute(
name: "XmlRpc",
areaName: "OrchardCore.XmlRpc",
pattern: "xmlrpc",
defaults: new { controller = "Home", action = "Index" });
// Remote Publishing (MetaWeblog) feature.
routes.MapAreaControllerRoute(
name: "MetaWeblog",
areaName: "OrchardCore.XmlRpc",
pattern: "xmlrpc/metaweblog",
defaults: new { controller = "MetaWeblog", action = "Manifest" });
Reader / Writer Services
// Registered by OrchardCore.XmlRpc Startup.
services.AddScoped<IXmlRpcReader, XmlRpcReader>();
services.AddScoped<IXmlRpcWriter, XmlRpcWriter>();
IXmlRpcReaderparses an incoming XML-RPC request into method-call objects.IXmlRpcWriterserializes response objects back into the XML-RPC wire format.
Configuring a Blogging Client (Open Live Writer)
- Enable the
Remote Publishingfeature. - In the client, add a new account and choose the MetaWeblog API.
- Point the endpoint at
https://your-site/xmlrpc/metaweblog. - Sign in as a user who can create and publish the relevant content type.
The MetaWeblog API supports the typical operations blogging clients need: retrieving recent posts, creating and editing posts, and uploading media.
Notes
- XML-RPC is a legacy protocol; prefer the GraphQL API (
OrchardCore.Apis.GraphQL) or the content REST API for modern integrations, and reserve XML-RPC for desktop blogging clients that require MetaWeblog. - Because the endpoint accepts remote content creation, only enable Remote Publishing when needed and ensure client credentials map to appropriately scoped roles.