Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] Refactor approach to code generation, improve test suite. #107

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
216 changes: 216 additions & 0 deletions tests/assets/test_suites/w3c_wsdl20/assertions.xml

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
<!-- https://dev.w3.org/2002/ws/desc/test-suite/documents/bad/Binding-1B/BadBinding.wsdl -->
<!-- Copyright © 2007-03-23 05:50 - W3C, (MIT, ERCIM, Keio). All Rights Reserved. http://www.w3.org/Consortium/Legal/2002/copyright-documents-20021231 -->
<description xmlns="http://www.w3.org/ns/wsdl"
xmlns:tns="http://www.wso2.com/wsdl/2006/interop/EchoService"
xmlns:wsoap="http://www.w3.org/ns/wsdl/soap"
xmlns:soap="http://www.w3.org/2003/05/soap-envelope"
targetNamespace="http://www.wso2.com/wsdl/2006/interop/EchoService"
xmlns:wwis="http://www.wso2.com/schemas/2006/interop/EchoService">

<documentation>
This is a bad WSDL that violates the assertion 55. The Binding defined
do not define all the Operations in the Interface.
</documentation>

<types>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns="http://www.wso2.com/schemas/2006/interop/EchoService"
targetNamespace="http://www.wso2.com/schemas/2006/interop/EchoService"
elementFormDefault="unqualified"
attributeFormDefault="unqualified">
<xs:element type="tEchoString" name="echoString" />
<xs:complexType name="tEchoString">
<xs:sequence>
<xs:element type="xs:string" name="echoStringParam" />
</xs:sequence>
</xs:complexType>
<xs:element type="xs:string" name="echoStringResponse" />

<xs:element type="tEchoXML" name="echoXML" />
<xs:complexType name="tEchoXML">
<xs:sequence>
<xs:element type="xs:anyType" name="echoXMLParam" />
</xs:sequence>
</xs:complexType>
<xs:element type="xs:anyType" name="echoXMLResponse" />

</xs:schema>
</types>
<interface name="echoServiceInterface">
<operation pattern="http://www.w3.org/ns/wsdl/in-out"
name="echoString">
<input element="wwis:echoString" messageLabel="In" />
<output element="wwis:echoStringResponse"
messageLabel="Out" />
</operation>
<operation pattern="http://www.w3.org/ns/wsdl/in-out"
name="echoXML">
<input element="wwis:echoXML" messageLabel="In" />
<output element="wwis:echoXMLResponse" messageLabel="Out" />
</operation>
</interface>
<binding interface="tns:echoServiceInterface"
type="http://www.w3.org/ns/wsdl/soap"
name="echoServiceSOAPBinding"
wsoap:protocol="http://www.w3.org/2003/05/soap/bindings/HTTP/">
<operation
wsoap:mep="http://www.w3.org/2003/05/soap/mep/soap-response"
ref="tns:echoString" />
</binding>
<service name="echoService" interface="tns:echoServiceInterface">
<endpoint
address="http://www-lk.wso2.com/axis2/services/EchoService"
binding="tns:echoServiceSOAPBinding"
name="echoServiceSOAPBinding_http" />
</service>
</description>
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<?xml version="1.0"?>
<!-- https://dev.w3.org/2002/ws/desc/test-suite/documents/bad/Binding-1B/TestMetadata.xml -->
<!-- Copyright © 2007-02-26 04:36 - W3C, (MIT, ERCIM, Keio). All Rights Reserved. http://www.w3.org/Consortium/Legal/2002/copyright-documents-20021231 -->
<TestMetadata xmlns="http://www.w3.org/2006/02/wsdl/TestMetadata">
<Identifier>
http://dev.w3.org/cvsweb/2002/ws/desc/test-suite/documents/bad/Binding-1B
</Identifier>
<Title>Bad Document - Invalid Binding</Title>
<Purpose></Purpose>
<Description>This violates the Binding-1045 Asertion.</Description>
<Status>accepted</Status>
<SpecRef></SpecRef>
<Preconditions>none</Preconditions>
<Inputs>
<Input role="root">BadBinding.wsdl</Input>
</Inputs>
<ExpectedResults>
<Successful>false</Successful>
<ViolatesAssertion>Binding-1045</ViolatesAssertion>
</ExpectedResults>
<Version>1.0</Version>
<Contributor>
<Name>Chathura Herath</Name>
<Affiliation>Indiana University, Extreme!! Lab</Affiliation>
<EMail>[email protected]</EMail>
</Contributor>
<Rights>
http://www.w3.org/Consortium/Legal/2002/copyright-documents-20021231
</Rights>
<Grouping>/documents/bad</Grouping>
<SeeAlso>
<Reference>
http://www.w3.org/TR/2006/CR-wsdl20-20060327/#Binding-1045
</Reference>
</SeeAlso>
</TestMetadata>
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- https://dev.w3.org/2002/ws/desc/test-suite/documents/bad/Binding-2B/Echo.wsdl -->
<!-- Copyright © 2007-03-23 05:51 - W3C, (MIT, ERCIM, Keio). All Rights Reserved. http://www.w3.org/Consortium/Legal/2002/copyright-documents-20021231 -->
<wsdl:description targetNamespace="http://example.org/Echo"
xmlns:tns="http://example.org/Echo"
xmlns:wsdl="http://www.w3.org/ns/wsdl"
xmlns:whttp="http://www.w3.org/ns/wsdl/http"
xmlns:wsdlx="http://www.w3.org/ns/wsdl-extensions"
xmlns:xs="http://www.w3.org/2001/XMLSchema">

<wsdl:documentation>
This test shows an invalid use of the Binding Faults where
Multiple Binding Faults
</wsdl:documentation>

<wsdl:types>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
elementFormDefault="qualified"
targetNamespace="http://example.org/Echo">
<xsd:element name="Echo" type="xsd:string" />
<xsd:element name="EchoResponse" type="xsd:string" />
<xsd:element name="EchoFault" type="xsd:string" />
</xsd:schema>
</wsdl:types>

<wsdl:interface name="EchoInterface">
<wsdl:operation name="echo"
pattern="http://www.w3.org/ns/wsdl/in-out" wsdlx:safe="true">
<wsdl:input element="tns:Echo" />
<wsdl:output element="tns:EchoResponse" />
</wsdl:operation>
<wsdl:fault name="EchoFault" element="tns:EchoFault" />
</wsdl:interface>

<wsdl:binding name="EchoHTTPBinding" interface="tns:EchoInterface"
type="http://www.w3.org/ns/wsdl/http" whttp:version="1.1">
<wsdl:operation ref="tns:echo" whttp:method="GET" />
<wsdl:fault ref="tns:EchoFault" whttp:code="4000004"/>
<wsdl:fault ref="tns:EchoFault" whttp:code="4000005"/>
</wsdl:binding>




</wsdl:description>
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<?xml version="1.0"?>
<!-- https://dev.w3.org/2002/ws/desc/test-suite/documents/bad/Binding-2B/TestMetadata.xml -->
<!-- Copyright © 2007-02-26 04:36 - W3C, (MIT, ERCIM, Keio). All Rights Reserved. http://www.w3.org/Consortium/Legal/2002/copyright-documents-20021231 -->
<TestMetadata xmlns="http://www.w3.org/2006/02/wsdl/TestMetadata">
<Identifier>
http://dev.w3.org/cvsweb/2002/ws/desc/test-suite/documents/bad/Binding-2B
</Identifier>
<Title>Bad Document - Non-Unique Binding</Title>
<Purpose></Purpose>
<Description>This violates the BindingFault 58 Asertion.</Description>
<Status>accepted</Status>
<SpecRef></SpecRef>
<Preconditions>none</Preconditions>
<Inputs>
<Input role="root">Echo.wsdl</Input>
</Inputs>
<ExpectedResults>
<Successful>false</Successful>
<ViolatesAssertion>BindingFault-1050</ViolatesAssertion>
</ExpectedResults>
<Version>1.0</Version>
<Contributor>
<Name>Chathura Herath</Name>
<Affiliation>Indiana University, Extreme!! Lab</Affiliation>
<EMail>[email protected]</EMail>
</Contributor>
<Rights>http://www.w3.org/Consortium/Legal/2002/copyright-documents-20021231</Rights>
<Grouping>/documents/bad</Grouping>
<SeeAlso><Reference>http://www.w3.org/TR/2006/CR-wsdl20-20060327/#BindingFault-1050</Reference></SeeAlso>
</TestMetadata>
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<!-- https://dev.w3.org/2002/ws/desc/test-suite/documents/bad/Binding-3B/NonUniqueBinding-Extended.wsdl -->
<!-- Copyright © 2007-03-23 05:52 - W3C, (MIT, ERCIM, Keio). All Rights Reserved. http://www.w3.org/Consortium/Legal/2002/copyright-documents-20021231 -->
<description xmlns="http://www.w3.org/ns/wsdl"
xmlns:tns="http://www.wso2.com/wsdl/2006/interop/EchoService"
xmlns:wsoap="http://www.w3.org/ns/wsdl/soap"
xmlns:whttp="http://www.w3.org/ns/wsdl/http"
xmlns:soap="http://www.w3.org/2003/05/soap-envelope"
targetNamespace="http://www.wso2.com/wsdl/2006/interop/EchoService"

xmlns:wwis="http://www.wso2.com/schemas/2006/interop/EchoService">

<include location="NonUniqueBinding.wsdl"></include>
<binding interface="tns:echoServiceInterface"
type="http://www.w3.org/ns/wsdl/http"
name="echoServiceBinding">
<operation ref="tns:echoString" whttp:method="GET" />
<operation ref="echoXML" whttp:method="GET" />
</binding>

</description>
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
<description xmlns="http://www.w3.org/ns/wsdl"
xmlns:tns="http://www.wso2.com/wsdl/2006/interop/EchoService"
xmlns:wsoap="http://www.w3.org/ns/wsdl/soap"
xmlns:whttp="http://www.w3.org/ns/wsdl/http"
xmlns:soap="http://www.w3.org/2003/05/soap-envelope"
targetNamespace="http://www.wso2.com/wsdl/2006/interop/EchoService"
xmlns:wwis="http://www.wso2.com/schemas/2006/interop/EchoService">
<!-- https://dev.w3.org/2002/ws/desc/test-suite/documents/bad/Binding-3B/NonUniqueBinding.wsdl -->
<!-- Copyright © 2007-03-23 05:52 - W3C, (MIT, ERCIM, Keio). All Rights Reserved. http://www.w3.org/Consortium/Legal/2002/copyright-documents-20021231 -->

<documentation>
This is a bad WSDL that violates the assertion 57. The binding
on the WSDL has non unique name property.
</documentation>

<types>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns="http://www.wso2.com/schemas/2006/interop/EchoService"
targetNamespace="http://www.wso2.com/schemas/2006/interop/EchoService"
elementFormDefault="unqualified"
attributeFormDefault="unqualified">
<xs:element type="tEchoString" name="echoString" />
<xs:complexType name="tEchoString">
<xs:sequence>
<xs:element type="xs:string" name="echoStringParam" />
</xs:sequence>
</xs:complexType>
<xs:element type="xs:string" name="echoStringResponse" />

<xs:element type="tEchoXML" name="echoXML" />
<xs:complexType name="tEchoXML">
<xs:sequence>
<xs:element type="xs:anyType" name="echoXMLParam" />
</xs:sequence>
</xs:complexType>
<xs:element type="xs:anyType" name="echoXMLResponse" />

</xs:schema>
</types>
<interface name="echoServiceInterface">
<operation pattern="http://www.w3.org/ns/wsdl/in-out"
name="echoString">
<input element="wwis:echoString" messageLabel="In" />
<output element="wwis:echoStringResponse"
messageLabel="Out" />
</operation>
<operation pattern="http://www.w3.org/ns/wsdl/in-out"
name="echoXML">
<input element="wwis:echoXML" messageLabel="In" />
<output element="wwis:echoXMLResponse" messageLabel="Out" />
</operation>
</interface>
<binding interface="tns:echoServiceInterface"
type="http://www.w3.org/ns/wsdl/soap" name="echoServiceBinding"
wsoap:protocol="http://www.w3.org/2003/05/soap/bindings/HTTP/">
<operation
wsoap:mep="http://www.w3.org/2003/05/soap/mep/soap-response"
ref="tns:echoString" />
<operation
wsoap:mep="http://www.w3.org/2003/05/soap/mep/soap-response"
ref="echoXML" />
</binding>


</description>
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<?xml version="1.0"?>
<!-- https://dev.w3.org/2002/ws/desc/test-suite/documents/bad/Binding-3B/TestMetadata.xml -->
<!-- Copyright © 2007-02-26 04:36 - W3C, (MIT, ERCIM, Keio). All Rights Reserved. http://www.w3.org/Consortium/Legal/2002/copyright-documents-20021231 -->
<TestMetadata xmlns="http://www.w3.org/2006/02/wsdl/TestMetadata">
<Identifier>
http://dev.w3.org/cvsweb/2002/ws/desc/test-suite/documents/bad/Binding-3B
</Identifier>
<Title>Bad Document - Non-Unique Binding</Title>
<Purpose></Purpose>
<Description>This violates the Binding 57 Asertion.</Description>
<Status>accepted</Status>
<SpecRef></SpecRef>
<Preconditions>none</Preconditions>
<Inputs>
<Input>NonUniqueBinding.wsdl</Input>
<Input role="root">NonUniqueBinding-Extended.wsdl</Input>
</Inputs>
<ExpectedResults>
<Successful>false</Successful>
<ViolatesAssertion>Binding-1049</ViolatesAssertion>
</ExpectedResults>
<Version>1.0</Version>
<Contributor>
<Name>Chathura Herath</Name>
<Affiliation>Indiana University, Extreme!! Lab</Affiliation>
<EMail>[email protected]</EMail>
</Contributor>
<Rights>http://www.w3.org/Consortium/Legal/2002/copyright-documents-20021231</Rights>
<Grouping>/documents/bad</Grouping>
<SeeAlso><Reference>http://www.w3.org/TR/2006/CR-wsdl20-20060327/#Binding-1049</Reference>
<Reference>http://www.w3.org/TR/2006/CR-wsdl20-20060327/#Description-0024</Reference></SeeAlso>
</TestMetadata>
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
<description xmlns="http://www.w3.org/ns/wsdl"
xmlns:tns="http://www.wso2.com/wsdl/2006/interop/EchoService"
xmlns:wsoap="http://www.w3.org/ns/wsdl/soap"
xmlns:soap="http://www.w3.org/2003/05/soap-envelope"
targetNamespace="http://www.wso2.com/wsdl/2006/interop/EchoService"
xmlns:wwis="http://www.wso2.com/schemas/2006/interop/EchoService">
<!-- https://dev.w3.org/2002/ws/desc/test-suite/documents/bad/Binding-4B/Echo.wsdl -->
<!-- Copyright © 2007-03-23 05:51 - W3C, (MIT, ERCIM, Keio). All Rights Reserved. http://www.w3.org/Consortium/Legal/2002/copyright-documents-20021231 -->

<documentation>
This is a bad WSDL that violates the assertion Binding-1047. The Binding
defined does not define all the Operations in the Interface.
</documentation>

<types>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns="http://www.wso2.com/schemas/2006/interop/EchoService"
targetNamespace="http://www.wso2.com/schemas/2006/interop/EchoService"
elementFormDefault="unqualified"
attributeFormDefault="unqualified">
<xs:element type="tEchoString" name="echoString" />
<xs:complexType name="tEchoString">
<xs:sequence>
<xs:element type="xs:string" name="echoStringParam" />
</xs:sequence>
</xs:complexType>
<xs:element type="xs:string" name="echoStringResponse" />

<xs:element type="tEchoXML" name="echoXML" />
<xs:complexType name="tEchoXML">
<xs:sequence>
<xs:element type="xs:anyType" name="echoXMLParam" />
</xs:sequence>
</xs:complexType>
<xs:element type="xs:anyType" name="echoXMLResponse" />

</xs:schema>
</types>
<interface name="echoServiceInterface">
<fault name="echoFault" element="wwis:echoFault"/>
<operation pattern="http://www.w3.org/ns/wsdl/in-out"
name="echoString">
<input element="wwis:echoString" messageLabel="In" />
<output element="wwis:echoStringResponse" messageLabel="Out" />
<outfault ref="wwis:echoFault"/>
</operation>
</interface>
<binding interface="tns:echoServiceInterface"
type="http://www.w3.org/ns/wsdl/soap"
name="echoServiceSOAPBinding"
wsoap:protocol="http://www.w3.org/2003/05/soap/bindings/HTTP/">
<operation ref="tns:echoString">
<input />
<output />
<outfault ref="wwis:echoFault"/>
</operation>
</binding>
</description>
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<?xml version="1.0"?>
<!-- https://dev.w3.org/2002/ws/desc/test-suite/documents/bad/Binding-4B/TestMetadata.xml -->
<!-- Copyright © 2007-02-26 04:36 - W3C, (MIT, ERCIM, Keio). All Rights Reserved. http://www.w3.org/Consortium/Legal/2002/copyright-documents-20021231 -->
<TestMetadata xmlns="http://www.w3.org/2006/02/wsdl/TestMetadata">
<Identifier>
http://dev.w3.org/cvsweb/2002/ws/desc/test-suite/documents/bad/Binding-4B
</Identifier>
<Title>Bad Document - Invalid use of binding fault reference</Title>
<Purpose></Purpose>
<Description>This violates the Binding 61 Asertion.</Description>
<Status>accepted</Status>
<SpecRef></SpecRef>
<Preconditions>none</Preconditions>
<Inputs>
<Input role="root">Echo.wsdl</Input>
</Inputs>
<ExpectedResults>
<Successful>false</Successful>
<ViolatesAssertion>Binding-1045</ViolatesAssertion>
</ExpectedResults>
<Version>1.0</Version>
<Contributor>
<Name>Chathura Herath</Name>
<Affiliation>Indiana University, Extreme!! Lab</Affiliation>
<EMail>[email protected]</EMail>
</Contributor>
<Rights>http://www.w3.org/Consortium/Legal/2002/copyright-documents-20021231</Rights>
<Grouping>/documents/bad</Grouping>
<SeeAlso>
<Reference>http://www.w3.org/TR/2006/CR-wsdl20-20060327/#Binding-1045</Reference></SeeAlso>
</TestMetadata>
Loading