anchor.diff:          Error ->            error(Error)
       end.
   
  +parse_validate_resp(Resp) ->
  +    case catch xmerl_scan:string(Resp) of
  +        {#xmlElement{name=validationResult,
  +                     content = [#xmlElement{name='ValidationResultType',
  +                                            content = [#xmlText{value = "OK"}]}]}, _} -> ok;
  +        {#xmlElement{name=validationResult,
  +                     content = [#xmlElement{name='ValidationResultType',
  +                                            content = [#xmlText{value = Other}]}]}, _} -> Other;
  +        Other ->
  +            ?Error("Parse ~p error ~p", [Resp, Other]),
  +            Other
  +    end.
  
positive.code:                        , imem_client:get_profile(httpc, ?HTTP_PROFILE(AppId), ?HTTP_OPTS(AppId))
                         ).
  
  sc_verify_sms_token(Url, ClientId, To, Token, Profile) ->
      case httpc:request( get
                        , { string:join([Url,To,Token],"/")
  
negative.code:                         "<timeToLiveSeconds>",TTLSec,"</timeToLiveSeconds>"
                          "<tokenlength>",TokenLength,"</tokenlength>"
                      "</sendSmsToken>"]),
              Authorization = "Basic "++binary_to_list(base64:encode(User++":"++Password)),
              ?Info("Sending sms token ~p to ~p", [Req, Url]),
              case httpc:request(
                     post, {Url, [{"Authorization",Authorization},
                                  {"Accept","application/xml;charset=utf-8"}],
                            "application/xml;charset=UTF-8", Req},
                     [{ssl,[{verify,0}]}], [{full_result, false}],
                     Profile) of
                  {ok,{200,_Body}} ->     ok;
                  {ok,{Other,Body}} ->    error({"HTTP", Other, Body});
                  {error, Error} ->       error(Error);
                  Error ->                error(Error)
              end;
          _ ->
              error({"Invalid token type", TokenType})
  