Breadcrumbs

Considerations

Permission to use Web Services

Providers interested in using Web Services should contact NDD Support (suporte.ndd.tech) to request access.

Return limits

There is a standard limitation on the size of the response packet and also a timeout depending on the amount of data that was requested. In a .Net project, for example, you must perform one of the following configurations in your project's app.config file, which will look something like this:

Using a call via Service Reference:

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
    <system.serviceModel>
        <bindings>
            <basicHttpBinding>
                <binding name="MyServiceReferenceSoap" sendTimeout="00:03:00" closeTimeout="00:03:00" maxReceivedMessageSize="2147483647">
                  <readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647" maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647"></readerQuotas>
                  <security mode="Transport" />
                </binding>
            </basicHttpBinding>
        </bindings>
        <client>
            <endpoint address="https://api-general.nddprint.com/Service/MyServiceReference.asmx"
                binding="basicHttpBinding" bindingConfiguration="MyServiceReferenceSoap"
                contract="MyServiceReference.MyServiceReferenceSoap" name="MyServiceReferenceSoap" />
        </client>
    </system.serviceModel>
</configuration>

The settings in bold are those that must be added or changed. After that, if communication or timeout problems still occur, the values of the corresponding settings must be increased. Note that in the above case, the value 2147483647 is being used, which is the maximum allowed data value; and the value 00:03:00, which is a timeout of three (3) minutes.

Using a call via Web Reference:

<configuration>
  <system.web>
    <httpRuntime executionTimeout="180" maxRequestLength="2147483647" maxQueryStringLength="2147483647" />
  </system.web>
  <applicationSettings>
    <GeneralWSTool.Properties.Settings>
      <setting name="MyServiceData" serializeAs="String">
        <value>https://api-general.nddprint.com/Service/MyServiceReference.asmx</value>
      </setting>
    </GeneralWSTool.Properties.Settings>
  </applicationSettings>
</configuration>

Note that the executionTimeout attribute has been set to 180 seconds, or three minutes, and maxRequestLength has been set to 2147483647, which is the maximum allowed value.

Information

The above settings are not requirements; they merely demonstrate how to handle timeout situations or packets that are in transit.