SoapDynamicRequestPcpl 1.0.0

.NET Framework 4.0

Requires NuGet 1.0.0 or higher.

dotnet add package SoapDynamicRequestPcpl --version 1.0.0
NuGet\Install-Package SoapDynamicRequestPcpl -Version 1.0.0
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="SoapDynamicRequestPcpl" Version="1.0.0">
  <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add SoapDynamicRequestPcpl --version 1.0.0
#r "nuget: SoapDynamicRequestPcpl, 1.0.0"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install SoapDynamicRequestPcpl as a Cake Addin
#addin nuget:?package=SoapDynamicRequestPcpl&version=1.0.0

// Install SoapDynamicRequestPcpl as a Cake Tool
#tool nuget:?package=SoapDynamicRequestPcpl&version=1.0.0

WebServices Dynamic

Product Compatible and additional computed target framework versions.
.NET Framework net40 is compatible.  net403 was computed.  net45 was computed.  net451 was computed.  net452 was computed.  net46 was computed.  net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
Compatible target framework(s)
Additional computed target framework(s)
Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.0.0 963 9/16/2017

>= .NETFramework 4.0


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 = "";
           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