From 44f1a2f5da0170c454ed69cc9c6e10e1dd7edddf Mon Sep 17 00:00:00 2001 From: inoussa Date: Thu, 26 Apr 2007 23:23:41 +0000 Subject: [PATCH] ws_helper : + wst_CreateInstance_(); new function to create a default proxy based on the address and params provided by the wsdl file. wst runtime : + GetServiceDefaultFormatProperties() + GetServiceDefaultAddress() git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@153 8e941d3f-bd1b-0410-a28a-d453659cc2b4 --- wst/trunk/imp_utils.pas | 15 ++ wst/trunk/metadata_repository.pas | 70 +++++- wst/trunk/service_intf.pas | 49 ++-- wst/trunk/tests/amazon/amazon.lpi | 258 ++++++++++++++++----- wst/trunk/tests/amazon/umain.pas | 18 +- wst/trunk/ws_helper/generator.pas | 39 +++- wst/trunk/ws_helper/ws_helper.lpi | 325 +++++++++++++++++---------- wst/trunk/ws_helper/wsdl2pas_imp.pas | 87 ++++++- 8 files changed, 637 insertions(+), 224 deletions(-) diff --git a/wst/trunk/imp_utils.pas b/wst/trunk/imp_utils.pas index 0eb889387..7344a5da7 100644 --- a/wst/trunk/imp_utils.pas +++ b/wst/trunk/imp_utils.pas @@ -44,6 +44,7 @@ Type End; function IsStrEmpty(Const AStr:String):Boolean; + function ExtractOptionName(const ACompleteName : string):string; implementation @@ -52,6 +53,20 @@ begin Result := ( Length(Trim(AStr)) = 0 ); end; +function ExtractOptionName(const ACompleteName : string):string; +var + i, c : Integer; +begin + Result := ''; + c := Length(ACompleteName); + for i := c downto 1 do begin + if ( ACompleteName[i] = '_' ) then + Break; + Result := ACompleteName[i] + Result; + end; + Result := Trim(Result); +end; + { TPublishedPropertyManager } procedure TPublishedPropertyManager.Error(const AMsg: string); diff --git a/wst/trunk/metadata_repository.pas b/wst/trunk/metadata_repository.pas index 40efe7596..cc87bbdcc 100644 --- a/wst/trunk/metadata_repository.pas +++ b/wst/trunk/metadata_repository.pas @@ -18,12 +18,14 @@ unit metadata_repository; interface uses - Classes, SysUtils; + Classes, SysUtils, TypInfo; const sWST_SIGNATURE = 'WST_METADATA_0.2.2.0'; sWST_META = 'wst_meta'; + sFORMAT = 'FORMAT'; + sTRANSPORT = 'TRANSPORT'; type @@ -110,8 +112,64 @@ type function Find(const AProps : PPropertyData; const APropName : string) : PPropertyData; + + function GetServiceDefaultAddress(AServiceTyp : PTypeInfo):string; + function GetServiceDefaultFormatProperties(AServiceTyp : PTypeInfo):string; + implementation -uses wst_resources_imp, binary_streamer; +uses wst_resources_imp, binary_streamer, imp_utils; + +const sADDRESS = 'Address'; +function GetServiceDefaultAddress(AServiceTyp : PTypeInfo):string; +var + typData : PTypeData; + servcMdt : PService; + propData : PPropertyData; +begin + Result := ''; + if Assigned(AServiceTyp) and (AServiceTyp^.Kind = tkInterface) then begin + typData := GetTypeData(AServiceTyp); + if Assigned(typData) then begin + servcMdt := GetModuleMetadataMngr().GetServiceMetadata(typData^.IntfUnit,AServiceTyp^.Name); + if Assigned(AServiceTyp) then begin + propData := Find(servcMdt^.Properties,sTRANSPORT + '_' + sADDRESS); + if Assigned(propData) then + Result := propData^.Data; + end; + end; + end; +end; + +function GetServiceDefaultFormatProperties(AServiceTyp : PTypeInfo):string; +var + typData : PTypeData; + servcMdt : PService; + propData : PPropertyData; + strName : string; +begin + Result := ''; + if Assigned(AServiceTyp) and (AServiceTyp^.Kind = tkInterface) then begin + typData := GetTypeData(AServiceTyp); + if Assigned(typData) then begin + servcMdt := GetModuleMetadataMngr().GetServiceMetadata(typData^.IntfUnit,AServiceTyp^.Name); + if Assigned(AServiceTyp) then begin + propData := servcMdt^.Properties; + while Assigned(propData) do begin + if ( AnsiPos(sFORMAT + '_',propData^.Name) = 1 ) then begin + strName := ExtractOptionName(propData^.Name); + if ( Length(strName) > 0 ) then begin + Result := Format('%s%s=%s;',[Result,strName,propData^.Data]); + end; + end; + propData := propData^.Next; + end; + if not IsStrEmpty(Result) then begin + Delete(Result,Length(Result),1); + end; + end; + end; + end; +end; procedure ClearProperties(var AProps : PPropertyData); var @@ -183,10 +241,10 @@ begin end else begin Result := Find(AProps,APropName); if not Assigned(Result) then begin - AProps^.Next := GetMem(SizeOf(PPropertyData^)); - FillChar(AProps^.Next^,SizeOf(PPropertyData^),#0); - Result := AProps^.Next; - Result^.Next := nil; + Result := GetMem(SizeOf(PPropertyData^)); + FillChar(Result^,SizeOf(PPropertyData^),#0); + Result^.Next := AProps; + AProps := Result; end; end; Result^.Name := APropName; diff --git a/wst/trunk/service_intf.pas b/wst/trunk/service_intf.pas index 14e5c6ad8..5bb138a0e 100644 --- a/wst/trunk/service_intf.pas +++ b/wst/trunk/service_intf.pas @@ -160,7 +160,7 @@ var sd : PService; opd : PServiceOperation; mm : IModuleMetadataMngr; - strBuffer : string; + strTransportBuffer, strFormatBuffer, strName : string; begin if not Assigned(FOperationsProperties) then begin FOperationsProperties := TStringList.Create(); @@ -170,15 +170,29 @@ begin Assert(Assigned(sd)); for i := 0 to Pred(sd^.OperationsCount) do begin opd := @(sd^.Operations[i]); - strBuffer := ''; + strFormatBuffer := ''; + strTransportBuffer := ''; pd := opd^.Properties; while Assigned(pd) do begin - strBuffer := Format('%s%s=%s;',[strBuffer,pd^.Name,pd^.Data]); + strName := ExtractOptionName(pd^.Name); + if ( AnsiPos(sFORMAT + '_',pd^.Name) = 1 ) then begin + if ( Length(strName) > 0 ) then begin + strFormatBuffer := Format('%s%s=%s;',[strFormatBuffer,strName,pd^.Data]); + end; + end else if ( AnsiPos(sTRANSPORT + '_',pd^.Name) = 1 ) then begin + if ( Length(strName) > 0 ) then begin + strTransportBuffer := Format('%s%s=%s;',[strTransportBuffer,strName,pd^.Data]); + end; + end; pd := pd^.Next; end; - if not IsStrEmpty(strBuffer) then begin - Delete(strBuffer,Length(strBuffer),1); - FOperationsProperties.Values[opd^.Name] := strBuffer; + if not IsStrEmpty(strFormatBuffer) then begin + Delete(strFormatBuffer,Length(strFormatBuffer),1); + FOperationsProperties.Values[opd^.Name + '_' + sFORMAT] := strFormatBuffer; + end; + if not IsStrEmpty(strTransportBuffer) then begin + Delete(strTransportBuffer,Length(strTransportBuffer),1); + FOperationsProperties.Values[opd^.Name + '_' + sTRANSPORT] := strTransportBuffer; end; end; finally @@ -208,20 +222,29 @@ begin end; procedure TBaseProxy.MakeCall(); - - procedure PrepareTransport(); +var + trans : ITransport; + frmt : IFormatterClient; + + procedure PrepareCall(); var - strBuffer : string; + strBuffer, strName : string; begin LoadProperties(); - strBuffer := FOperationsProperties.Values[GetSerializer().GetCallProcedureName()]; + strName := frmt.GetCallProcedureName() + '_'; + strBuffer := FOperationsProperties.Values[strName + sTRANSPORT]; if not IsStrEmpty(strBuffer) then - GetTransport().GetPropertyManager().SetProperties(strBuffer); + trans.GetPropertyManager().SetProperties(strBuffer); + strBuffer := FOperationsProperties.Values[strName + sFORMAT]; + if not IsStrEmpty(strBuffer) then + frmt.GetPropertyManager().SetProperties(strBuffer); end; begin - PrepareTransport(); - GetCallHandler().MakeCall(GetSerializer(),GetTransport()); + trans := GetTransport(); + frmt := GetSerializer(); + PrepareCall(); + GetCallHandler().MakeCall(frmt,trans); end; procedure TBaseProxy.AddObjectToFree(const AObject: TObject); diff --git a/wst/trunk/tests/amazon/amazon.lpi b/wst/trunk/tests/amazon/amazon.lpi index 28475cd6f..491f11fe2 100644 --- a/wst/trunk/tests/amazon/amazon.lpi +++ b/wst/trunk/tests/amazon/amazon.lpi @@ -31,14 +31,14 @@ - + - + @@ -46,20 +46,20 @@ - - + + - + - - + + - + @@ -69,138 +69,276 @@ - - + + - + - - + + - + + + + - - - + + + + + - + - - - - + + + + - + - - - + - - - + + + + + - - - + + + + + - - - - - + + + - + - + - + - + - + - + - - + + - - + + - - - + + + + + + + + + + + + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -224,7 +362,7 @@ - + @@ -282,21 +420,25 @@ - - + + - + - + - - + + + + + + diff --git a/wst/trunk/tests/amazon/umain.pas b/wst/trunk/tests/amazon/umain.pas index 327269c16..6fb087384 100644 --- a/wst/trunk/tests/amazon/umain.pas +++ b/wst/trunk/tests/amazon/umain.pas @@ -38,7 +38,8 @@ var implementation uses soap_formatter, synapse_http_protocol, - AWSECommerceService_proxy; + AWSECommerceService_proxy, + metadata_repository; { TfMain } @@ -48,11 +49,7 @@ var rqst : ItemSearch_Type; rsps : ItemSearchResponse_Type; rspsItem : Items_Type; - i, j, k, l : Integer; - locSearchBinSets : SearchBinSets_Type; - locSrchBinSet : SearchBinSet_Type; - locBin : Bin_Type; - bp : Bin_BinParameter_Type; + i, j, k : Integer; itm : Item_Type; begin mmoRes.Clear(); @@ -60,11 +57,7 @@ begin rqst := ItemSearch_Type.Create(); try Screen.Cursor := crHourGlass; - locService := TAWSECommerceServicePortType_Proxy.Create( - 'AWSECommerceServicePortType', - 'SOAP:style=document;EncodingStyle=Literal', - 'http:address=http://soap.amazon.com/onca/soap?Service=AWSECommerceService' - ); + locService := wst_CreateInstance_AWSECommerceServicePortType(); rqst.AWSAccessKeyId := edtAccessID.Text; rqst.Request.SetLength(1); rqst.Request[0].Manufacturer := edtManufacturer.Text; @@ -106,6 +99,7 @@ begin mmoRes.Lines.Add(''); end; end; + mmoRes.SelStart := 0; end else begin ShowMessage('not Assigned(rsps)'); end; @@ -117,10 +111,10 @@ begin end; end; + initialization {$I umain.lrs} - Register_AWSECommerceService_ServiceMetadata(); SYNAPSE_RegisterHTTP_Transport(); end. diff --git a/wst/trunk/ws_helper/generator.pas b/wst/trunk/ws_helper/generator.pas index 4c56101c0..fa45e0836 100644 --- a/wst/trunk/ws_helper/generator.pas +++ b/wst/trunk/ws_helper/generator.pas @@ -69,6 +69,7 @@ type TProxyGenerator = class(TBaseGenerator) Private FDecStream : ISourceStream; + FDecProcStream : ISourceStream; FImpStream : ISourceStream; function GenerateClassName(AIntf : TInterfaceDefinition):String; @@ -246,6 +247,7 @@ constructor TProxyGenerator.Create( begin Inherited Create(ASymTable,ASrcMngr); FDecStream := SrcMngr.CreateItem(GetDestUnitName() + '.dec'); + FDecProcStream := SrcMngr.CreateItem(GetDestUnitName() + '.dec_proc'); FImpStream := SrcMngr.CreateItem(GetDestUnitName() + '.imp'); end; @@ -265,7 +267,7 @@ begin End; End; GenerateUnitImplementationFooter(); - FSrcMngr.Merge(GetDestUnitName() + '.pas',[FDecStream,FImpStream]); + FSrcMngr.Merge(GetDestUnitName() + '.pas',[FDecStream,FDecProcStream,FImpStream]); FDecStream := Nil; FImpStream := Nil; end; @@ -276,10 +278,19 @@ begin end; procedure TProxyGenerator.GenerateProxyIntf(AIntf: TInterfaceDefinition); + procedure WriteDec(); begin Indent(); WriteLn('%s=class(%s,%s)',[GenerateClassName(AIntf),sPROXY_BASE_CLASS,AIntf.Name]); + FDecProcStream.IncIndent(); + try + FDecProcStream.NewLine(); + 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]); + finally + FDecProcStream.DecIndent(); + end; end; procedure WriteMethod(AMthd : TMethodDefinition); @@ -352,6 +363,24 @@ Var procedure WriteDec(); begin + NewLine(); + WriteLn('Function wst_CreateInstance_%s(const AFormat : string; const ATransport : string):%s;',[AIntf.Name,AIntf.Name]); + WriteLn('Begin'); + IncIndent(); + try + Indent(); + WriteLn( + 'Result := %s.Create(%s,AFormat+%s,ATransport + %s);', + [ strClassName,QuotedStr(AIntf.Name), + Format('GetServiceDefaultFormatProperties(TypeInfo(%s))',[AIntf.Name]), + QuotedStr('address=') + Format(' + GetServiceDefaultAddress(TypeInfo(%s))',[AIntf.Name]) + ] + ); + finally + DecIndent(); + end; + WriteLn('End;'); + NewLine(); If ( AIntf.MethodCount > 0 ) Then WriteLn('{ %s implementation }',[strClassName]); end; @@ -1302,7 +1331,7 @@ procedure TInftGenerator.GenerateIntf(AIntf: TInterfaceDefinition); procedure WriteDec(); begin Indent(); - WriteLn('%s = interface',[GenerateIntfName(AIntf)]); + WriteLn('%s = interface(IInvokable)',[GenerateIntfName(AIntf)]); if not IsStrEmpty(AIntf.InterfaceGUID) then begin Indent();Indent();WriteLn('[%s]',[QuotedStr(AIntf.InterfaceGUID)]); end; @@ -1839,7 +1868,7 @@ procedure TInftGenerator.GenerateCustomMetadatas(); IncIndent(); Indent(); WriteLn('%s,',[sUNIT_NAME]); Indent(); WriteLn('%s,',[QuotedStr(AIntf.Name)]); - Indent(); WriteLn('%s,',[QuotedStr('Address')]); + Indent(); WriteLn('%s,',[QuotedStr('TRANSPORT_Address')]); Indent(); WriteLn('%s' ,[QuotedStr(AIntf.Address)]); DecIndent(); Indent();WriteLn(');'); @@ -1850,7 +1879,7 @@ procedure TInftGenerator.GenerateCustomMetadatas(); IncIndent(); Indent(); WriteLn('%s,',[sUNIT_NAME]); Indent(); WriteLn('%s,',[QuotedStr(AIntf.Name)]); - Indent(); WriteLn('%s,',[QuotedStr('SoapDocumentStyle')]); + Indent(); WriteLn('%s,',[QuotedStr('FORMAT_Style')]); Indent(); WriteLn('%s' ,[QuotedStr('rpc')]); DecIndent(); Indent();WriteLn(');'); @@ -1859,7 +1888,7 @@ procedure TInftGenerator.GenerateCustomMetadatas(); IncIndent(); Indent(); WriteLn('%s,',[sUNIT_NAME]); Indent(); WriteLn('%s,',[QuotedStr(AIntf.Name)]); - Indent(); WriteLn('%s,',[QuotedStr('SoapDocumentStyle')]); + Indent(); WriteLn('%s,',[QuotedStr('FORMAT_Style')]); Indent(); WriteLn('%s' ,[QuotedStr('document')]); DecIndent(); Indent();WriteLn(');'); diff --git a/wst/trunk/ws_helper/ws_helper.lpi b/wst/trunk/ws_helper/ws_helper.lpi index 76f2d2205..de74bff62 100644 --- a/wst/trunk/ws_helper/ws_helper.lpi +++ b/wst/trunk/ws_helper/ws_helper.lpi @@ -12,7 +12,7 @@ - + @@ -33,16 +33,14 @@ - + - - @@ -58,14 +56,14 @@ - - + + - - - + + + @@ -96,7 +94,7 @@ - + @@ -104,21 +102,21 @@ - + - + - + @@ -133,19 +131,19 @@ - + - + - + @@ -184,166 +182,243 @@ - + - - - - - - - - + + - + + + + + + + + + + - - - - - - - - - - + - - + + - - - - - - - - - - + + + - - - + + + - - + + - - - + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + - - - - - + + + + + - - - + + + - - - + + + - - - + + + - - - + + + - - + + + + + + + + + + + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -381,7 +456,7 @@ - + @@ -394,6 +469,10 @@ + + + + diff --git a/wst/trunk/ws_helper/wsdl2pas_imp.pas b/wst/trunk/ws_helper/wsdl2pas_imp.pas index 6d1be3051..62f831fec 100644 --- a/wst/trunk/ws_helper/wsdl2pas_imp.pas +++ b/wst/trunk/ws_helper/wsdl2pas_imp.pas @@ -149,6 +149,7 @@ const s_attribute : WideString = 'attribute'; s_base : WideString = 'base'; s_binding : WideString = 'binding'; + s_body : WideString = 'body'; s_complexContent : WideString = 'complexContent'; s_complexType : WideString = 'complexType'; s_document : WideString = 'document'; @@ -182,6 +183,9 @@ const s_simpleType : WideString = 'simpleType'; s_soap : WideString = 'http://schemas.xmlsoap.org/wsdl/soap/'; s_soapAction : WideString = 'soapAction'; + s_soapInputEncoding : WideString = 'Input_EncodingStyle'; + s_soapOutputEncoding : WideString = 'OutputEncodingStyle'; + s_soapStyle : WideString = 'style'; s_style : WideString = 'style'; s_targetNamespace : WideString = 'targetNamespace'; s_type : WideString = 'type'; @@ -195,6 +199,8 @@ const //---------------------------------------------------------- s_NODE_NAME = 'NodeName'; s_NODE_VALUE = 'NodeValue'; + s_TRANSPORT = 'TRANSPORT'; + s_FORMAT = 'FORMAT'; type TCursorExposedType = ( cetRttiNode, cetDomNode ); function CreateAttributesCursor(ANode : TDOMNode; const AExposedType : TCursorExposedType):IObjectCursor; @@ -592,7 +598,62 @@ function TWsdlParser.ParsePortType(ANode, ABindingNode : TDOMNode) : TInterfaceD end; end; - procedure ParseOperationAtt_SoapAction(ABndngOpCurs : IObjectCursor; AOp : TMethodDefinition); + procedure ParseOperation_EncodingStyle(ABndngOpCurs : IObjectCursor; AOp : TMethodDefinition); + var + nd, ndSoap : TDOMNode; + tmpCrs, tmpSoapCrs, tmpXcrs : IObjectCursor; + in_out_count : Integer; + strBuffer : string; + begin + nd := FindNamedNode(ABndngOpCurs,AOp.ExternalName); + if Assigned(nd) and nd.HasChildNodes() then begin + tmpCrs := CreateCursorOn( + CreateChildrenCursor(nd,cetRttiNode), + ParseFilter( + CreateQualifiedNameFilterStr(s_input,FWsdlShortNames) + ' or ' + + CreateQualifiedNameFilterStr(s_output,FWsdlShortNames) + , + TDOMNodeRttiExposer + ) + ); + tmpCrs.Reset(); + in_out_count := 0; + while tmpCrs.MoveNext() and ( in_out_count < 2 ) do begin + Inc(in_out_count); + nd := (tmpCrs.GetCurrent() as TDOMNodeRttiExposer).InnerObject; + if nd.HasChildNodes() then begin + tmpSoapCrs := CreateCursorOn( + CreateChildrenCursor(nd,cetRttiNode), + ParseFilter(CreateQualifiedNameFilterStr(s_body,FSoapShortNames),TDOMNodeRttiExposer) + ); + tmpSoapCrs.Reset(); + if tmpSoapCrs.MoveNext() then begin + ndSoap := (tmpSoapCrs.GetCurrent() as TDOMNodeRttiExposer).InnerObject; + if Assigned(ndSoap.Attributes) and ( ndSoap.Attributes.Length > 0 ) then begin + tmpXcrs := CreateCursorOn( + CreateAttributesCursor(ndSoap,cetRttiNode), + ParseFilter( + Format('%s = %s',[s_NODE_NAME,QuotedStr(s_use)]), + TDOMNodeRttiExposer + ) + ); + tmpXcrs.Reset(); + if tmpXcrs.MoveNext() then begin + if AnsiSameText(s_input,ExtractNameFromQName(nd.NodeName)) then begin + strBuffer := s_soapInputEncoding; + end else begin + strBuffer := s_soapOutputEncoding; + end; + AOp.Properties.Values[s_FORMAT + '_' + strBuffer] := (tmpXcrs.GetCurrent() as TDOMNodeRttiExposer).InnerObject.NodeValue; + end; + end; + end; + end; + end; + end; + end; + + procedure ParseOperationAttributes(ABndngOpCurs : IObjectCursor; AOp : TMethodDefinition); var nd : TDOMNode; tmpCrs : IObjectCursor; @@ -609,18 +670,30 @@ function TWsdlParser.ParsePortType(ANode, ABindingNode : TDOMNode) : TInterfaceD if Assigned(nd.Attributes) and ( nd.Attributes.Length > 0 ) then begin tmpCrs := CreateCursorOn( CreateAttributesCursor(nd,cetRttiNode), - ParseFilter(Format('%s = %s',[s_NODE_NAME,QuotedStr(s_soapAction)]),TDOMNodeRttiExposer) + ParseFilter( + Format( '%s = %s or %s = %s', + [ s_NODE_NAME,QuotedStr(s_soapAction), + s_NODE_NAME,QuotedStr(s_style) + ] + ), + TDOMNodeRttiExposer + ) ); tmpCrs.Reset(); if tmpCrs.MoveNext() then begin nd := (tmpCrs.GetCurrent() as TDOMNodeRttiExposer).InnerObject; - AOp.Properties.Values[s_soapAction] := nd.NodeValue; + if AnsiSameText(nd.NodeName,s_style) then begin + AOp.Properties.Values[s_soapStyle] := nd.NodeValue; + end else if AnsiSameText(nd.NodeName,s_soapAction) then begin + AOp.Properties.Values[s_TRANSPORT + '_' + s_soapAction] := nd.NodeValue; + end; end; end; end; + ParseOperation_EncodingStyle(ABndngOpCurs,AOp); end; end; - + var locIntf : TInterfaceDefinition; locAttCursor : IObjectCursor; @@ -659,7 +732,7 @@ begin locObj := locOpCursor.GetCurrent() as TDOMNodeRttiExposer; locMthd := ParseOperation(locIntf,locObj.InnerObject,locSoapBindingStyle); if Assigned(locMthd) then begin - ParseOperationAtt_SoapAction(locBindingOperationCursor,locMthd); + ParseOperationAttributes(locBindingOperationCursor,locMthd); end; end; end; @@ -1986,7 +2059,7 @@ begin ); end; -function TComplexTypeParser.GetParserSupportedStyle(): string; +class function TComplexTypeParser.GetParserSupportedStyle(): string; begin Result := s_complexType; end; @@ -2190,7 +2263,7 @@ begin // todo : implement TSimpleTypeParser.ParseOtherContent Result := TTypeAliasDefinition.Create(FTypeName,FSymbols.ByName(FBaseName) as TTypeDefinition); end; -function TSimpleTypeParser.GetParserSupportedStyle(): string; +class function TSimpleTypeParser.GetParserSupportedStyle(): string; begin Result := s_simpleType; end;