Code examples
SOAP client setup and working examples for C#, Python, and Java.
Setup and dependencies
dotnet tool install --global dotnet-svcutil
dotnet-svcutil https://soap.ecall.ch/eCall.asmx?WSDLpip install zeepwsimport -keep -p com.ecall.soap https://soap.ecall.ch/eCall.asmx?WSDL<dependency>
<groupId>com.sun.xml.ws</groupId>
<artifactId>jaxws-rt</artifactId>
<version>4.0.0</version>
</dependency>Send SMS — SendSMSBasic
SendSMSBasicusing eCallService;
var client = new eCallSoapClient(
eCallSoapClient.EndpointConfiguration.eCallSoap12
);
var request = new SendSMSBasicRequest
{
AccountName = "johnsmith",
AccountPassword = "secretpassword",
Address = "0041791234567",
Message = "Hello from eCall!",
JobID = "SMS-001"
};
var response = await client.SendSMSBasicAsync(request);
if (response.ResponseCode == 0)
{
Console.WriteLine("SMS successfully submitted.");
}
else
{
Console.WriteLine($"Error {response.ResponseCode}: {response.ResponseText}");
}Send fax with attachment — SendFax
SendFaxSend voice message — SendVoiceBasic
SendVoiceBasicQuery send status — GetStateBasic
GetStateBasicLast updated
Was this helpful?
