VIP UserServices wsdl throwing error
search cancel

VIP UserServices wsdl throwing error

book

Article ID: 409820

calendar_today

Updated On:

Products

VIP Service

Issue/Introduction

The latest release of VIP cloud contained changes to the WSDL, some of which ended up breaking the QueryServiceSoapBinding initializer.

 [110825 145421] [ERROR] System.TypeInitializationException: The type initializer for 'Mfa' threw an exception. ---> System.InvalidOperationException: Unable to generate a temporary class (result=1).

error CS0029: Cannot implicitly convert type 'string' to 'string[]'

    at System.Xml.Serialization.Compiler.Compile(Assembly parent, String ns, XmlSerializerCompilerParameters xmlParameters, Evidence evidence)

   at System.Xml.Serialization.TempAssembly.GenerateAssembly(XmlMapping[] xmlMappings, Type[] types, String defaultNamespace, Evidence evidence, XmlSerializerCompilerParameters parameters, Assembly assembly, Hashtable assemblies)

   at System.Xml.Serialization.TempAssembly..ctor(XmlMapping[] xmlMappings, Type[] types, String defaultNamespace, String location, Evidence evidence)

   at System.Xml.Serialization.XmlSerializer.GetSerializersFromCache(XmlMapping[] mappings, Type type)

Classes are C# autogenerated in VS2019 with the command:

wsdl vipuserservices-1.10.xsd vipuserservices-query-1.10.wsdl vipuserservices-auth-1.10.wsdl

Environment

VIP Service

Resolution

In Line no 234 of vipuserservices-1.10.xsd file, It has

<xs:element name="userGroups" type="UserGroupType" minOccurs="0" maxOccurs="unbounded"/>

You need to replace that line with below (remove maxOccurs)  to address the issue.

<xs:element name="userGroups" type="UserGroupType" minOccurs="0"/>.

These changes are also incorporated in the latest WSDL which can be downloaded from the VIP Manager. The issue is only related to the C# code and Java code works fine.