SoapDynamicRequestPcpl 1.0.0
Requires NuGet 1.0.0 or higher.
dotnet add package SoapDynamicRequestPcpl --version 1.0.0
NuGet\Install-Package SoapDynamicRequestPcpl -Version 1.0.0
<PackageReference Include="SoapDynamicRequestPcpl" Version="1.0.0"> <PrivateAssets>all</PrivateAssets> <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets> </PackageReference>
paket add SoapDynamicRequestPcpl --version 1.0.0
#r "nuget: SoapDynamicRequestPcpl, 1.0.0"
// 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 | Versions 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. |
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 | 1,130 | 9/16/2017 |
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();
}
}
}