I have both main back-end and front-end web-app deployed in tomcat and sms
gateway also deployed in tomcat. Am trying to design a simple UI for
sending on demand sms from community-app with Submit function as below:

scope.submit = function () {
    var messagejson = {};
    messagejson.internalId = '55';
    messagejson.mobileNumber = +9128877477433; //scope.formData.mobileNo;
    messagejson.message = 'DEAR IPPEZ, Your ATM Card is read for
collection at our Head Office.;// scope.formData.message;
    messagejson.providerId = '2'; // scope.selectedProviderId;
    $http({
        method: 'POST',
        url: 'http://localhost:9191/message-gateway-0.0.1/sms',
        data: messagejson,
        headers: {
            "Tenant-App-Key": 'e4600907-f884-4abe-b50b-1c26cc349871'
        }
    }).then(function successCallback(response) {
    if (response.data)
        alert(response.status + ": SMS message sent Successfully!);
    }, function errorCallback(response) {
        alert(response.status + ": Service not Exists);
    });};

On submitting no message is sent and when i inspect the web-console, i see
error as below WebConsole Error Screen
<https://i.stack.imgur.com/ah84p.png> Yet
from POSTMAN, its successful Postman Screen
<https://i.stack.imgur.com/3Z3J3.png>.

Any assistance and workaround is highly appreciated. Thanks
Ippez Roberts
Skype ID: ippez.robert1
Email: [email protected]

Reply via email to