Club Delphi  
    FTP   CCD     Buscar   Trucos   Trabajo   Foros

Retroceder   Foros Club Delphi > Principal > Internet
Registrarse FAQ Miembros Calendario Guía de estilo Temas de Hoy

Grupo de Teaming del ClubDelphi

 
 
Herramientas Buscar en Tema Desplegado
  #11  
Antiguo 30-09-2021
ermendalenda ermendalenda is offline
Miembro
 
Registrado: ago 2021
Posts: 886
Poder: 3
ermendalenda Va por buen camino
Cita:
Empezado por iMia Ver Mensaje
Código Delphi [-]
// ************************************************************************ //
// The types declared in this file were generated from data read from the
// WSDL File described below:
// WSDL     : https://www2.agenciatributaria.gob.e...ws/VNifV2.wsdl
//  >Import : https://www2.agenciatributaria.gob.es/static_files/common/internet/dep/aplicaciones/es/aeat/burt/jdit/ws/VNifV2.wsdl>0
//  >Import : https://www2.agenciatributaria.gob.e.../VNifV2Ent.xsd
//  >Import : https://www2.agenciatributaria.gob.e.../VNifV2Sal.xsd
// Encoding : UTF-8
// Version  : 1.0
// (09/07/2021 15:44:34 - - $Rev: 90173 $)
// ************************************************************************ //

unit VNifV21;

interface

uses Soap.InvokeRegistry, Soap.SOAPHTTPClient, System.Types, Soap.XSBuiltIns;

const
  IS_UNBD = $0002;


type

  // ************************************************************************ //
  // The following types, referred to in the WSDL document are not being represented
  // in this file. They are either aliases[@] of other types represented or were referred
  // to but never[!] declared in the document. The types from the latter category
  // typically map to predefined/known XML or Embarcadero types; however, they could also
  // indicate incorrect WSDL documents that failed to declare or import a schema type.
  // ************************************************************************ //
  // !:string          - "http://www.w3.org/2001/XMLSchema"[Gbl]

  Contribuyente        = class;                 { "http://www2.agenciatributaria.gob.es/static_files/common/internet/dep/aplicaciones/es/aeat/burt/jdit/ws/VNifV2Ent.xsd"[Cplx] }
  Contribuyente2       = class;                 { "http://www2.agenciatributaria.gob.es/static_files/common/internet/dep/aplicaciones/es/aeat/burt/jdit/ws/VNifV2Sal.xsd"[Cplx] }

  VNifV2Sal2 = array of Contribuyente2;         { "http://www2.agenciatributaria.gob.es/static_files/common/internet/dep/aplicaciones/es/aeat/burt/jdit/ws/VNifV2Sal.xsd"[Lit][GblCplx] }
  VNifV2Sal       =  type VNifV2Sal2;      { "http://www2.agenciatributaria.gob.es/static_files/common/internet/dep/aplicaciones/es/aeat/burt/jdit/ws/VNifV2Sal.xsd"[Lit][GblElm] }
  VNifV2Ent2 = array of Contribuyente;          { "http://www2.agenciatributaria.gob.es/static_files/common/internet/dep/aplicaciones/es/aeat/burt/jdit/ws/VNifV2Ent.xsd"[Lit][GblCplx] }
  VNifV2Ent       =  type VNifV2Ent2;      { "http://www2.agenciatributaria.gob.es/static_files/common/internet/dep/aplicaciones/es/aeat/burt/jdit/ws/VNifV2Ent.xsd"[Lit][GblElm] }


  // ************************************************************************ //
  // XML       : Contribuyente, 
  // Namespace : http://www2.agenciatributaria.gob.es.../VNifV2Ent.xsd
  // ************************************************************************ //
  Contribuyente = class(TRemotable)
  private
    FNif: string;
    FNombre: string;
  published
    property Nif:    string  read FNif write FNif;
    property Nombre: string  read FNombre write FNombre;
  end;



  // ************************************************************************ //
  // XML       : Contribuyente, 
  // Namespace : http://www2.agenciatributaria.gob.es.../VNifV2Sal.xsd
  // ************************************************************************ //
  Contribuyente2 = class(TRemotable)
  private
    FNif: string;
    FNombre: string;
    FResultado: string;
  published
    property Nif:       string  read FNif write FNif;
    property Nombre:    string  read FNombre write FNombre;
    property Resultado: string  read FResultado write FResultado;
  end;


  // ************************************************************************ //
  // Namespace : http://www2.agenciatributaria.gob.es...ws/VNifV2.wsdl
  // transport : http://schemas.xmlsoap.org/soap/http
  // style     : document
  // use       : literal
  // binding   : VNifV2SoapBinding
  // service   : VNifV2Service
  // port      : VNifPort1
  // URL       : https://www1.agenciatributaria.gob.e.../ws/VNifV2SOAP
  // ************************************************************************ //
  VNifV2 = interface(IInvokable)
  ['{0FA68156-DD7D-DED4-F168-3936F989AAA0}']

    // Cannot unwrap: 
    //     - Input element wrapper name does not match operation's name
    function  VNifV2(const VNifV2Ent: VNifV2Ent): VNifV2Sal; stdcall;
  end;

function GetVNifV2(UseWSDL: Boolean=System.False; Addr: string=''; HTTPRIO: THTTPRIO = nil): VNifV2;


implementation
  uses System.SysUtils;

function GetVNifV2(UseWSDL: Boolean; Addr: string; HTTPRIO: THTTPRIO): VNifV2;
const
  defWSDL = 'https://www2.agenciatributaria.gob.es/static_files/common/internet/dep/aplicaciones/es/aeat/burt/jdit/ws/VNifV2.wsdl';
  defURL  = 'https://www1.agenciatributaria.gob.es/wlpl/BURT-JDIT/ws/VNifV2SOAP';
  defSvc  = 'VNifV2Service';
  defPrt  = 'VNifPort1';
var
  RIO: THTTPRIO;
begin
  Result := nil;
  if (Addr = '') then
  begin
    if UseWSDL then
      Addr := defWSDL
    else
      Addr := defURL;
  end;
  if HTTPRIO = nil then
    RIO := THTTPRIO.Create(nil)
  else
    RIO := HTTPRIO;
  try
    Result := (RIO as VNifV2);
    if UseWSDL then
    begin
      RIO.WSDLLocation := Addr;
      RIO.Service := defSvc;
      RIO.Port := defPrt;
    end else
      RIO.URL := Addr;
  finally
    if (Result = nil) and (HTTPRIO = nil) then
      RIO.Free;
  end;
end;


initialization
  { VNifV2 }
  InvRegistry.RegisterInterface(TypeInfo(VNifV2), 'http://www2.agenciatributaria.gob.es/static_files/common/internet/dep/aplicaciones/es/aeat/burt/jdit/ws/VNifV2.wsdl', 'UTF-8');
  InvRegistry.RegisterDefaultSOAPAction(TypeInfo(VNifV2), '');
  InvRegistry.RegisterInvokeOptions(TypeInfo(VNifV2), ioDocument);
  InvRegistry.RegisterInvokeOptions(TypeInfo(VNifV2), ioLiteral);
  RemClassRegistry.RegisterXSInfo(TypeInfo(VNifV2Sal2), 'http://www2.agenciatributaria.gob.es/static_files/common/internet/dep/aplicaciones/es/aeat/burt/jdit/ws/VNifV2Sal.xsd', 'VNifV2Sal2', 'VNifV2Sal');
  RemClassRegistry.RegisterSerializeOptions(TypeInfo(VNifV2Sal2), [xoLiteralParam]);
  RemClassRegistry.RegisterXSInfo(TypeInfo(VNifV2Sal), 'http://www2.agenciatributaria.gob.es/static_files/common/internet/dep/aplicaciones/es/aeat/burt/jdit/ws/VNifV2Sal.xsd', 'VNifV2Sal');
  RemClassRegistry.RegisterXSInfo(TypeInfo(VNifV2Ent2), 'http://www2.agenciatributaria.gob.es/static_files/common/internet/dep/aplicaciones/es/aeat/burt/jdit/ws/VNifV2Ent.xsd', 'VNifV2Ent2', 'VNifV2Ent');
  RemClassRegistry.RegisterSerializeOptions(TypeInfo(VNifV2Ent2), [xoLiteralParam]);
  RemClassRegistry.RegisterXSInfo(TypeInfo(VNifV2Ent), 'http://www2.agenciatributaria.gob.es/static_files/common/internet/dep/aplicaciones/es/aeat/burt/jdit/ws/VNifV2Ent.xsd', 'VNifV2Ent');
  RemClassRegistry.RegisterXSClass(Contribuyente, 'http://www2.agenciatributaria.gob.es/static_files/common/internet/dep/aplicaciones/es/aeat/burt/jdit/ws/VNifV2Ent.xsd', 'Contribuyente');
  RemClassRegistry.RegisterXSClass(Contribuyente2, 'http://www2.agenciatributaria.gob.es/static_files/common/internet/dep/aplicaciones/es/aeat/burt/jdit/ws/VNifV2Sal.xsd', 'Contribuyente2', 'Contribuyente');

end.

envias nif/cif y nombre en VNifV2Ent y te dice si es correcto o no en VNifV2Sal
Ojo que el nombre debe ser muy aproximado, no hace falta que sea exactamente igual...
debes meter un certificado vàlido en el THTTPRIO con el HTTPRIO.HTTPWebNode.OnBeforePost := HTTPWebNode1BeforePost;

puedes enviar una lista para comprobar con VNifV2Ent2
Hola graciassss.
Vale para extranjeros?
Responder Con Cita
 



Normas de Publicación
no Puedes crear nuevos temas
no Puedes responder a temas
no Puedes adjuntar archivos
no Puedes editar tus mensajes

El código vB está habilitado
Las caritas están habilitado
Código [IMG] está habilitado
Código HTML está deshabilitado
Saltar a Foro

Temas Similares
Tema Autor Foro Respuestas Último mensaje
SII -Nuevo sistema de la Agencia Tributaria española de envío de datos vía Webservice newtron Internet 3557 Hace 1 Semana 17:42:47
Como utilizar la ayuda del nuevo Sistema Operativo gluglu Humor 3 24-09-2007 09:39:05
Aplicacion Agencia De Viajes ArdiIIa Varios 9 20-01-2007 16:49:53
El Vasco Aguirre Al González La Taberna 5 26-05-2006 09:22:28
Microsoft ha lanzado su nuevo sistema operativo DarkByte Humor 0 25-01-2004 09:21:14


La franja horaria es GMT +2. Ahora son las 07:40:53.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Traducción al castellano por el equipo de moderadores del Club Delphi
Copyright 1996-2007 Club Delphi