# Heartbeat services Provides service method to ping our server. * **Type**: SOAP * **Production WSDL**: https://services.generali.gr/gbox-ws/soap/heartbeat?wsdl * **Test WSDL**: http://www.generali.gr/gbox-ws/soap/heartbeat?wsdl ##ping Pings the server. ###Input Type | Description ---- | ----------- *(nothing)* | *---* ### Output Type | Description ---- | ----------- String | Up and running message ### Example 1 #### Input ``` <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soap="http://soap.ws.api.gbox.generali.gr/"> <soapenv:Header/> <soapenv:Body> <soap:ping/> </soapenv:Body> </soapenv:Envelope> ``` #### Output ``` <S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/"> <S:Body> <ns2:pingResponse xmlns:ns2="http://soap.ws.api.gbox.generali.gr/"> <return>Welcome demo, we are up and running!</return> </ns2:pingResponse> </S:Body> </S:Envelope> ``` #### Client (Java) Example of a simple Java client. Notice the exact naming of the classes depends on your client generator and it could be slightly different than the following. ``` package examples; import gr.generali.gbox.api.ws.soap.HeartbeatWs; import gr.generali.gbox.api.ws.soap.HeartbeatLocator; import java.util.Map; import javax.xml.ws.BindingProvider; public class Example1 { public static void main(String[] args) { HeartbeatLocator locator = new HeartbeatLocator(); HeartbeatWs service = locator.getHeartbeatWsPort(); // Authentication Map<String, Object> context = ((BindingProvider)service).getRequestContext(); context.put(BindingProvider.USERNAME_PROPERTY, "50072"); context.put(BindingProvider.PASSWORD_PROPERTY, "1234"); // Execution String message = service.ping(); // Result displaying System.out.println(message); } } ``` Being the output: Welcome 50072, we are up and running!