Club Delphi  
    FTP   CCD     Buscar   Trucos   Trabajo   Foros

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

Grupo de Teaming del ClubDelphi

 
 
Herramientas Buscar en Tema Desplegado
  #3  
Antiguo 25-02-2016
jlrdz jlrdz is offline
Miembro
NULL
 
Registrado: ene 2011
Posts: 50
Poder: 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
 



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
WebServices HTTPRIO SOAP XmlBlackBox ppb Internet 1 06-11-2012 17:55:04
Problema con HTTPRIO. JFHS3811 Internet 0 30-12-2011 15:38:14
error componente!!!!! MARLON1 Varios 1 17-12-2009 20:19:06
HTTPRIO e hilos azulin Internet 1 04-04-2009 14:22:31
HTTPRIO y el Registry ¿unica opción? kaopectate Internet 5 08-11-2007 17:21:35


La franja horaria es GMT +2. Ahora son las 16:13:56.


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