Error when calling ServiceRegistrationService - GetServices - Value cannot be null. Parameter name: parameters

Hi! I’m trying to call the GetServices at ManagementServer/ServiceRegistrationService.svc

but I get an error back saying

“Value cannot be null. Parameter name: parameters.”

My request looks like this (I have tried some variations of it but with no success)

<?xml version="1.0" encoding="utf-8"?>
<Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://schemas.xmlsoap.org/soap/envelope/">
  <Body>
    <GetServices xmlns="http://schemas.videoos/ServiceRegistrationService/2008/06/Vmo/01">
      <Parameters />
    </GetServices>
  </Body>
</Envelope>

The definition of GetServices (in the WSDL) looks like this

<wsdl:operation name="GetServices">
<wsdl:input wsaw:Action="http://schemas.videoos/ServiceRegistrationService/2008/06/Vmo/01/IServiceRegistrationService/GetServices" message="tns:IServiceRegistrationService_GetServices_InputMessage"/>
<wsdl:output wsaw:Action="http://schemas.videoos/ServiceRegistrationService/2008/06/Vmo/01/IServiceRegistrationService/GetServicesResponse" message="tns:IServiceRegistrationService_GetServices_OutputMessage"/>
</wsdl:operation>
 
<wsdl:message name="IServiceRegistrationService_GetServices_InputMessage">
<wsdl:part name="parameters" element="tns:GetServices"/>
</wsdl:message>
 
<xs:element name="GetServices">
<xs:complexType>
<xs:sequence/>
</xs:complexType>
</xs:element>

I tried the tool svcutil.exe to generate some c# classes and there it looks like GetServices should have no parameters.

I’m not an expert on reading WSDL but tried to get some help from ChatGPT :slight_smile: and it feels like my request should be Ok… Are I’m doing something obvious wrong?

I’m using 2024 R1

Kind regards Hans

RESOLVED: When using the endpoint /ManagementServer/ServiceRegistrationServiceOAuth.svc instead of /ManagementServer/ServiceRegistrationService.svc it worked fine, I missed that there existed an OAuth version of the endpoint.

Why do you include this line/node ?

If you leave it out, does it make a difference?

No, I got the same error, that is why I tested with including it (since the error was related to a missing parameter called parameters)… but it the problem was that I did not access the ManagementServer/ServiceRegistrationServiceOAuth.svc when doing the request (but I have looked at the WSDL for that service when creating my C# classes for the SOAP messages).

So now it works but I have a problem with deserializing the response. The returned xml contains the data I expect but when deserializing it the list of ServiceInfo it only contains one item and that item has no values set. I assume there is a problem with how I have written my C# classes. I have used svcutil.exe to generate the C# classes… The response is defined like this in the WDSL

<xs:element name="GetServicesResponse">
<xs:complexType>
<xs:sequence>
<xs:element xmlns:q9="http://videoos.net/2/XProtectCSServiceRegistration" minOccurs="0" name="GetServicesResult" nillable="true" type="q9:ArrayOfServiceInfo"/>
</xs:sequence>
</xs:complexType>
</xs:element>

and I’m not sure how I should represent the ArrayOfServiceInfo in my C# classes but I will do some more test, I have not run out of ideas yet :slight_smile:

Regards Hans