FTP | CCD | Buscar | Trucos | Trabajo | Foros |
|
Registrarse | FAQ | Miembros | Calendario | Guía de estilo | Temas de Hoy |
|
Herramientas | Buscar en Tema | Desplegado |
#1
|
||||
|
||||
Obtener fecha de un web service soap
Estimados.. Recurro a uds luego de un dia tratando de encontrar el problema( pero en realidad, el problema soy yo, que no se aun utilizar muy bien las clases y los web services ).
Necesito obtener una fecha resultado del wbs que presento a continuacion. El problema es que no estoy muy seguro como instanciarlo, ejecutarlo y obtener el resultado. El wbs es el siguiente
Y lo tengo "instanciado" en mi aplicacion de esta manera.
Muchas gracias de antemano por su colabaracion.. Saludos |
#2
|
||||
|
||||
Hola, Ibidi.
Lo primero que tienes que hacer es definir la fecha correctamente. Como en el web service está definida asi:
Tendrás que definirla en Delphi también como:
Ahora bien, GetwsultimocierreSoapPort devuelve un wsultimocierreSoapPort (tu variable ws_cierre) que tiene una función execute, con un parámetro de tipo wsultimocierre_Execute, que devuelve un tipo wsultimocierre_ExecuteResponse, que tiene una propiedad Salida de tipo wsultimocierreout y este a su vez es el que tiene la propiedad Fecha, creo que al final debería ser más o menos así:
Creo que más o menos sería así, pero tengo algo oxidado el acceso a webservices en Delphi (como otros muchos males del mundo, ahora estoy con Java por necesidad), pero creo que puede orientarte un poco Saludos |
#3
|
||||
|
||||
Un código como este debería ser suficiente:
El tipo TXSDate está defindo en la unit Soap.XSBuiltIns http://docwiki.embarcadero.com/Libra...iltIns.TXSDate
__________________
Germán Estévez => Web/Blog Guía de estilo, Guía alternativa Utiliza TAG's en tus mensajes. Contactar con el Clubdelphi P.D: Más tiempo dedicado a la pregunta=Mejores respuestas. |
#4
|
||||
|
||||
MUCHISIMAS GRACIAS a ambos !!
Funciono perfecto de ambas maneras. Ahora sigo en otra pregunta , porque van ambas concatenadas. |
#5
|
||||
|
||||
Luego de obtener esa fecha, debo llamar a otro ws que sigue a continuacion. Es para obtener cotizaciones de las monedas extranjeras a esa fecha.
Me interesa solo la cotizacion del Dolar, pero no me doy cuenta si hay que pasarle algo como parametro ( y como ), o si retorna todas las monedas que retorna el ws. Muchisimas gracias.. me salvan la vida... El codigo del ws es este.
|
#6
|
||||
|
||||
Revisando por encima, parece que wsbcucotizacionesin, debes asignarlo tú.
De todas formas, para no estar probando, deberías buscar si hay documentación.
__________________
Germán Estévez => Web/Blog Guía de estilo, Guía alternativa Utiliza TAG's en tus mensajes. Contactar con el Clubdelphi P.D: Más tiempo dedicado a la pregunta=Mejores respuestas. |
#7
|
||||
|
||||
Gracias German por responder. He estado buscando informacion pero al ser un organismo del estado, no esta tan facil de encontrar si hubiera, por eso
fue que puse el post original . No tengo ni idea como hacer lo que me pides, pero ya vere.. habra que ir tanteando como se hace, a prueba y error. Saludos |
#8
|
||||
|
||||
Cita:
El parámetro de entrada es de tipo wsbcucotizaciones_Execute y la salida de tipo wsbcucotizaciones_ExecuteResponse. Si te centras en la respuesta, tiene una property:
A su vez wsbcucotizacionesout tiene 2 propiedades:
respuestastatus parece por el nombre cómo ha ido la petición y datoscotizaciones es un array del tipo datoscotizaciones_dato, que parece ser lo que tú necesitas:
Con el parámetro de entrada debes hacer lo mismo. wsbcucotizaciones_Execute tiene una propiedad:
Y el tipo wsbcucotizacionesin tiene la siguiente estructura:
Tiene sentido, que para solicittar una cotización debas añadir unas fechas y una moneda. El Grupo, ya no se que es.
__________________
Germán Estévez => Web/Blog Guía de estilo, Guía alternativa Utiliza TAG's en tus mensajes. Contactar con el Clubdelphi P.D: Más tiempo dedicado a la pregunta=Mejores respuestas. |
#9
|
||||
|
||||
No es muy complicado.
Un código como este conecta y devuelve resultados:
Un código como este devuelve algun resultado con sentido. Si accedes a la primera:
__________________
Germán Estévez => Web/Blog Guía de estilo, Guía alternativa Utiliza TAG's en tus mensajes. Contactar con el Clubdelphi P.D: Más tiempo dedicado a la pregunta=Mejores respuestas. |
#10
|
||||
|
||||
Wow! Qué gran trabajo, Germán... Yo me había atorado un poco y está todo más que claro...
Gracias y un saludo |
#11
|
||||
|
||||
EXCELENTE es poco GERMAN...
Muchisimas gracias !!! Soy bastante inutil y neofito con respecto a los webservices pero con ese nivel de detalle tuyo , es muy facil de comprender. Mi mayor estimacion para ti y mi respeto. Saludos y felicias fiestas ... |
#12
|
||||
|
||||
FELIZ AÑO PARA TODOS LOS FORISTAS !!!
Estimados, vuelvo a molestar para preguntar porque puede ser que estos webservices que tan bien German ayudo a que me funcionara, no se ejecute bien en Windows 7 y funcione perfecto en WIN 10 ?? Solamente me dice que no se pudo establecer comunicacion con el servidor.. |
#13
|
||||
|
||||
Me da la impresión de que tiene que ver con los protocolos de comunicación.
Lo primero es analizarlo utilizando la web: https://www.ssllabs.com/ssltest/ Accede a la web y analiza tu servidor: https://cotizaciones.bcu.gub.uy/wscotizaciones/servlet/ Luego, aplicando esto que tienes aquí, ya sea mediante los parches o creando las claves del registro, te debería funcionar. Yo he conseguido que desaparezca el error y acced sin problemas. https://support.microsoft.com/en-us/...rotocols-in-wi Revisa también este bug. Ahí hay soluciones que te ayudarán: https://quality.embarcadero.com/browse/RSP-31406
__________________
Germán Estévez => Web/Blog Guía de estilo, Guía alternativa Utiliza TAG's en tus mensajes. Contactar con el Clubdelphi P.D: Más tiempo dedicado a la pregunta=Mejores respuestas. Última edición por Neftali [Germán.Estévez] fecha: 20-01-2021 a las 09:05:42. |
#14
|
||||
|
||||
Muchas gracias German.
Aun no he podido probarlo en un pc con W7 pero apenas pueda, comento como me fue. Saludos !! |
|
|
Temas Similares | ||||
Tema | Autor | Foro | Respuestas | Último mensaje |
Respuesta multipart de Web Service SOAP | alejozd | Internet | 0 | 27-06-2018 00:12:19 |
Web Service SOAP con Delphi 5 | socger | Internet | 7 | 26-07-2012 22:25:51 |
SOAP Web Service | foetus | JAVA | 3 | 19-02-2009 16:50:44 |
cliente Web service SOAP php | papulo | PHP | 0 | 13-02-2009 11:41:16 |
Version SOAP en Web Service D7 | Luis Heriberto | Internet | 0 | 06-09-2006 00:07:16 |
|