![]() |
|
|
Регистрация | << Правила форума >> | FAQ | Пользователи | Календарь | Поиск | Сообщения за сегодня | Все разделы прочитаны |
![]() |
|
Опции темы | Поиск в этой теме | Опции просмотра |
#1
|
|||
|
|||
![]() Всем доброго времени суток!
Помогите, пожалуйста, решить проблему. Есть небольшой веб-сервис. Вот его wsdl: Код HTML:
|
#2
|
|||
|
|||
![]() Пытаюсь втянуть wsdl-ссылку в Delphi 2010 через WSDL-Importer (File->New->WSDL-Importer).
Втянутый в Delphi сервис выглядит так: Код:
// ************************************************************************ // // The types declared in this file were generated from data read from the // WSDL File described below: // // Encoding : UTF-8 // Version : 1.0 // (02.08.2013 17:07:34 - - $Rev: 24171 $) // ************************************************************************ // unit vaphoto; 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 Embarcadero types; however, they could also // indicate incorrect WSDL documents that failed to declare or import a schema type. // ************************************************************************ // // !:string - "http://www.w3.org/2001/XMLSchema"[Lit][Gbl] // !:string - ""[Lit][] param_1 = type string; { "urn:vaphoto"[Lit][GblElm] } param_2 = type string; { "urn:vaphoto"[GblElm] } // ************************************************************************ // // Namespace : urn:vaphoto // soapAction: urn:vaphoto/getFileList // transport : http://schemas.xmlsoap.org/soap/http // style : document // binding : vaphotoBinding // service : vaphotoService // port : vaphotoPort // URL : http://catalog.тра-ля-ля.com/тра-ля-ля.php // ************************************************************************ // vaphotoPortType = interface(IInvokable) ['{BCC8D094-20D9-D36C-1801-68DAD324A546}'] // Cannot unwrap: // - Input message has more than one part // - Output part does not refer to an element function getFileList(const dir: param_1; const partcode: param_2): string; stdcall; end; function GetvaphotoPortType(UseWSDL: Boolean=System.False; Addr: string=''; HTTPRIO: THTTPRIO = nil): vaphotoPortType; implementation uses SysUtils; function GetvaphotoPortType(UseWSDL: Boolean; Addr: string; HTTPRIO: THTTPRIO): vaphotoPortType; const defWSDL = 'http://catalog.тра-ля-ля.com/тра-ля-ля.wsdl'; defURL = 'http://catalog.тра-ля-ля.com/тра-ля-ля.php'; defSvc = 'vaphotoService'; defPrt = 'vaphotoPort'; 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 vaphotoPortType); 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(vaphotoPortType), 'urn:vaphoto', 'UTF-8'); InvRegistry.RegisterDefaultSOAPAction(TypeInfo(vaphotoPortType), 'urn:vaphoto/getFileList'); InvRegistry.RegisterInvokeOptions(TypeInfo(vaphotoPortType), ioDocument); InvRegistry.RegisterInvokeOptions(TypeInfo(vaphotoPortType), ioLiteral); RemClassRegistry.RegisterXSInfo(TypeInfo(param_1), 'urn:vaphoto', 'param_1'); RemClassRegistry.RegisterXSInfo(TypeInfo(param_2), 'urn:vaphoto', 'param_2'); end. Вроде бы все нормально втягивается , но при попытке вызвать метод веб-сервиса получаю ошибку: --------------------------- Debugger Exception Notification --------------------------- Project Project1.exe raised exception class ERemotableException with message 'Procedure 'param_1' not present'. --------------------------- Break Continue Help --------------------------- Что я делаю не так? Уже весь мозг сломал..... |
#3
|
|||
|
|||
![]() Очень странно... В SoapUI работает без проблем...
|