There is any way to import correctly optional parameters of wsdl

wolverine4277

New member
Joined
Nov 6, 2021
Messages
1
Programming Experience
10+
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:
https://serviciosjava.afip.gob.ar/wsfecred/FECredService?wsdl
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
and
CUITContraparteSpecified, codTipoCmpSpecified, estadoCmpSpecified, fechaSpecified, codCtaCteSpecified, estadoCtaCteSpecified, nroPaginaSpecified.
The related part of the wsdl is:

Wiki:
<xsd:complexType name="ConsultarComprobanteRequestType">

    <xsd:sequence>

<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" />

    </xsd:sequence>

</xsd:complexType>

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