Solved

ServiceGate.asmx Implementation

  • 29 July 2022
  • 2 replies
  • 130 views

Hello, I have recently been working on the implementation of a customization publication project through the SOAP service type with api/ServiceGate.asmx, I encountered this problem when consuming the endpoint to upload the packages to the platform:

 

 

The method is:

private static async Task PublishCustomizationPackage(string packageFilename, string packageName, string url, string username, string password)
{
BasicHttpBinding binding = new BasicHttpBinding
{
AllowCookies = true,
Security =
{
Mode = BasicHttpSecurityMode.Transport
},
OpenTimeout = new TimeSpan(0, 10, 0),
SendTimeout = new TimeSpan(0, 10, 0),
ReceiveTimeout = new TimeSpan(0, 10, 0)
};

EndpointAddress address = new EndpointAddress(url + "/api/ServiceGate.asmx");

var gare = new ServiceGate.ServiceGateSoapClient(binding, address))

Console.WriteLine($"Logging in to {url}...");
await gare.LoginAsync(username, password);
Console.WriteLine($"Uploading package...");
await gare.UploadPackageAsync(packageName, File.ReadAllBytes(packageFilename), true);
Console.WriteLine($"Publishing customizations...");
await gare.PublishPackagesAsync(new string[] { packageName }, true);
Console.WriteLine($"Logging out...");
await gare.LogoutAsync();


}

 

I would appreciate if someone knows how to fix it.

icon

Best answer by Rocardokoh61 30 July 2022, 00:31

View original

2 replies

[UPDATED]

 

The solution is to use only one tenant, but if anyone knows how to use multiple tenants to ship the login endpoint, it would be appreciated if you could point it out.

Userlevel 7
Badge +5

Just FYI, in 2022R2 there is a new REST API endpoint for publishing customizations

See here (page 8):

http://acumatica-builds.s3.amazonaws.com/builds/preview/22.2/ReleaseNotes/AcumaticaERP_2022R2_Beta_ReleaseNotes_for_Developers.pdf

Reply


About Acumatica ERP system
Acumatica Cloud ERP provides the best business management solution for transforming your company to thrive in the new digital economy. Built on a future-proof platform with open architecture for rapid integrations, scalability, and ease of use, Acumatica delivers unparalleled value to small and midmarket organizations. Connected Business. Delivered.
© 2008 — 2024  Acumatica, Inc. All rights reserved