Ir al contenido


Foto

obtener clases del WSDL


  • Por favor identifícate para responder
3 respuestas en este tema

#1 jebojeda

jebojeda

    Newbie

  • Miembros
  • Pip
  • 1 mensajes

Escrito 24 mayo 2022 - 06:31

hola a todos,

 

es para generar las clases apartir del wsdl de un link con el gestor del delphi 10.4, especificamente:

 

https://sifen-test.s...ecibe.wsdl?wsdl

 

y me genera un error que dice:

 

WSDL Import Error:

....

 

se esperaba una cadena literal, pero no se encontraron las comillas de apertura.

 

Linea 21

               "<center><object class]"

 

 

es para la facturacion electronica en Paraguay.

 

no se si estoy omitiendo algo o en el archivo hay algun tipo de error...

(la vrd. soy nuevo en esto de consumir WS, soap, xml etc.)

 

y aguardo vuestro comentario/orientación al respecto.

desde ya muchas gracias!

 


  • 0

#2 egostar

egostar

    missing my father, I love my mother.

  • Administrador
  • 14.446 mensajes
  • LocationMéxico

Escrito 24 mayo 2022 - 07:53

Hola jebojeda, bienvenido a DelphiAccess

 

Quise entrar a ver el WSDL desde SoapIU para descartar un fallo en el proceso de Importar el WSDL de Delphi y me da el mismo error, 

 

 

Error loading [https://sifen-test.set.gov.py/de/ws/sync/recibe.wsdl?wsdl]: org.apache.xmlbeans.XmlException: org.apache.xmlbeans.XmlException: error: Open quote is expected for attribute "classId" associated with an element type "object"

 

 

 

Me parece que es un fallo en el WSDL o hace falta algo, por ejemplo Usuario y contraseña para inicio de sesión.

 

Saludos


  • 0

#3 JCZ

JCZ

    Newbie

  • Miembros
  • Pip
  • 5 mensajes

Escrito 05 septiembre 2022 - 11:50

hola a todos,

 

es para generar las clases apartir del wsdl de un link con el gestor del delphi 10.4, especificamente:

 

https://sifen-test.s...ecibe.wsdl?wsdl

 

y me genera un error que dice:

 

WSDL Import Error:

....

 

se esperaba una cadena literal, pero no se encontraron las comillas de apertura.

 

Linea 21

               "<center><object class]"

 

 

es para la facturacion electronica en Paraguay.

 

no se si estoy omitiendo algo o en el archivo hay algun tipo de error...

(la vrd. soy nuevo en esto de consumir WS, soap, xml etc.)

 

y aguardo vuestro comentario/orientación al respecto.

desde ya muchas gracias!

Para tener acceso al wsdl debes tener un certificado habilitado por la SET, luego te sugiero que descargues todos los wsdl y lo coloques en una carpeta para que el asistente del Delphi te lo genere sin problemas.


  • 0

#4 JCZ

JCZ

    Newbie

  • Miembros
  • Pip
  • 5 mensajes

Escrito 08 septiembre 2022 - 06:30

Para tener acceso al wsdl debes tener un certificado habilitado por la SET, luego te sugiero que descargues todos los wsdl y lo coloques en una carpeta para que el asistente del Delphi te lo genere sin problemas.


delphi
  1. // ************************************************************************ //
  2. // The types declared in this file were generated from data read from the
  3. // WSDL File described below:
  4. // WSDL : C:\Users\acer\OneDrive\Escritorio\SIGC\Nuevos\Schemas\recibe.wsdl
  5. // >Import : C:\Users\acer\OneDrive\Escritorio\SIGC\Nuevos\Schemas\recibe.wsdl>0
  6. // Encoding : UTF-8
  7. // Version : 1.0
  8. // (08/09/2022 20:28:40 - - $Rev: 106319 $)
  9. // ************************************************************************ //
  10.  
  11. unit recibe;
  12.  
  13. interface
  14.  
  15. uses Soap.InvokeRegistry, Soap.SOAPHTTPClient, System.Types, Soap.XSBuiltIns;
  16.  
  17. type
  18.  
  19. // ************************************************************************ //
  20. // The following types, referred to in the WSDL document are not being represented
  21. // in this file. They are either aliases[@] of other types represented or were referred
  22. // to but never[!] declared in the document. The types from the latter category
  23. // typically map to predefined/known XML or Embarcadero types; however, they could also
  24. // indicate incorrect WSDL documents that failed to declare or import a schema type.
  25. // ************************************************************************ //
  26. // !:rEnviDe - "http://ekuatia.set.gov.py/sifen/xsd"[Lit][]
  27. // !:rRetEnviDe - "http://ekuatia.set.gov.py/sifen/xsd"[Lit][]
  28.  
  29.  
  30. // ************************************************************************ //
  31. // Name : de-ws-sync-recibe
  32. // Namespace : http://ekuatia.set.gov.py/sifen/xsd
  33. // transport : http://schemas.xmlsoap.org/soap/http
  34. // style : document
  35. // use : literal
  36. // binding : de-ws-sync-recibeSoap12
  37. // service : de-ws-sync-recibeService
  38. // port : de-ws-sync-recibeSoap12
  39. // URL : https://sifen-test.set.gov.py/de/ws/sync/recibe.wsdl
  40. // ************************************************************************ //
  41. de_ws_sync_recibe = interface(IInvokable)
  42. ['{EF792EA7-E3B8-0E3A-8618-5DFCAD90BA67}']
  43.  
  44. // Cannot unwrap:
  45. // - Input part does not refer to an element
  46. // - Output part does not refer to an element
  47. function rEnviDe(const rEnviDe: rEnviDe): rRetEnviDe; stdcall;
  48. end;
  49.  
  50. function Getde_ws_sync_recibe(UseWSDL: Boolean=System.False; Addr: string=''; HTTPRIO: THTTPRIO = nil): de_ws_sync_recibe;
  51.  
  52.  
  53. implementation
  54. uses System.SysUtils;
  55.  
  56. function Getde_ws_sync_recibe(UseWSDL: Boolean; Addr: string; HTTPRIO: THTTPRIO): de_ws_sync_recibe;
  57. const
  58. defWSDL = 'C:\Users\acer\OneDrive\Escritorio\SIGC\Nuevos\Schemas\recibe.wsdl';
  59. defURL = 'https://sifen-test.set.gov.py/de/ws/sync/recibe.wsdl';
  60. defSvc = 'de-ws-sync-recibeService';
  61. defPrt = 'de-ws-sync-recibeSoap12';
  62. var
  63. RIO: THTTPRIO;
  64. begin
  65. Result := nil;
  66. if (Addr = '') then
  67. begin
  68. if UseWSDL then
  69. Addr := defWSDL
  70. else
  71. Addr := defURL;
  72. end;
  73. if HTTPRIO = nil then
  74. RIO := THTTPRIO.Create(nil)
  75. else
  76. RIO := HTTPRIO;
  77. try
  78. Result := (RIO as de_ws_sync_recibe);
  79. if UseWSDL then
  80. begin
  81. RIO.WSDLLocation := Addr;
  82. RIO.Service := defSvc;
  83. RIO.Port := defPrt;
  84. end else
  85. RIO.URL := Addr;
  86. finally
  87. if (Result = nil) and (HTTPRIO = nil) then
  88. RIO.Free;
  89. end;
  90. end;
  91.  
  92.  
  93. initialization
  94. { de-ws-sync-recibe }
  95. InvRegistry.RegisterInterface(TypeInfo(de_ws_sync_recibe), 'http://ekuatia.set.gov.py/sifen/xsd', 'UTF-8', '', 'de-ws-sync-recibe');
  96. InvRegistry.RegisterDefaultSOAPAction(TypeInfo(de_ws_sync_recibe), '');
  97. InvRegistry.RegisterInvokeOptions(TypeInfo(de_ws_sync_recibe), ioDocument);
  98. InvRegistry.RegisterInvokeOptions(TypeInfo(de_ws_sync_recibe), ioLiteral);
  99. InvRegistry.RegisterInvokeOptions(TypeInfo(de_ws_sync_recibe), ioSOAP12);
  100.  
  101. end.

Archivos adjuntos


  • 0




IP.Board spam blocked by CleanTalk.