SOAP Codeunit Function with Container

mikmik Member Posts: 79
I have trouble calling a simple test function via SOAP.
My function:
codeunit 70005 TestWS
{
    [ServiceEnabled]
    procedure add(a: Integer; var b: Integer);
    begin
        b := a + b;
    end;
}

(I also tried this in C/AL (Windows AND NavUserPassword Auth + "ServicesUseNTLMAuthentication = true" )
My container is a mcr.microsoft.com/businesscentral/onprem:14.0.29537.31761-at-ltsc2019

Command:
New-NavContainer -accept_eula -accept_outdated -containerName test14bc -imageName mcr.microsoft.com/businesscentral/onprem:14.0.29537.31761-at-ltsc2019 -includeCSide -licenseFile E:\lizenz\lizbc.flf -enableSymbolLoading -auth NavUserPassword -clickonce -shortcuts Desktop -updateHosts

I can list all services and also this special service in chrome.
http://test14bc:7047/NAV/WS/CRONUS AG/Codeunit/WSInterface

I tried to call my function add with WebserviceStudio, Wizdler.

Error in Wizdler:
Failed to get response (Not Found).
Error in WebServiceStudio
System.Reflection.TargetInvocationException: A call target caused an exception. ---> System.InvalidOperationException: The request content type found by the client is '', expected was 'text / xml'.
Error: Empty response on request.
at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse (SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall)
at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke (String methodName, Object [] parameters)
at WSInterfac.Add (Int32 a, Int32 & b)


With kind regards
mik
Sign In or Register to comment.