-
Notifications
You must be signed in to change notification settings - Fork 103
[#585] add wsdl test project #586
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
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
132 changes: 132 additions & 0 deletions
132
maven-plugin/tests/wsdl-file/src/main/resources/CustomerService.wsdl
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,132 @@ | ||
| <?xml version="1.0" encoding="UTF-8"?> | ||
| <wsdl:definitions name="CustomerServiceService" | ||
| targetNamespace="http://customerservice.example.com/service" | ||
| xmlns:tns="http://customerservice.example.com/service" | ||
| xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" | ||
| xmlns:xsd="http://www.w3.org/2001/XMLSchema" | ||
| xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"> | ||
| <wsdl:types> | ||
| <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" | ||
| xmlns:tns="http://customerservice.example.com/service" | ||
| xmlns:cns="http://customerservice.example.com/model" | ||
| attributeFormDefault="unqualified" | ||
| elementFormDefault="qualified" | ||
| targetNamespace="http://customerservice.example.com/service"> | ||
|
|
||
| <xs:import schemaLocation="customer.xsd" namespace="http://customerservice.example.com/model"/> | ||
| <!-- ... --> | ||
| <xs:element name="getCustomerById" type="tns:getCustomerById" /> | ||
| <xs:complexType name="getCustomerById"> | ||
| <xs:sequence> | ||
| <xs:element minOccurs="0" name="customerId" type="xs:int" /> | ||
| </xs:sequence> | ||
| </xs:complexType> | ||
| <xs:element name="getCustomerByIdResponse" type="tns:getCustomerByIdResponse" /> | ||
| <xs:complexType name="getCustomerByIdResponse"> | ||
| <xs:sequence> | ||
| <xs:element minOccurs="0" name="return" type="cns:customer" /> | ||
| </xs:sequence> | ||
| </xs:complexType> | ||
| <!-- ... --> | ||
| <xs:element name="updateCustomer" type="tns:updateCustomer" /> | ||
| <xs:complexType name="updateCustomer"> | ||
| <xs:sequence> | ||
| <xs:element minOccurs="0" name="customer" type="cns:customer" /> | ||
| </xs:sequence> | ||
| </xs:complexType> | ||
| <xs:element name="updateCustomerResponse" type="tns:updateCustomerResponse" /> | ||
| <xs:complexType name="updateCustomerResponse"> | ||
| <xs:sequence> | ||
| <xs:element minOccurs="0" name="customerId" type="xs:int" /> | ||
| </xs:sequence> | ||
| </xs:complexType> | ||
| <!-- ... --> | ||
| <xs:element name="deleteCustomerById" type="tns:deleteCustomerById" /> | ||
| <xs:complexType name="deleteCustomerById"> | ||
| <xs:sequence> | ||
| <xs:element minOccurs="0" name="customerId" type="xs:int" /> | ||
| </xs:sequence> | ||
| </xs:complexType> | ||
| <!-- ... --> | ||
| <xs:element name="NoSuchCustomer" type="tns:NoSuchCustomer" /> | ||
| <xs:complexType name="NoSuchCustomer"> | ||
| <xs:sequence> | ||
| <xs:element name="customerId" nillable="true" type="xs:int" /> | ||
| </xs:sequence> | ||
| </xs:complexType> | ||
| </xs:schema> | ||
| </wsdl:types> | ||
| <wsdl:message name="getCustomerById"> | ||
| <wsdl:part name="parameters" element="tns:getCustomerById"/> | ||
| </wsdl:message> | ||
| <wsdl:message name="getCustomerByIdResponse"> | ||
| <wsdl:part name="parameters" element="tns:getCustomerByIdResponse"/> | ||
| </wsdl:message> | ||
| <wsdl:message name="updateCustomer"> | ||
| <wsdl:part name="parameters" element="tns:updateCustomer"/> | ||
| </wsdl:message> | ||
| <wsdl:message name="updateCustomerResponse"> | ||
| <wsdl:part name="parameters" element="tns:updateCustomerResponse"/> | ||
| </wsdl:message> | ||
| <wsdl:message name="deleteCustomerById"> | ||
| <wsdl:part name="parameters" element="tns:deleteCustomerById"/> | ||
| </wsdl:message> | ||
| <wsdl:message name="NoSuchCustomerException"> | ||
| <wsdl:part name="NoSuchCustomerException" element="tns:NoSuchCustomer"/> | ||
| </wsdl:message> | ||
| <wsdl:portType name="CustomerService"> | ||
| <wsdl:operation name="updateCustomer"> | ||
| <wsdl:input name="updateCustomer" message="tns:updateCustomer"/> | ||
| <wsdl:output name="updateCustomerResponse" message="tns:updateCustomerResponse"/> | ||
| </wsdl:operation> | ||
| <wsdl:operation name="deleteCustomerById"> | ||
| <wsdl:input name="deleteCustomerById" message="tns:deleteCustomerById"/> | ||
| <wsdl:fault name="NoSuchCustomerException" message="tns:NoSuchCustomerException"/> | ||
| </wsdl:operation> | ||
| <wsdl:operation name="getCustomerById"> | ||
| <wsdl:input name="getCustomerById" message="tns:getCustomerById"/> | ||
| <wsdl:output name="getCustomerByIdResponse" message="tns:getCustomerByIdResponse"/> | ||
| <wsdl:fault name="NoSuchCustomerException" message="tns:NoSuchCustomerException"/> | ||
| </wsdl:operation> | ||
| </wsdl:portType> | ||
| <wsdl:binding name="CustomerServiceServiceSoapBinding" | ||
| type="tns:CustomerService"> | ||
| <soap:binding style="document" | ||
| transport="http://schemas.xmlsoap.org/soap/http" /> | ||
| <wsdl:operation name="updateCustomer"> | ||
| <soap:operation soapAction="" style="document" /> | ||
| <wsdl:input name="updateCustomer"> | ||
| <soap:body use="literal" /> | ||
| </wsdl:input> | ||
| <wsdl:output name="updateCustomerResponse"> | ||
| <soap:body use="literal" /> | ||
| </wsdl:output> | ||
| </wsdl:operation> | ||
| <wsdl:operation name="deleteCustomerById"> | ||
| <soap:operation soapAction="" style="document" /> | ||
| <wsdl:input name="deleteCustomerById"> | ||
| <soap:body use="literal" /> | ||
| </wsdl:input> | ||
| <wsdl:fault name="NoSuchCustomerException"> | ||
| <soap:fault name="NoSuchCustomerException" use="literal" /> | ||
| </wsdl:fault> | ||
| </wsdl:operation> | ||
| <wsdl:operation name="getCustomerById"> | ||
| <soap:operation soapAction="" style="document" /> | ||
| <wsdl:input name="getCustomerById"> | ||
| <soap:body use="literal" /> | ||
| </wsdl:input> | ||
| <wsdl:output name="getCustomerByIdResponse"> | ||
| <soap:body use="literal" /> | ||
| </wsdl:output> | ||
| <wsdl:fault name="NoSuchCustomerException"> | ||
| <soap:fault name="NoSuchCustomerException" use="literal" /> | ||
| </wsdl:fault> | ||
| </wsdl:operation> | ||
| </wsdl:binding> | ||
| <wsdl:service name="CustomerServiceService"> | ||
| <wsdl:port name="CustomerServicePort" binding="tns:CustomerServiceServiceSoapBinding"> | ||
| <soap:address location="http://localhost:8080/CustomerServicePort" /> | ||
| </wsdl:port> | ||
| </wsdl:service> | ||
| </wsdl:definitions> |
26 changes: 26 additions & 0 deletions
26
maven-plugin/tests/wsdl-file/src/main/resources/customer.xsd
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| <xs:schema | ||
| xmlns:xs="http://www.w3.org/2001/XMLSchema" | ||
| xmlns:tns="http://customerservice.example.com/model" | ||
| elementFormDefault="qualified" | ||
| attributeFormDefault="unqualified" | ||
| targetNamespace="http://customerservice.example.com/model"> | ||
| <xs:complexType name="customer"> | ||
| <xs:sequence> | ||
| <xs:element name="customerId" type="xs:int" minOccurs="0"/> | ||
| <xs:element minOccurs="0" name="name" type="xs:string" /> | ||
| <xs:element maxOccurs="unbounded" minOccurs="0" name="address" | ||
| nillable="true" type="xs:string" /> | ||
| <xs:element minOccurs="0" name="numOrders" type="xs:int" /> | ||
| <xs:element name="revenue" type="xs:double" /> | ||
| <xs:element minOccurs="0" name="test" type="xs:decimal" /> | ||
| <xs:element minOccurs="0" name="birthDate" type="xs:date" /> | ||
| <xs:element minOccurs="0" name="type" type="tns:customerType" /> | ||
| </xs:sequence> | ||
| </xs:complexType> | ||
| <xs:simpleType name="customerType"> | ||
| <xs:restriction base="xs:string"> | ||
| <xs:enumeration value="PRIVATE" /> | ||
| <xs:enumeration value="BUSINESS" /> | ||
| </xs:restriction> | ||
| </xs:simpleType> | ||
| </xs:schema> |
47 changes: 0 additions & 47 deletions
47
maven-plugin/tests/wsdl-file/src/main/resources/pedidowebservice.wsdl
This file was deleted.
Oops, something went wrong.
21 changes: 21 additions & 0 deletions
21
...sts/wsdl-file/src/test/java/com/example/customerservice/service/test/JAXBContextTest.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| package com.example.customerservice.service.test; | ||
|
|
||
| import jakarta.xml.bind.JAXBContext; | ||
| import jakarta.xml.bind.JAXBException; | ||
|
|
||
| import com.example.customerservice.service.DeleteCustomerById; | ||
| import org.junit.jupiter.api.Assertions; | ||
| import org.junit.jupiter.api.Test; | ||
|
|
||
| public class JAXBContextTest { | ||
|
|
||
| public static final String CONTEXT_PATH = DeleteCustomerById.class.getPackage().getName(); | ||
|
|
||
| @Test | ||
| public void successfullyCreatesMarshallerAndUnmarshaller() throws JAXBException { | ||
| final JAXBContext context = JAXBContext.newInstance(CONTEXT_PATH); | ||
| Assertions.assertNotNull(context.createMarshaller()); | ||
| Assertions.assertNotNull(context.createUnmarshaller()); | ||
| } | ||
|
|
||
| } | ||
14 changes: 14 additions & 0 deletions
14
...gin/tests/wsdl-file/src/test/java/com/example/customerservice/service/test/ModelTest.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| package com.example.customerservice.service.test; | ||
|
|
||
| import org.junit.jupiter.api.Assertions; | ||
| import org.junit.jupiter.api.Test; | ||
|
|
||
| public class ModelTest { | ||
|
|
||
| @Test | ||
| public void successfullyCreatedModelClasses() throws ClassNotFoundException { | ||
| Assertions.assertNotNull(Class.forName("com.example.customerservice.model.Customer")); | ||
| Assertions.assertNotNull(Class.forName("com.example.customerservice.model.CustomerType")); | ||
| } | ||
|
|
||
| } |
18 changes: 18 additions & 0 deletions
18
...n/tests/wsdl-file/src/test/java/com/example/customerservice/service/test/ServiceTest.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| package com.example.customerservice.service.test; | ||
|
|
||
| import org.junit.jupiter.api.Assertions; | ||
| import org.junit.jupiter.api.Test; | ||
|
|
||
| public class ServiceTest { | ||
|
|
||
| @Test | ||
| public void successfullyCreatedServiceClasses() throws ClassNotFoundException { | ||
| Assertions.assertNotNull(Class.forName("com.example.customerservice.service.DeleteCustomerById")); | ||
| Assertions.assertNotNull(Class.forName("com.example.customerservice.service.GetCustomerById")); | ||
| Assertions.assertNotNull(Class.forName("com.example.customerservice.service.GetCustomerByIdResponse")); | ||
| Assertions.assertNotNull(Class.forName("com.example.customerservice.service.NoSuchCustomer")); | ||
| Assertions.assertNotNull(Class.forName("com.example.customerservice.service.UpdateCustomer")); | ||
| Assertions.assertNotNull(Class.forName("com.example.customerservice.service.UpdateCustomerResponse")); | ||
| } | ||
|
|
||
| } |
23 changes: 0 additions & 23 deletions
23
maven-plugin/tests/wsdl-file/src/test/java/net/webservicex/test/JAXBContextTest.java
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.