You've already forked lazarus-ccr
Generated proxy creation function now take 3 parameters for easy usage :
* AFormat * ATransport * AAddress git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@570 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@ -446,11 +446,11 @@ var
|
|||||||
try
|
try
|
||||||
FDecProcStream.NewLine();
|
FDecProcStream.NewLine();
|
||||||
FDecProcStream.Indent();
|
FDecProcStream.Indent();
|
||||||
FDecProcStream.WriteLn('Function wst_CreateInstance_%s(const AFormat : string = %s; const ATransport : string = %s):%s;',[AIntf.Name,QuotedStr('SOAP:'),QuotedStr('HTTP:'),AIntf.Name]);
|
FDecProcStream.WriteLn('Function wst_CreateInstance_%s(const AFormat : string = %s; const ATransport : string = %s; const AAddress : string = ''''):%s;',[AIntf.Name,QuotedStr('SOAP:'),QuotedStr('HTTP:'),AIntf.Name]);
|
||||||
if HandleEasyIntf then begin
|
if HandleEasyIntf then begin
|
||||||
FDecProcStream.Indent();
|
FDecProcStream.Indent();
|
||||||
FDecProcStream.WriteLn(
|
FDecProcStream.WriteLn(
|
||||||
'Function wst_CreateInstance_%s%s(const AFormat : string = %s; const ATransport : string = %s):%s%s;',
|
'Function wst_CreateInstance_%s%s(const AFormat : string = %s; const ATransport : string = %s; const AAddress : string = ''''):%s%s;',
|
||||||
[AIntf.Name,sEASY_ACCESS_INTERFACE_PREFIX,QuotedStr('SOAP:'),QuotedStr('HTTP:'),AIntf.Name,sEASY_ACCESS_INTERFACE_PREFIX]
|
[AIntf.Name,sEASY_ACCESS_INTERFACE_PREFIX,QuotedStr('SOAP:'),QuotedStr('HTTP:'),AIntf.Name,sEASY_ACCESS_INTERFACE_PREFIX]
|
||||||
);
|
);
|
||||||
end;
|
end;
|
||||||
@ -551,15 +551,23 @@ Var
|
|||||||
procedure WriteDec();
|
procedure WriteDec();
|
||||||
begin
|
begin
|
||||||
NewLine();
|
NewLine();
|
||||||
WriteLn('Function wst_CreateInstance_%s(const AFormat : string; const ATransport : string):%s;',[AIntf.Name,AIntf.Name]);
|
WriteLn('Function wst_CreateInstance_%s(const AFormat : string; const ATransport : string; const AAddress : string):%s;',[AIntf.Name,AIntf.Name]);
|
||||||
|
WriteLn('Var');
|
||||||
|
IncIndent();
|
||||||
|
Indent(); WriteLn('locAdr : string;');
|
||||||
|
DecIndent();
|
||||||
WriteLn('Begin');
|
WriteLn('Begin');
|
||||||
IncIndent();
|
IncIndent();
|
||||||
|
Indent(); WriteLn('if ( locAdr = '''' ) then');
|
||||||
|
IncIndent();
|
||||||
|
Indent(); WriteLn('locAdr := GetServiceDefaultAddress(TypeInfo(%s));',[AIntf.Name]);
|
||||||
|
DecIndent();
|
||||||
Indent();
|
Indent();
|
||||||
WriteLn(
|
WriteLn(
|
||||||
'Result := %s.Create(%s,AFormat+%s,ATransport + %s);',
|
'Result := %s.Create(%s,AFormat+%s,ATransport + %s);',
|
||||||
[ strClassName,QuotedStr(AIntf.Name),
|
[ strClassName,QuotedStr(AIntf.Name),
|
||||||
Format('GetServiceDefaultFormatProperties(TypeInfo(%s))',[AIntf.Name]),
|
Format('GetServiceDefaultFormatProperties(TypeInfo(%s))',[AIntf.Name]),
|
||||||
QuotedStr('address=') + Format(' + GetServiceDefaultAddress(TypeInfo(%s))',[AIntf.Name])
|
QuotedStr('address=') + ' + locAdr'
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
DecIndent();
|
DecIndent();
|
||||||
@ -568,14 +576,14 @@ Var
|
|||||||
|
|
||||||
if HandleEasyIntf then begin
|
if HandleEasyIntf then begin
|
||||||
WriteLn(
|
WriteLn(
|
||||||
'Function wst_CreateInstance_%s%s(const AFormat : string; const ATransport : string):%s%s;',
|
'Function wst_CreateInstance_%s%s(const AFormat : string; const ATransport : string; const AAddress : string):%s%s;',
|
||||||
[AIntf.Name,sEASY_ACCESS_INTERFACE_PREFIX,AIntf.Name,sEASY_ACCESS_INTERFACE_PREFIX]
|
[AIntf.Name,sEASY_ACCESS_INTERFACE_PREFIX,AIntf.Name,sEASY_ACCESS_INTERFACE_PREFIX]
|
||||||
);
|
);
|
||||||
WriteLn('Begin');
|
WriteLn('Begin');
|
||||||
IncIndent();
|
IncIndent();
|
||||||
Indent();
|
Indent();
|
||||||
WriteLn(
|
WriteLn(
|
||||||
'Result := wst_CreateInstance_%s(AFormat,ATransport) as %s%s;',
|
'Result := wst_CreateInstance_%s(AFormat,ATransport,AAddress) as %s%s;',
|
||||||
[AIntf.Name,AIntf.Name,sEASY_ACCESS_INTERFACE_PREFIX]
|
[AIntf.Name,AIntf.Name,sEASY_ACCESS_INTERFACE_PREFIX]
|
||||||
);
|
);
|
||||||
DecIndent();
|
DecIndent();
|
||||||
|
Reference in New Issue
Block a user