I’m looking for a way to generate a complete list of input and output parameters for all integrations (REST/SOAP or exposed actions) within an eSpace.
The goal is to:
I believe you are trying to do the same things as this component
https://www.outsystems.com/forge/component-overview/159/outdoc-o11
Please take a look if this help
Hi, thanks for your input.
I tried to explore outdoc already but I cannot find any resources about the web services parameters in the version we have (2.2...)I'll try to update and see if I can find something.
expecting your e-space can do this with c# : run-doc-generator
↓
Service Center API
Download eSpace (.oml)
Unzip
Parse Model.xml
Extract integrations + I/O
Generate JSON / PDF
Service Center SOAP API (official)
Endpoint : https:///ServiceCenter/ServiceCenter.asmx
Method used : GetModuleBinary
This returns the exact .oml binary.Create Console App and keep program cs like
using System;
using System.IO;
using System.IO.Compression;
using System.Net;
using System.Text;
using System.Xml.Linq;
using System.Collections.Generic;
using System.Linq;
class Program
{
static void Main()
string envUrl = "https://your-env";
string espaceName = "MyESpace";
string user = "admin";
string password = "password";
Console.WriteLine("Downloading eSpace...");
byte[] oml = DownloadModule(envUrl, espaceName, user, password);
File.WriteAllBytes("module.oml", oml);
Console.WriteLine("Extracting...");
ZipFile.ExtractToDirectory("module.oml", "extracted", true);
Console.WriteLine("Parsing model...");
var doc = XDocument.Load("extracted/Model.xml");
var structures = doc.Descendants("Structure")
.ToDictionary(
s => s.Element("Id")!.Value,
s => s.Element("Name")!.Value
);
var output = new List();
// REST
foreach (var rest in doc.Descendants("RestService"))
var service = rest.Element("Name")!.Value;
foreach (var action in rest.Descendants("RestAction"))
output.Add(BuildAction(
service,
"REST",
action,
structures
));
}
// SOAP
foreach (var soap in doc.Descendants("WebService"))
var service = soap.Element("Name")!.Value;
foreach (var method in soap.Descendants("WebServiceMethod"))
"SOAP",
method,
// Server Actions
foreach (var action in doc.Descendants("ServerAction"))
"Internal",
"ExposedAction",
File.WriteAllText(
"integration-doc.json",
System.Text.Json.JsonSerializer.Serialize(
output,
new System.Text.Json.JsonSerializerOptions { WriteIndented = true }
)
Console.WriteLine("DONE – zero manual steps.");
static object BuildAction(
string integration,
string type,
XElement node,
Dictionary structures)
return new
Integration = integration,
Type = type,
Method = node.Element("Name")!.Value,
Inputs = ExtractParams(node, "InputParameter", structures),
Outputs = ExtractParams(node, "OutputParameter", structures)
};
static List ExtractParams(
string tag,
var list = new List();
foreach (var p in node.Descendants(tag))
string resolvedType =
p.Descendants("PrimitiveType").FirstOrDefault()?.Value ??
structures.GetValueOrDefault(
p.Descendants("StructureId").FirstOrDefault()?.Value ?? "",
"Complex"
list.Add(new
Name = p.Element("Name")!.Value,
Type = resolvedType
});
return list;
static byte[] DownloadModule(
string envUrl,
string moduleName,
string user,
string password)
var request = (HttpWebRequest)WebRequest.Create(
$"{envUrl}/ServiceCenter/ServiceCenter.asmx"
request.Method = "POST";
request.ContentType = "text/xml; charset=utf-8";
request.Headers.Add(
"SOAPAction",
"\"http://www.outsystems.com/GetModuleBinary\""
string auth = Convert.ToBase64String(
Encoding.ASCII.GetBytes($"{user}:{password}")
request.Headers["Authorization"] = $"Basic {auth}";
string soap = $@"
{moduleName}
";
using var stream = request.GetRequestStream();
stream.Write(Encoding.UTF8.GetBytes(soap));
using var response = request.GetResponse().GetResponseStream();
using var reader = new StreamReader(response);
var xml = XDocument.Parse(reader.ReadToEnd());
return Convert.FromBase64String(
xml.Descendants("Binary").First().Value
Thank you 🙏
if this approach solve your issue, please mark it as solution