parsing wsdl with schema, but xsd namespace not declared in top node

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@595 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
inoussa
2008-10-17 20:31:55 +00:00
parent 8a190b28da
commit 8c09b81cfd
7 changed files with 189 additions and 11 deletions

View File

@ -0,0 +1,50 @@
<?xml version="1.0"?>
<definitions name="wst_test"
xmlns="http://schemas.xmlsoap.org/wsdl/"
xmlns:tns="urn:wst-test"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
targetNamespace="urn:wst-test">
<types>
<xsd:schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="urn:wst-test" xmlns:xsd="http://www.w3.org/2001/XMLSchema" >
<xsd:complexType name="TClassSampleType">
<xsd:sequence>
<xsd:element name="intField" type="xsd:int" />
</xsd:sequence>
</xsd:complexType>
</xsd:schema>
</types>
<message name="test_proc">
<part name="AConstParam" type="tns:TClassSampleType"/>
</message>
<message name="test_procResponse">
</message>
<portType name="TestService">
<operation name="test_proc">
<input message="tns:test_proc"/>
<output message="tns:test_procResponse"/>
</operation>
</portType>
<binding name="TestServiceBinding" type="tns:TestService">
<soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
<operation name="test_proc">
<soap:operation soapAction=""/>
<input>
<soap:body use="literal" namespace="library1"/>
</input>
<output>
<soap:body use="literal" namespace="library1"/>
</output>
</operation>
</binding>
<service name="TestService">
<port name="TestServicePort" binding="tns:TestServiceBinding">
<soap:address location=""/>
</port>
</service>
</definitions>

View File

@ -0,0 +1,51 @@
<?xml version="1.0"?>
<definitions name="wst_test"
xmlns="http://schemas.xmlsoap.org/wsdl/"
xmlns:tns="urn:wst-test"
xmlns:other="urn:wst-other"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
targetNamespace="urn:wst-test">
<types>
<xsd:schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="urn:wst-other" xmlns:xsd="http://www.w3.org/2001/XMLSchema" >
<xsd:complexType name="TClassSampleType">
<xsd:sequence>
<xsd:element name="intField" type="xsd:int" />
</xsd:sequence>
</xsd:complexType>
</xsd:schema>
</types>
<message name="test_proc">
<part name="AConstParam" type="other:TClassSampleType"/>
</message>
<message name="test_procResponse">
</message>
<portType name="TestService">
<operation name="test_proc">
<input message="tns:test_proc"/>
<output message="tns:test_procResponse"/>
</operation>
</portType>
<binding name="TestServiceBinding" type="tns:TestService">
<soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
<operation name="test_proc">
<soap:operation soapAction=""/>
<input>
<soap:body use="literal" namespace="library1"/>
</input>
<output>
<soap:body use="literal" namespace="library1"/>
</output>
</operation>
</binding>
<service name="TestService">
<port name="TestServicePort" binding="tns:TestServiceBinding">
<soap:address location=""/>
</port>
</service>
</definitions>

View File

@ -157,6 +157,8 @@ type
procedure signature_last();
procedure signature_result();
procedure signature_return();
procedure xsd_not_declared_at_top_node();
procedure xsd_not_declared_at_top_node_2();
end;
implementation
@ -1573,7 +1575,7 @@ begin
Result := ParseDoc(x_complexType_class_properties_extended_metadata);
end;
function TTest_XsdParser.LoadComplexType_Class_properties_extended_metadata2: TwstPasTreeContainer;
function TTest_XsdParser.LoadComplexType_Class_properties_extended_metadata2(): TwstPasTreeContainer;
begin
Result := ParseDoc(x_complexType_class_properties_extended_metadata + '_2');
end;
@ -1926,6 +1928,16 @@ begin
end;
end;
procedure TTest_WsdlParser.xsd_not_declared_at_top_node();
begin
ParseDoc('xsd_not_declared_at_top_node').Free();
end;
procedure TTest_WsdlParser.xsd_not_declared_at_top_node_2();
begin
ParseDoc('xsd_not_declared_at_top_node_2').Free();
end;
function TTest_WsdlParser.LoadComplexType_Class_default_values() : TwstPasTreeContainer;
begin
Result := ParseDoc(x_complexType_class_default);
@ -1936,7 +1948,7 @@ begin
Result := ParseDoc(x_complexType_class_properties_extended_metadata);
end;
function TTest_WsdlParser.LoadComplexType_Class_properties_extended_metadata2: TwstPasTreeContainer;
function TTest_WsdlParser.LoadComplexType_Class_properties_extended_metadata2(): TwstPasTreeContainer;
begin
Result := ParseDoc(x_complexType_class_properties_extended_metadata + '_2');
end;

View File

@ -1,12 +1,12 @@
<?xml version="1.0"?>
<CONFIG>
<ProjectOptions>
<PathDelim Value="/"/>
<PathDelim Value="\"/>
<Version Value="6"/>
<General>
<SessionStorage Value="InProjectDir"/>
<MainUnit Value="0"/>
<IconPath Value="./"/>
<IconPath Value=".\"/>
<TargetFileExt Value=".exe"/>
</General>
<VersionInfo>
@ -14,13 +14,14 @@
</VersionInfo>
<PublishOptions>
<Version Value="2"/>
<DestinationDirectory Value="$(TestDir)\publishedproject\"/>
<IncludeFileFilter Value="*.(pas|pp|inc|lfm|lpr|lrs|lpi|lpk|sh|xml)"/>
<ExcludeFileFilter Value="*.(bak|ppu|ppw|o|so);*~;backup"/>
</PublishOptions>
<RunParams>
<local>
<FormatVersion Value="1"/>
<LaunchingApplication PathPlusParams="/usr/X11R6/bin/xterm -T 'Lazarus Run Output' -e $(LazarusDir)/tools/runwait.sh $(TargetCmdLine)"/>
<LaunchingApplication PathPlusParams="\usr\X11R6\bin\xterm -T 'Lazarus Run Output' -e $(LazarusDir)\tools\runwait.sh $(TargetCmdLine)"/>
</local>
</RunParams>
<RequiredPackages Count="3">
@ -96,12 +97,12 @@
<UnitName Value="test_rtti_filter"/>
</Unit11>
<Unit12>
<Filename Value="../../wst_rtti_filter/rtti_filters.pas"/>
<Filename Value="..\..\wst_rtti_filter\rtti_filters.pas"/>
<IsPartOfProject Value="True"/>
<UnitName Value="rtti_filters"/>
</Unit12>
<Unit13>
<Filename Value="../../wst_rtti_filter/wst_cursors.pas"/>
<Filename Value="..\..\wst_rtti_filter\wst_cursors.pas"/>
<IsPartOfProject Value="True"/>
<UnitName Value="wst_cursors"/>
</Unit13>
@ -129,9 +130,10 @@
</ProjectOptions>
<CompilerOptions>
<Version Value="8"/>
<PathDelim Value="\"/>
<SearchPaths>
<IncludeFiles Value="../../"/>
<OtherUnitFiles Value="../../;../../ws_helper/;../../wst_rtti_filter/;../../fcl-json/src/"/>
<IncludeFiles Value="..\..\"/>
<OtherUnitFiles Value="..\..\;..\..\ws_helper\;..\..\wst_rtti_filter\;..\..\fcl-json\src\"/>
<UnitOutputDirectory Value="obj"/>
</SearchPaths>
<Parsing>