Ver Mensaje Individual
  #6  
Antiguo 08-01-2019
rafacarpi rafacarpi is offline
Miembro
 
Registrado: feb 2017
Ubicación: Sevilla - España
Posts: 17
Reputación: 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