public void OBU1_SetVehicleAcceleration(string vehID, [FromBody] string address, [FromBody] double acceleration) { if (string.IsNullOrEmpty(address)) { address = "http://127.0.0.1:8080/TRAAS_WS"; //default address } TraasReference.ServiceImplClient client = new TraasReference.ServiceImplClient(); client.Endpoint.Address = new EndpointAddress(address); try { client.Open(); if (isVehicleActive(address, vehID)) { client.Vehicle_setAccel(vehID, acceleration); } } catch (FaultException e) { client.Abort(); throw new FaultException(e.Message); } catch (Exception e) { throw new FaultException(e.InnerException.ToString()); } finally { client.Close(); } }