-
Notifications
You must be signed in to change notification settings - Fork 87
guide soap
devonfw-core edited this page Nov 21, 2022
·
9 revisions
Table of Contents
|
Warning
|
Hey there! Seems like you are still using the documentation of our legacy Java repository. Since it won’t be maintained anymore, we recommend you to checkout the new Java page here. SOAP is a common protocol for services that is rather complex and heavy. It allows to build inter-operable and well specified services (see WSDL). SOAP is transport neutral what is not only an advantage. We strongly recommend to use HTTPS transport and ignore additional complex standards like WS-Security and use established HTTP-Standards such as RFC2617 (and RFC5280). |
|
Warning
|
Hey there! Seems like you are still using the documentation of our legacy Java repository. Since it won’t be maintained anymore, we recommend you to checkout the new Java page here. For building web-services with Java we use the JAX-WS standard. There are two approaches: |
-
code first
-
contract first
Here is an example in case you define a code-first service.
|
Warning
|
Hey there! Seems like you are still using the documentation of our legacy Java repository. Since it won’t be maintained anymore, we recommend you to checkout the new Java page here. We define a regular interface to define the API of the service and annotate it with JAX-WS annotations: |
@WebService
public interface TablemanagmentWebService {
@WebMethod
@WebResult(name = "message")
TableEto getTable(@WebParam(name = "id") String id);
}|
Warning
|
Hey there! Seems like you are still using the documentation of our legacy Java repository. Since it won’t be maintained anymore, we recommend you to checkout the new Java page here. |
And here is a simple implementation of the service:
@Named
@WebService(endpointInterface = "com.devonfw.application.mtsj.tablemanagement.service.api.ws.TablemanagmentWebService")
public class TablemanagementWebServiceImpl implements TablemanagmentWebService {
private Tablemanagement tableManagement;
@Override
public TableEto getTable(String id) {
return this.tableManagement.findTable(id);
}|
Warning
|
Hey there! Seems like you are still using the documentation of our legacy Java repository. Since it won’t be maintained anymore, we recommend you to checkout the new Java page here. In order to map custom datatypes or other types that do not follow the Java bean conventions, you need to write adapters for JAXB (see XML). |
|
Warning
|
Hey there! Seems like you are still using the documentation of our legacy Java repository. Since it won’t be maintained anymore, we recommend you to checkout the new Java page here. For testing SOAP services in general consult the testing guide. |
For testing SOAP services manually we strongly recommend SoapUI.
This documentation is licensed under the Creative Commons License (Attribution-NoDerivatives 4.0 International).
