Ver Mensaje Individual
  #1  
Antiguo 24-06-2013
webmasterplc webmasterplc is offline
Miembro
 
Registrado: mar 2008
Posts: 274
Reputación: 17
webmasterplc Va por buen camino
Error en Webservice funcion envio de sms

buenas estoy tratando de crear un Webservice en delphi 7 en la cual tengo una funcion pero me da este error:
[Error] wsKSMSImpl.pas(15): Unsatisfied forward or external declaration: 'TwsKSMS.enviarSMS'

mi codigo es este.

Código Delphi [-]
{ Invokable implementation File for TwsKSMS which implements IwsKSMS }

unit wsKSMSImpl;

interface

uses SysUtils, Classes, IdHTTP,InvokeRegistry, Types, XSBuiltIns, wsKSMSIntf;

type

  { TwsKSMS }
  TwsKSMS = class(TInvokableClass, IwsKSMS)

  public
   function enviarSMS (url,usuario,clave,phone,mensaje : string) :string;stdcall;
   end;


implementation

function enviarSMS (url,usuario,clave,phone,mensaje : string) :string;stdcall;

var
  http: TIdHttp;
  params: TStrings;
  respuesta: string;
begin
    http := TIdHTTP.Create(nil);
    params := TStringList.Create;

    begin
        params.Add('usuario='+usuario);
        params.Add('clave='+clave);
        params.Add('telefonos='+phone);
        params.Add('texto='+mensaje);
        respuesta := http.Post(url, params);
    end;
    params.Free;
    http.Free;
end;
exports
 enviarSMS;

initialization
  { Invokable classes must be registered }
  InvRegistry.RegisterInvokableClass(TwsKSMS);

end.
Responder Con Cita