Ver Mensaje Individual
  #3  
Antiguo 25-02-2016
jlrdz jlrdz is offline
Miembro
NULL
 
Registrado: ene 2011
Posts: 50
Reputación: 14
jlrdz Va por buen camino
Cita:
Empezado por bitbow Ver Mensaje
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 [-]
// ************************************************************************ //
// The types declared in this file were generated from data read from the
// WSDL File described below:
// WSDL     : http://localhost/monitor/index.php/PruebaWS?wsdl
//  >Import : http://localhost/monitor/index.php/PruebaWS?wsdl>0
// Encoding : ISO-8859-1
// Version  : 1.0
// (24/02/2016 05:30:33 p.m. - - $Rev: 56641 $)
// ************************************************************************ //

unit PruebaWS;

interface

uses InvokeRegistry, SOAPHTTPClient, Types, XSBuiltIns;

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]
  // !:int             - "http://www.w3.org/2001/XMLSchema"[Gbl]

  Resultado            = class;                 { "http://localhost/monitor/index.php?/PruebaWS/"[GblCplx] }

  Resultados = array of Resultado;              { "http://localhost/monitor/index.php?/PruebaWS/"[GblCplx] }


  // ************************************************************************ //
  // XML       : Resultado, global, 
  // Namespace : http://localhost/monitor/index.php?/PruebaWS/
  // ************************************************************************ //
  Resultado = class(TRemotable)
  private
    Fid: Integer;
    Fmsg: string;
  published
    property id:  Integer  read Fid write Fid;
    property msg: string   read Fmsg write Fmsg;
  end;


  // ************************************************************************ //
  // Namespace : urn:PruebaWS
  // soapAction: urn:http://localhost/monitor/index.php?/...operationName%
  // transport : http://schemas.xmlsoap.org/soap/http
  // style     : rpc
  // use       : encoded
  // binding   : PruebaWSBinding
  // service   : PruebaWS
  // port      : PruebaWSPort
  // URL       : http://localhost/monitor/index.php/PruebaWS
  // ************************************************************************ //
  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
  { PruebaWSPortType }
  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://localhost/monitor/index.php?/PruebaWS/', 'Resultados');
  RemClassRegistry.RegisterXSClass(Resultado, 'http://localhost/monitor/index.php?/PruebaWS/', 'Resultado');

end.
Responder Con Cita