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">
unit QueryService1;
interface
uses InvokeRegistry, SOAPHTTPClient, Types, XSBuiltIns;
type
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">
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.