// ************************************************************************ //
// The types declared in this file were generated from data read from the
// WSDL File described below:
// WSDL : http://www.example.de/soap/WebService.wsdl
// Encoding : UTF-8
// Version : 1.0
// (19.01.2011 13:23:21 - 1.33.2.5)
// ************************************************************************ //
unit WebService;
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.
// ************************************************************************ //
// !:AllSiteListElementArray - "http://www.example.de/soap/"
// !:string - "http://www.w3.org/2001/XMLSchema"
getAllSitesResult =
class;
{ "http://www.example.de/soap/" }
AllSiteListElement =
class;
// ************************************************************************ //
// Namespace : http://www.example.de/soap/
// Serializtn: [xoLiteralParam]
// ************************************************************************ //
AllSiteListElement =
class(TRemotable)
private
FidSite : integer;
Fname :
string;
public
// constructor Create; override;
published
property idSite : integer
read FidSite
write FidSite;
property name :
string read Fname
write Fname;
end;
AllSiteListElementArray =
array of AllSiteListElement;
getAllSitesResult =
class(TRemotable)
public
FAllSiteListElements: AllSiteListElementArray ;
constructor Create;
override;
published
property AllSiteListElements: AllSiteListElementArray
read FAllSiteListElements
write FAllSiteListElements;
end;
/// ******************************************************//
// ************************************************************************ //
// Namespace : http://www.example.de/soap/
// soapAction: http://www.example.de/soap/getAllSites
// transport : http://schemas.xmlsoap.org/soap/http
// style : rpc
// binding : MyWebServiceBinding
// service : MyWebService
// port : MyWebServicePort
// URL : http://www.example.de/soap/server.php
// ************************************************************************ //
MyWebServicePortType =
interface(IInvokable)
['
{033B160A-CA94-84C0-538F-78C64F42662C}']
function getAllSites(
const name: WideString): getAllSitesResult;
stdcall;
end;
function GetMyWebServicePortType(UseWSDL: Boolean=System.False; Addr: string='
'; HTTPRIO: THTTPRIO =
nil): MyWebServicePortType;
implementation
function GetMyWebServicePortType(UseWSDL: Boolean; Addr:
string; HTTPRIO: THTTPRIO): MyWebServicePortType;
const
defWSDL = '
http://www.example.de/soap/WebService.wsdl';
defURL = '
http://www.example.de/soap/server.php';
defSvc = '
MyWebService';
defPrt = '
MyWebServicePort';
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 MyWebServicePortType);
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;
constructor getAllSitesResult.Create;
begin
inherited Create;
FSerializationOptions := [xoLiteralParam];
end;
initialization
InvRegistry.RegisterInterface(TypeInfo(MyWebServicePortType), '
http://www.example.de/soap/', '
UTF-8');
InvRegistry.RegisterDefaultSOAPAction(TypeInfo(MyWebServicePortType), '
http://www.example.de/soap/getAllSites');
// InvRegistry.RegisterInvokeOptions(TypeInfo(MyWebServicePortType), ioLiteral);
RemClassRegistry.RegisterXSClass(getAllSitesResult, '
http://www.example.de/soap/', '
AllSiteList');
RemClassRegistry.RegisterSerializeOptions(getAllSitesResult, [xoLiteralParam]);
end.