Cita:
Empezado por bitbow
Debes revisar las unidades donde se define la interface con el webservice, las que se generan al importar el wsdl, si es posible publica el codigo para que podamos apoyarte mejor.
Saludos.
|
Gracias por tu respuesta amigo, aquí publico el Unit que me genera al usar el wizard para importar el wsdl.
Saludos.
Código Delphi
[-]
unit PruebaWS;
interface
uses InvokeRegistry, SOAPHTTPClient, Types, XSBuiltIns;
type
Resultado = class;
Resultados = array of Resultado;
Resultado = class(TRemotable)
private
Fid: Integer;
Fmsg: string;
published
property id: Integer read Fid write Fid;
property msg: string read Fmsg write Fmsg;
end;
PruebaWSPortType = interface(IInvokable)
['{0165AD64-F0D9-9910-7FFC-A13240734C57}']
function ConsultaUsuario(const username: string; const password: string): Resultados; stdcall;
function ValidaDato(const username: string; const password: string; const identificador: string): Resultados; stdcall;
end;
function GetPruebaWSPortType(UseWSDL: Boolean=System.False; Addr: string=''; HTTPRIO: THTTPRIO = nil): PruebaWSPortType;
implementation
uses SysUtils;
function GetPruebaWSPortType(UseWSDL: Boolean; Addr: string; HTTPRIO: THTTPRIO): PruebaWSPortType;
const
defWSDL = 'http://localhost/monitor/index.php/PruebaWS?wsdl';
defURL = 'http://localhost/monitor/index.php/PruebaWS';
defSvc = 'PruebaWS';
defPrt = 'PruebaWSPort';
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 PruebaWSPortType);
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
InvRegistry.RegisterInterface(TypeInfo(PruebaWSPortType), 'urn:PruebaWS', 'ISO-8859-1');
InvRegistry.RegisterDefaultSOAPAction(TypeInfo(PruebaWSPortType), 'urn:http://localhost/monitor/index.php?/...onName%');
RemClassRegistry.RegisterXSInfo(TypeInfo(Resultados), 'http: RemClassRegistry.RegisterXSClass(Resultado, 'http://localhost/monitor/index.php?/PruebaWS/', 'Resultado');
end.