Ver Mensaje Individual
  #20  
Antiguo 06-12-2024
rdaniel2000 rdaniel2000 is offline
Miembro
 
Registrado: jun 2003
Posts: 17
Reputación: 0
rdaniel2000 Va por buen camino
Hola,

Es que no he sabido como enviar dicho xml.


Tengo la Funcion creada por el mismo Delphi y la con la cual mando llamar a la funcion del Web Service asi:

Código Delphi [-]
GetIAutenticacion(True, '', Nil).Autentica();

Pero como la funcion no tienen parametros, no se en que parte va el XML.

Gracias por la ayuda..



Código Delphi [-]

  IAutenticacion = interface(IInvokable)
  ['{A87F3A38-6E93-6F43-CEB6-B92C0862B638}']
    function  Autentica: string; stdcall;
  end;

function GetIAutenticacion(UseWSDL: Boolean; Addr: string; HTTPRIO: THTTPRIO): IAutenticacion;
const
  defWSDL = 'https://cfdidescargamasivasolicitud.clouda.sat.gob.mx/Autenticacion/Autenticacion.svc?wsdl';
  defURL  = 'https://cfdidescargamasivasolicitud.clouda.sat.gob.mx/Autenticacion/Autenticacion.svc';
  defSvc  = 'Autenticacion';
  defPrt  = 'BasicHttpBinding_IAutenticacion';
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 IAutenticacion);
    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;
Responder Con Cita