Club Delphi  
    FTP   CCD     Buscar   Trucos   Trabajo   Foros

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

Grupo de Teaming del ClubDelphi

 
 
Herramientas Buscar en Tema Desplegado
  #1  
Antiguo 30-11-2011
ruedabeat2003 ruedabeat2003 is offline
Miembro
 
Registrado: mar 2007
Posts: 66
Poder: 18
ruedabeat2003 Va por buen camino
Errores en la creación de Cliente WebService

Hola a todos, sucede que estoy tratando de crear un cliente de WebService desde File-->New-->Other-->webservice-->wsdl Importer (Delphi 7), la dirección de la especificación del WSDL es: https://www2.ventanillaunica.gob.mx/...veService?wsdl Así se genera mi unidad y tras poner el componente HTTPRIO y configurar las propiedades WSDLLOCATION, SERVICE y PORT, agregando mi nueva unidad en el uses de mi unidad principal, procedo a compilar pero obtengo una serie de errores que hacen referencia al tipo de Parametros que estoy enviando en mis peticiones al WebService. ¿Eso indica que el WSDL es incorrecto, que falta definir algo, o que tengo que hacer algun tipo de modificación a la unidad de mi Webserver-cliente recien generado? Por lo que he leído en tutoriales acerca de la creación de Clientes de WebServices, todo deberia ser tan transparente como indicar la dirección del WSDL y unos cuantos Clicks. Anexo el código generado y los errores arrojados al momento de compilar. Gracias de antemano por la ayuda.

Errores:
[Error] RecibirCoveService.pas(45): Undeclared identifier: 'solicitarRecibirCoveServicio'
[Error] RecibirCoveService.pas(45): Undeclared identifier: 'solicitarRecibirCoveServicioResponse'
[Error] RecibirCoveService.pas(46): Undeclared identifier: 'solicitarRecibirRelacionFacturasIAServicio'
[Error] RecibirCoveService.pas(46): Undeclared identifier: 'solicitarRecibirRelacionFacturasIAServicioResponse'
[Error] RecibirCoveService.pas(47): Undeclared identifier: 'solicitarRecibirRelacionFacturasNoIAServicio'
[Error] RecibirCoveService.pas(47): Undeclared identifier: 'solicitarRecibirRelacionFacturasNoIAServicioResponse'
[Fatal Error] AAADAMM3.dpr(139): Could not compile used unit 'RecibirCoveService.pas'



Código:
// ************************************************************************ //
// The types declared in this file were generated from data read from the
// WSDL File described below:
// WSDL     : https://www2.ventanillaunica.gob.mx/ventanilla/RecibirCoveService?wsdl
// Encoding : UTF-8
// Version  : 1.0
// (30/11/2011 01:28:50 p.m. - 1.33.2.5)
// ************************************************************************ //

unit RecibirCoveService;

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 Borland types; however, they could also
  // indicate incorrect WSDL documents that failed to declare or import a schema type.
  // ************************************************************************ //
  // !:solicitarRecibirCoveServicio - "http://www.ventanillaunica.gob.mx/cove/ws/oxml/"
  // !:solicitarRecibirCoveServicioResponse - "http://www.ventanillaunica.gob.mx/cove/ws/oxml/"
  // !:solicitarRecibirRelacionFacturasIAServicio - "http://www.ventanillaunica.gob.mx/cove/ws/oxml/"
  // !:solicitarRecibirRelacionFacturasIAServicioResponse - "http://www.ventanillaunica.gob.mx/cove/ws/oxml/"
  // !:solicitarRecibirRelacionFacturasNoIAServicio - "http://www.ventanillaunica.gob.mx/cove/ws/oxml/"
  // !:solicitarRecibirRelacionFacturasNoIAServicioResponse - "http://www.ventanillaunica.gob.mx/cove/ws/oxml/"


  // ************************************************************************ //
  // Namespace : http://www.ventanillaunica.gob.mx/cove/ws/service/
  // soapAction: http://www.ventanillaunica.gob.mx/%operationName%
  // transport : http://schemas.xmlsoap.org/soap/http
  // style     : document
  // binding   : IReceptorEndpointBinding
  // service   : RecibirCoveService
  // port      : IReceptorBinding
  // URL       : https://www2.ventanillaunica.gob.mx:5002/ventanilla/RecibirCoveService
  // ************************************************************************ //
  IReceptor = interface(IInvokable)
  ['{65A41149-B829-ABA1-4D2E-609AEDEE08A2}']
    function  RecibirCove(const peticion: solicitarRecibirCoveServicio): solicitarRecibirCoveServicioResponse; stdcall;
    function  RecibirRelacionFacturasIA(const peticion: solicitarRecibirRelacionFacturasIAServicio): solicitarRecibirRelacionFacturasIAServicioResponse; stdcall;
    function  RecibirRelacionFacturasNoIA(const peticion: solicitarRecibirRelacionFacturasNoIAServicio): solicitarRecibirRelacionFacturasNoIAServicioResponse; stdcall;
  end;

function GetIReceptor(UseWSDL: Boolean=System.False; Addr: string=''; HTTPRIO: THTTPRIO = nil): IReceptor;


implementation

function GetIReceptor(UseWSDL: Boolean; Addr: string; HTTPRIO: THTTPRIO): IReceptor;
const
  defWSDL = 'https://www2.ventanillaunica.gob.mx/ventanilla/RecibirCoveService?wsdl';
  defURL  = 'https://www2.ventanillaunica.gob.mx:5002/ventanilla/RecibirCoveService';
  defSvc  = 'RecibirCoveService';
  defPrt  = 'IReceptorBinding';
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 IReceptor);
    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(IReceptor), 'http://www.ventanillaunica.gob.mx/cove/ws/service/', 'UTF-8');
  InvRegistry.RegisterDefaultSOAPAction(TypeInfo(IReceptor), 'http://www.ventanillaunica.gob.mx/%operationName%');
  InvRegistry.RegisterInvokeOptions(TypeInfo(IReceptor), ioDocument);
  InvRegistry.RegisterInvokeOptions(TypeInfo(IReceptor), ioLiteral);

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
webservice con Sesion comba Internet 6 11-12-2020 12:04:18
WebService y parametros AdrianD JAVA 4 05-09-2010 14:41:41
Problema con un cliente de un webservice vejerf Internet 2 09-03-2009 10:27:30
WebService y D4 Nose Internet 1 02-08-2005 22:18:23


La franja horaria es GMT +2. Ahora son las 08:02:43.


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