Skip to content
Merged
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions maven-plugin/tests/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@
<module>jt-194</module>
<module>jt-306</module>
<module>jt-40</module>
<module>wsdl-file</module>
</modules>
<build>
<plugins>
Expand Down
4 changes: 0 additions & 4 deletions maven-plugin/tests/wsdl-file/build-1.5.bat

This file was deleted.

4 changes: 0 additions & 4 deletions maven-plugin/tests/wsdl-file/build-1.6.bat

This file was deleted.

132 changes: 132 additions & 0 deletions maven-plugin/tests/wsdl-file/src/main/resources/CustomerService.wsdl
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 maven-plugin/tests/wsdl-file/src/main/resources/customer.xsd
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>

This file was deleted.

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());
}

}
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"));
}

}
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"));
}

}

This file was deleted.

Loading