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

Respuesta
 
Herramientas Buscar en Tema Desplegado
  #1  
Antiguo 08-01-2019
rafacarpi rafacarpi is offline
Miembro
 
Registrado: feb 2017
Ubicación: Sevilla - España
Posts: 17
Poder: 0
rafacarpi Va por buen camino
La url del WSDL es http://portafirmas.dipusevilla.es/pf...ryService?wsdl


El resultado de usar el WSDL Importer de Delphi 7 devuelve este resultado:



Código Delphi [-]
<div style="margin:20px; margin-top:5px">
  <div class="smallfont" style="margin-bottom:2px">Código:div>
  
class="alt2" dir="ltr" style="
    margin: 0px;
    padding: 6px;
    border: 1px inset;
    width: 90%;
    height: 498px;
    text-align: left;
    overflow: auto">// ************************************************************************ //
// The types declared in this file were generated from data read from the
// WSDL File described below:
// WSDL     : http://portafirmas.dipusevilla.es/pfirma26/servicesv2/QueryService?wsdl
// Encoding : UTF-8
// Version  : 1.0
// (08/01/2019 10:59:16 - 1.33.2.5)
// ************************************************************************ //

unit QueryService1;

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.
  // ************************************************************************ //
  // !:downloadSign    - "urn:juntadeandalucia:cice:pfirma:query:request:v2.0"
  // !:downloadSignResponse - "urn:juntadeandalucia:cice:pfirma:query:request:v2.0"
  // !:exceptionInfo   - "urn:juntadeandalucia:cice:pfirma:type:v2.0"
  // !:queryUsers      - "urn:juntadeandalucia:cice:pfirma:query:request:v2.0"
  // !:queryUsersResponse - "urn:juntadeandalucia:cice:pfirma:query:request:v2.0"
  // !:queryDocumentTypes - "urn:juntadeandalucia:cice:pfirma:query:request:v2.0"
  // !:queryDocumentTypesResponse - "urn:juntadeandalucia:cice:pfirma:query:request:v2.0"
  // !:downloadDocument - "urn:juntadeandalucia:cice:pfirma:query:request:v2.0"
  // !:downloadDocumentResponse - "urn:juntadeandalucia:cice:pfirma:query:request:v2.0"
  // !:queryStates     - "urn:juntadeandalucia:cice:pfirma:query:request:v2.0"
  // !:queryStatesResponse - "urn:juntadeandalucia:cice:pfirma:query:request:v2.0"
  // !:queryRequest    - "urn:juntadeandalucia:cice:pfirma:query:request:v2.0"
  // !:queryRequestResponse - "urn:juntadeandalucia:cice:pfirma:query:request:v2.0"
  // !:queryJobs       - "urn:juntadeandalucia:cice:pfirma:query:request:v2.0"
  // !:queryJobsResponse - "urn:juntadeandalucia:cice:pfirma:query:request:v2.0"
  // !:queryComments   - "urn:juntadeandalucia:cice:pfirma:query:request:v2.0"
  // !:queryCommentsResponse - "urn:juntadeandalucia:cice:pfirma:query:request:v2.0"
  // !:queryHistoric   - "urn:juntadeandalucia:cice:pfirma:query:request:v2.0"
  // !:queryHistoricResponse - "urn:juntadeandalucia:cice:pfirma:query:request:v2.0"


  // ************************************************************************ //
  // Namespace : urn:juntadeandalucia:cice:pfirma:query:v2.0
  // transport : http://schemas.xmlsoap.org/soap/http
  // style     : document
  // binding   : QueryServiceServiceSoapBinding
  // service   : QueryServiceService
  // port      : QueryServicePort
  // URL       : http://portafirmas.dipusevilla.es/pfirma26/servicesv2/QueryService
  // ************************************************************************ //
  QueryService = interface(IInvokable)
  ['{29BE8E24-F459-14CA-9EFA-02D7E5903009}']
    function  downloadSign(const downloadSign: downloadSign): downloadSignResponse; stdcall;
    function  queryUsers(const queryUsers: queryUsers): queryUsersResponse; stdcall;
    function  queryDocumentTypes(const queryDocumentTypes: queryDocumentTypes): queryDocumentTypesResponse; stdcall;
    function  downloadDocument(const downloadDocument: downloadDocument): downloadDocumentResponse; stdcall;
    function  queryStates(const queryStates: queryStates): queryStatesResponse; stdcall;
    function  queryRequest(const queryRequest: queryRequest): queryRequestResponse; stdcall;
    function  queryJobs(const queryJobs: queryJobs): queryJobsResponse; stdcall;
    function  queryComments(const queryComments: queryComments): queryCommentsResponse; stdcall;
    function  queryHistoric(const queryHistoric: queryHistoric): queryHistoricResponse; stdcall;
  end;

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


implementation

function GetQueryService(UseWSDL: Boolean; Addr: string; HTTPRIO: THTTPRIO): QueryService;
const
  defWSDL = 'http://portafirmas.dipusevilla.es/pfirma26/servicesv2/QueryService?wsdl';
  defURL  = 'http://portafirmas.dipusevilla.es/pfirma26/servicesv2/QueryService';
  defSvc  = 'QueryServiceService';
  defPrt  = 'QueryServicePort';
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 QueryService);
    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(QueryService), 'urn:juntadeandalucia:cice:pfirma:query:v2.0', 'UTF-8');
  InvRegistry.RegisterDefaultSOAPAction(TypeInfo(QueryService), '');
  InvRegistry.RegisterInvokeOptions(TypeInfo(QueryService), ioDocument);
  InvRegistry.RegisterInvokeOptions(TypeInfo(QueryService), ioLiteral);

end.
div>

En el primer bloque no es capaz de definir los tipos:

Código Delphi [-]
<div style="margin:20px; margin-top:5px">
  <div class="smallfont" style="margin-bottom:2px">Código:div>
  
class="alt2" dir="ltr" style="
    margin: 0px;
    padding: 6px;
    border: 1px inset;
    width: 90%;
    height: 434px;
    text-align: left;
    overflow: auto">// ************************************************************************ //
  // 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.
  // ************************************************************************ //
  // !:downloadSign    - "urn:juntadeandalucia:cice:pfirma:query:request:v2.0"
  // !:downloadSignResponse - "urn:juntadeandalucia:cice:pfirma:query:request:v2.0"
  // !:exceptionInfo   - "urn:juntadeandalucia:cice:pfirma:type:v2.0"
  // !:queryUsers      - "urn:juntadeandalucia:cice:pfirma:query:request:v2.0"
  // !:queryUsersResponse - "urn:juntadeandalucia:cice:pfirma:query:request:v2.0"
  // !:queryDocumentTypes - "urn:juntadeandalucia:cice:pfirma:query:request:v2.0"
  // !:queryDocumentTypesResponse - "urn:juntadeandalucia:cice:pfirma:query:request:v2.0"
  // !:downloadDocument - "urn:juntadeandalucia:cice:pfirma:query:request:v2.0"
  // !:downloadDocumentResponse - "urn:juntadeandalucia:cice:pfirma:query:request:v2.0"
  // !:queryStates     - "urn:juntadeandalucia:cice:pfirma:query:request:v2.0"
  // !:queryStatesResponse - "urn:juntadeandalucia:cice:pfirma:query:request:v2.0"
  // !:queryRequest    - "urn:juntadeandalucia:cice:pfirma:query:request:v2.0"
  // !:queryRequestResponse - "urn:juntadeandalucia:cice:pfirma:query:request:v2.0"
  // !:queryJobs       - "urn:juntadeandalucia:cice:pfirma:query:request:v2.0"
  // !:queryJobsResponse - "urn:juntadeandalucia:cice:pfirma:query:request:v2.0"
  // !:queryComments   - "urn:juntadeandalucia:cice:pfirma:query:request:v2.0"
  // !:queryCommentsResponse - "urn:juntadeandalucia:cice:pfirma:query:request:v2.0"
  // !:queryHistoric   - "urn:juntadeandalucia:cice:pfirma:query:request:v2.0"
  // !:queryHistoricResponse - "urn:juntadeandalucia:cice:pfirma:query:request:v2.0"
div>

Pero si miramos el WSDL directamente en un navegador vemos que si aparece la url de un xsd donde se definen los tipos.

Código:
<xsd:import namespace="urn:juntadeandalucia:cice:pfirma:query:request:v2.0" schemaLocation="http://portafirmas.dipusevilla.es/pfirma26/servicesv2/QueryService?xsd=query.xsd" />
Y en ese XSD si están definidos los tipos.

El problema es que no es el primer WebService que consumo, pero si es el primero que tengo problemas. He incorporados los XSD a mano, guardandolos y usando el XML Data Binding para generar las interfaces. Pero el Web Service me responde con errores poco descriptivos. Lo último ha sido probar construyendo el XML de llamada a "mano" y aun así me responde con mensajes de error. Pongo un ejemplo más descriptivo:

Uno de los metodos a llamar es queryDocumentTypes usando la aplicación SopaUI conseguí montar un proyecto y hacer la llamada a esa funcion y vi el XML que usaba en la llamada y lo monté yo en delphi. El XML tiene esta pinta:

Código:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:juntadeandalucia:cice:pfirma:query:request:v2.0">
   <soapenv:Header/>
   <soapenv:Body>
      <urn:queryDocumentTypes>
         <query></query>
      </urn:queryDocumentTypes>
   </soapenv:Body>
</soapenv:Envelope>
Bueno pues colocándolo igual a mi desde Delphi me retorna el que se puede ver: http://www.clubdelphi.com/foros/atta...1&d=1546943005

Llevo casi una semana dándole vueltas y no se como abordarlo, es algo que he heredado y no hay ni documentación ni nadie a quien dirigirme, he escrito tanto al ministerio como a la consejeria pero no contestan.

Gracias a todos por el interés.
Imágenes Adjuntas
Tipo de Archivo: jpg Error1.jpg (23,4 KB, 4 visitas)
Responder Con Cita
  #2  
Antiguo 08-01-2019
[egostar] egostar is offline
Registrado
 
Registrado: feb 2006
Posts: 6.557
Poder: 25
egostar Va camino a la fama
Cita:
Empezado por rafacarpi Ver Mensaje
Llevo casi una semana dándole vueltas y no se como abordarlo, es algo que he heredado y no hay ni documentación ni nadie a quien dirigirme, he escrito tanto al ministerio como a la consejeria pero no contestan.

Gracias a todos por el interés.
Hola,

Cuando todo lo que intentento hacer ( SOAP con Delphi ) y no puedo resolverlo por una u otra causa, acudo a un plan B ( cURL ) sí, un poco más de trabajo porque se tiene que crear el SOAP a "manita" pero te podría "salvar el pellejo".

Mira éste tutorial a ver si te da una idea.

Saludos
__________________
"La forma de empezar es dejar de hablar y empezar a hacerlo." - Walt Disney
Responder Con Cita
  #3  
Antiguo 09-01-2019
rafacarpi rafacarpi is offline
Miembro
 
Registrado: feb 2017
Ubicación: Sevilla - España
Posts: 17
Poder: 0
rafacarpi Va por buen camino
Muchísimas gracias egostar le voy a echar un vistazo a ver que tal.

Cita:
Empezado por egostar Ver Mensaje
Hola,

Cuando todo lo que intentento hacer ( SOAP con Delphi ) y no puedo resolverlo por una u otra causa, acudo a un plan B ( cURL ) sí, un poco más de trabajo porque se tiene que crear el SOAP a "manita" pero te podría "salvar el pellejo".

Mira éste tutorial a ver si te da una idea.

Saludos
Responder Con Cita
  #4  
Antiguo 09-01-2019
Avatar de Neftali [Germán.Estévez]
Neftali [Germán.Estévez] Neftali [Germán.Estévez] is offline
[becario]
 
Registrado: jul 2004
Ubicación: Barcelona - España
Posts: 18.286
Poder: 10
Neftali [Germán.Estévez] Es un diamante en brutoNeftali [Germán.Estévez] Es un diamante en brutoNeftali [Germán.Estévez] Es un diamante en bruto
Si la web estuviera accesible podríamos hacer alguna prueba, inclkuso con versiones posteriores del "WSDL importer", pero me está dando como caída.
__________________
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.
Responder Con Cita
  #5  
Antiguo 09-01-2019
Avatar de Casimiro Notevi
Casimiro Notevi Casimiro Notevi is offline
Moderador
 
Registrado: sep 2004
Ubicación: En algún lugar.
Posts: 32.044
Poder: 10
Casimiro Notevi Tiene un aura espectacularCasimiro Notevi Tiene un aura espectacular
Y a ver ahora si con el cambio de gobierno lo cambian todo, no sería de extrañar.
Responder Con Cita
  #6  
Antiguo 10-01-2019
rafacarpi rafacarpi is offline
Miembro
 
Registrado: feb 2017
Ubicación: Sevilla - España
Posts: 17
Poder: 0
rafacarpi Va por buen camino
No es que esté caida, es que pertenece a un dominio privado en el que hay que loguearse y eso no lo puedo pasar, pero si os puedo pasar el WSDL en fichero, os lo adjunto. Gracias a todos por el interés.
Archivos Adjuntos
Tipo de Archivo: rar QueryService_WSDL.rar (1,3 KB, 2 visitas)
Responder Con Cita
  #7  
Antiguo 15-01-2019
rafacarpi rafacarpi is offline
Miembro
 
Registrado: feb 2017
Ubicación: Sevilla - España
Posts: 17
Poder: 0
rafacarpi Va por buen camino
Muchisimas gracias egostar he conseguido resolverlo con el tutorial y descargando la libreria de Open SSL 1.1.1a.


Un tutorial muy interesante y con multiples aplicaciones con cURL.


Gracias.



Cita:
Empezado por egostar Ver Mensaje
Hola,

Cuando todo lo que intentento hacer ( SOAP con Delphi ) y no puedo resolverlo por una u otra causa, acudo a un plan B ( cURL ) sí, un poco más de trabajo porque se tiene que crear el SOAP a "manita" pero te podría "salvar el pellejo".

Mira éste tutorial a ver si te da una idea.

Saludos
Responder Con Cita
  #8  
Antiguo 15-01-2019
[egostar] egostar is offline
Registrado
 
Registrado: feb 2006
Posts: 6.557
Poder: 25
egostar Va camino a la fama
Cita:
Empezado por rafacarpi Ver Mensaje
Muchisimas gracias egostar he conseguido resolverlo con el tutorial y descargando la libreria de Open SSL 1.1.1a.


Un tutorial muy interesante y con multiples aplicaciones con cURL.


Gracias.
Me alegra mucho, ya valió la pena haber hecho ese tutorial.

Saludos
__________________
"La forma de empezar es dejar de hablar y empezar a hacerlo." - Walt Disney
Responder Con Cita
Respuesta



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
Port Knocking ElChicoNuevo Servers 3 28-10-2018 10:54:11
Port Forward no me funciona winzo Varios 0 09-03-2014 06:59:39
Andalucía gastará 225 millones en pagar a 1.300 exempleados de empresas subvencionada fjcg02 La Taberna 8 17-10-2012 10:08:08
Serial Port JoseFco Varios 46 22-03-2008 02:38:49
Busco ordenador o portátil Arcioneo Varios 2 18-07-2006 13:49:32


La franja horaria es GMT +2. Ahora son las 18:02:38.


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