SoapDynamicRequestPcpl 1.0.0

WebServices Dynamic

Requires NuGet 1.0.0 or higher.

Install-Package SoapDynamicRequestPcpl -Version 1.0.0
dotnet add package SoapDynamicRequestPcpl --version 1.0.0
<PackageReference Include="SoapDynamicRequestPcpl" Version="1.0.0">
  <PrivateAssets>all</PrivateAssets>
  <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add SoapDynamicRequestPcpl --version 1.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

Release Notes

Supported:
>= .NETFramework 4.0

EXAMPLE:

namespace SoapDynamicRequestPcpl.Example
{
   /// <summary>
   /// Consumir WebServices Correios
   /// Autor: Paulo Cesar P Luna
   /// Data: 16/09/2017
   /// </summary>
   class Program
   {
       /// <summary>
       /// Consultar o Prazo de Entrega de uma CEP Origem para Cep Destino
       /// </summary>
       /// <param name="args"></param>
       static void Main(string[] args)
       {
           var urlAsmx = "http://ws.correios.com.br/calculador/CalcPrecoPrazo.asmx";
           var actionSoap = "CalcPrazo";
           var tipoServico = "40010"; // 40010 SEDEX Varejo / 40045 SEDEX a Cobrar Varejo / 40290 SEDEX Hoje Varejo / 41106 PAC Varejo...
           var cepOrigem = "22793-903";
           var cepDestino = "25235-190";

           // Configurar request
           var soapRequest = new SoapDynamicRequest();
           soapRequest.AddSoapSchemaUrl(url: urlAsmx);
           soapRequest.AddSoapAction(soapAction: actionSoap);

           // Adiconar params de consulta
           //<nCdServico>Tipo de serviço PAC/SEDEX etc...</nCdServico>
           soapRequest.AddSoapParameter("nCdServico", tipoServico);

           //<sCepOrigem>Cep Origem</sCepOrigem>
           soapRequest.AddSoapParameter("sCepOrigem", cepOrigem);

           //<sCepDestino>Cep Destino</sCepDestino>
           soapRequest.AddSoapParameter("sCepDestino", cepDestino);

           // Request consulta
           var xml = soapRequest.InvokeSoapRequestXml();

           // Imprimir Consulta
           Console.WriteLine(xml.InnerXml);

           Console.ReadKey();
       }
   }
}

Dependencies

This package has no dependencies.

This package is not used by any popular GitHub repositories.

Version History

Version Downloads Last updated
1.0.0 340 9/16/2017