A Soap Web Service as a semestral work for the 4IT475 System Integration Testing course.
Disclaimer: The web service Azure hosting was based on the univeristy account and is probably shut down.
The goal of the semestal work is to design and implement a SOAP WS. This project represents a web service encrypting a plaintext using a cipher operation and decrypting it back. Some of the ciphers use keys or an additional configuration within the operation. The entire SOAP WS shall be published on Microsoft Azure.
We expect to deliver the solution in time. We have set the due date before the presentation of the results which is on 28th of November.
Feel free to browse a list of all the operations published at our Wiki.
- Nikolas Charalambidis as Nikolas-Charalambidis
- Alexandra Kolpakova as alexKolpakova & kubik335
We chose Java as an implementing language, because it's the major language taught on the university we study. We decided to pick the following frameworks and libraries because they are easily configurable, broadly used among a large number of enterprises and open-source (except Azure):
- Spring enhanced with Spring-Boot to glue the web service with.
- jUnit 4 to be sure that our smallest components are reliable and working.
- Apache Maven for project build and dependency management.
- Spring Boot Maven Plugin to help us run the webservice "in-place".
- Maven WAR Plugin to pack the web service into deployable war file.
- Codehaus Mojo JAXB2 Maven Plugin to generate XSD schemas and serialize XML messages with using the JAXB XJC binding compiler.
- WSDL4J to generate the WSDL.
- Microsoft Azure as a platform for deployment, which provides a free pricing tier for the students of our university.
- Rattle to keep our Azure webapp alive. In case Rattle is down, you need to wait up to 1-2 minutes to boot the web service up.
- Issue #3 We failed to break all the ciphers in the
cipher.xml
file into smaller pieces. The problem is that JAXB2 generates namespace for all the ciphers separately. - Issue #4 We failed to use
XsdSchemaCollection
usingDefaultWsdl11Definition
to break the large schemacipher.xml
. The NPE is thrown somehow and the Spring issue SWS-1041 has been created.
- Issue #5 We didn't configure the WAR file autodeployment to the Azure using TravisCI upon every commit (merge) to the production master branch.
- Although the project development is finished and no more functionality will be added, we welcome any pull-request to improve our project.
- We succeed to create our first SOAP web service and deliver it in time.
- We enlargened our skill-set.
- We published the project as an open-source and offer it to other students as a study material.
- Enjoy the WSDL published on https://4it475.azurewebsites.net/soap/ws/cipher.wsdl and check all the operations.
Let's learn how to use the Caesar cipher encryption and decryption.
-
Open SoapUI or any similar SOAP client and create a new SOAP WS entering the WSDL located on https://4it475.azurewebsites.net/soap/ws/cipher.wsdl.
-
Open the CaesarEncrypt operation at the
http://localhost:8080/soap/ws
endpoint. -
Fill in the plaintext to be ecrypted inside the
<fis:encrypt>
tag. Optionally fill in<fis:shift>
which stands for the shift in the international alphabet which is used by the Caesar cipher. The<fis:shift>
is optional and the default value is3
. -
The full request should look like:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:fis="https://fis.vse.cz/"> <soapenv:Header/> <soapenv:Body> <fis:CaesarEncryptRequest> <fis:encrypt>Hello world</fis:encrypt> <fis:shift>5</fis:shift> </fis:CaesarEncryptRequest> </soapenv:Body> </soapenv:Envelope>
-
Submit the request to the endpoint.
-
The response should look like:
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"> <SOAP-ENV:Header/> <SOAP-ENV:Body> <ns2:CaesarEncryptResponse xmlns:ns2="https://fis.vse.cz/"> <ns2:encrypted>MJQQT BTWQI</ns2:encrypted> </ns2:CaesarEncryptResponse> </SOAP-ENV:Body> </SOAP-ENV:Envelope>
-
The encrypted value is
MJQQT BTWQI
. -
Use the CaesarDecrypt operation at the very same endpoint to receive the original value back.
-
The full request should look like:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:fis="https://fis.vse.cz/"> <soapenv:Header/> <soapenv:Body> <fis:CaesarDecryptRequest> <fis:decrypt>MJQQT BTWQI</fis:decrypt> <fis:shift>5</fis:shift> </fis:CaesarDecryptRequest> </soapenv:Body> </soapenv:Envelope>
-
Upon submitting the request to the endpoint, the response should return back
HELLO WORLD
in the response:<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"> <SOAP-ENV:Header/> <SOAP-ENV:Body> <ns2:CaesarDecryptResponse xmlns:ns2="https://fis.vse.cz/"> <ns2:decrypted>HELLO WORLD</ns2:decrypted> </ns2:CaesarDecryptResponse> </SOAP-ENV:Body> </SOAP-ENV:Envelope>
-
Please, do not spam requests. :)
The full list of all the operations of the endpoint to be found at Wiki.
Build and run the project using command:
mvn clean install
In case the generating of target classes from the schema files is required, run:
mvn jaxb2:xjc
The WSDL should be available on the address: