There is any way to import correctly optional parameters of wsdl


New member
Nov 6, 2021
Programming Experience
i'm using a third party web service with C# without problem until now. The wsdl is added to connected services adding a service reference to:
The problem appears with optionals parameters. For example, the consultarComprobantes operation must have two mandatory parameters (authRequest and rolCUITRepresentada) and seven optional parameters (CUITContraparte, codTipoCmp, estadoCmp, fecha, codCtaCte, estadoCtaCte, and nroPagina). After i import the wsdl these optionals parameters are not configured as optionals, in other cases i get for every optional parameters variables with the name of parameters ended with the Specified word; for this case will be:
CUITContraparte, codTipoCmp, estadoCmp, fecha, codCtaCte, estadoCtaCte, nroPagina
CUITContraparteSpecified, codTipoCmpSpecified, estadoCmpSpecified, fechaSpecified, codCtaCteSpecified, estadoCtaCteSpecified, nroPaginaSpecified.
The related part of the wsdl is:

<xsd:complexType name="ConsultarComprobanteRequestType">


<xsd:element minOccurs="1" maxOccurs="1" name="authRequest" type="tns:AuthRequestType" />

<xsd:element minOccurs="1" maxOccurs="1" name="rolCUITRepresentada" type="tns:RolSimpleType" />

<xsd:element minOccurs="0" maxOccurs="1" name="CUITContraparte" type="tns:CuitSimpleType" />

<xsd:element minOccurs="0" maxOccurs="1" name="codTipoCmp" type="xsd:short" />

<xsd:element minOccurs="0" maxOccurs="1" name="estadoCmp" type="tns:EstadoCmpSimpleType" />

<xsd:element minOccurs="0" maxOccurs="1" name="fecha" type="tns:FiltroFechaType" />

<xsd:element minOccurs="0" maxOccurs="1" name="codCtaCte" type="xsd:long" />

<xsd:element minOccurs="0" maxOccurs="1" name="estadoCtaCte" type="tns:EstadoCtaCteSimpleType" />

<xsd:element minOccurs="0" maxOccurs="1" name="nroPagina" type="xsd:short" />



Maybe i'm doing something wrong. In other cases i do the same and the optionals parameters get imported well.
Any help is welcome!
Top Bottom