SendSMS PHP

Home Forums M2M Support Forum SendSMS PHP

This topic contains 0 replies, has 1 voice, and was last updated by  Aigars 10 months, 4 weeks ago.

Viewing 1 post (of 1 total)
  • Author
    Posts
  • #11566 Reply

    Aigars

    Hi all. I really need help im newbie with jasper & api so i spend a week in work and at home to get result but nothing progress yet.
    I used tele2.*… and apitest.*jasper…
    I have tested echo nad get termindaldetails on tele2 and apitest so results is
    apitest = ok, tele2 [echo]=invalid licensekey & [getterminaldetails]=invalid username or password
    Have tester this scripts in php ok, than i try use soap ui to test tele2 and apitest again apitest
    getterminaldetails,sendsms,echo is ok, on tele2 Invalid license key. Please use a valid API license key.com.jasperwireless.ws.ApiExceptionInvalid & WssSoapFaultException: Authentication of Username Password Token Failed…
    I want to sendsms to iccid using php there is my code, with 0 errors and response: null
    i have tried https on my domain result 0. i dont know it maybe because curl dont supports https?
    when i turn off curl.php test script security check than ok i can curl https://google.com

    there is my code php, please tell if something wrong

    <?php
    require_once('nusoap.php');
    
    $JASPER_URI = 'https://apitest.jasperwireless.com/ws/schema';
    
    $env = 'apitest'; # Apitest URL. See "Get WSDL Files" in the API documentation for Production URL.
    $wsdlUrl = 'https://apitest.jasperwireless.com/ws/schema/Sms.wsdl';
    $licenseKey = 'license key';
    $userName = 'username';
    $password = 'pass';
    
    $service = new nusoap_client($wsdlUrl, true /** wsdl **/);
    $service->setHeaders(
    '<wsse:Security xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" soapenv:mustUnderstand="1">'.
    '<wsse:UsernameToken xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">'.
    '<wsse:Username>'.$userName.'</wsse:Username>'.
    '<wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">'.$password.'</wsse:Password>'.
    '</wsse:UsernameToken>'.
    '</wsse:Security>'
    );
    $msg =
    '<SendSMSRequest messageTextEncoding="LITERAL" xmlns="'.$JASPER_URI.'">'.
    '<messageId>1.0</messageId>'.
    '<version>1.0</version>'.
    '<licenseKey>'.$licenseKey.'</licenseKey>'. 
    '<sentToIccid>iccid</sentToIccid>'.
    '<messageText>send sms true php</messageText>'.
    '</SendSMSRequest>';
    	  
    $result = $service->call('SendSMS', $msg);
    
    if ($service->fault) {
      echo 'faultcode: ' . $service->faultcode . "\n";
      echo 'faultstring: ' . $service->faultstring . "\n";
      echo 'faultDetail: ' . $service->faultdetail . "\n";
      echo 'response: ' . $service->response;
      exit(0);
    }
    ?>

    I really think someones can help with this problem, Thank You!

Viewing 1 post (of 1 total)
Reply To: SendSMS PHP
Your information: