Sebastin-1126 avatar image
0 Votes"
Sebastin-1126 asked JackJJun-MSFT commented

There is any way to import correctly optional parameters of wsdl

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!


· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

The minOccurs and maxOccurs are constraints for the complex type.

However, you must read the 3rd party reference documentation to understand how use the 3rd party service. The community cannot answer this question.

0 Votes 0 ·

@Sebastin-1126, As others suggested, maybe that you could communicate with the 3rd party product owner to know more about how to use the wsdl. Currently Microsoft Q&A doesn't support the wsdl problem, I also suggest that you could ask the question in stackoverflow.

0 Votes 0 ·

0 Answers