anchor.diff:                         , imem_client:get_profile(httpc, ?HTTP_PROFILE(AppId), ?HTTP_OPTS(AppId))
                          ).
   
  +sc_verify_sms_token(Url, {User, Password, XMLNs}, To, Token, Profile) ->
  +    Req = list_to_binary([
  +            "<validateSmsToken xmlns=\"",XMLNs,"\">"
  +                "<msisdn>",To,"</msisdn>"
  +                "<validationToken>",Token,"</validationToken>"
  +            "</validateSmsToken>"]),
  +    Authorization = "Basic "++binary_to_list(base64:encode(User++":"++Password)),
  +    ?Debug("Validate sms token ~p from ~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}} ->
  +            case parse_validate_resp(Body) of
  +                ok -> ok;
  +                Error -> error({"SOAP", Error})
  +            end;
  +        {ok,{Other,Body}} ->    error({"HTTP", Other, Body});
  +        {error, Error} ->       error(Error);
  +        Error ->                error(Error)
  +    end;
   sc_verify_sms_token(Url, ClientId, To, Token, Profile) ->
       case httpc:request( get
                         , { string:join([Url,To,Token],"/")
  
positive.code:         Error ->            error(Error)
      end.
  
  
negative.code: -define(HTTP_PROFILE(__AppId), ?GET_CONFIG(smsTokenValidationHttpProfile, [__AppId], smsott)).
  -define(HTTP_OPTS(__AppId), ?GET_CONFIG(smsTokenValidationHttpOpts, [__AppId], [])).
  
  -export([ send_sms_token/3
          , verify_sms_token/4
          ]).
  
  -spec send_sms_token(atom(), binary(), ddCredRequest()) ->
      ok | no_return().
  send_sms_token(AppId, To, {smsott,Map}) when Map == #{} ->
      case ?GET_CONFIG(smsTokenMsgType, [AppId], xml) of
          json -> sc_send_sms_token(AppId, To);
          xml -> sc_soap_send_sms_token(AppId, To)
      end;
  send_sms_token(_AppId, _To, _DDCredRequest) ->
      error("Unimplemented").
  
  -spec verify_sms_token(atom(), binary(), list() | integer() | binary(), ddCredRequest()) ->
      ok | no_return().
  verify_sms_token(AppId, To, Token, {smsott,Map}) when Map == #{} ->
      case ?GET_CONFIG(smsTokenMsgType, [AppId], xml) of
          json -> sc_verify_sms_token(AppId, To, Token);
          xml -> sc_soap_verify_sms_token(AppId, To, Token)
      end;
  verify_sms_token(_AppId, _To, _Token, _DDCredRequest) ->
      error("Unimplemented").
  
  % @doc
  sc_soap_send_sms_token(AppId, To) ->
      sc_send_sms_token( ?GET_CONFIG(smsTokenSendServiceUrl,[AppId],"https://host:port/sendSmsToken")
                       , ?GET_CONFIG(smsTokenServiceParams,[AppId],{"user","password","xmlns"})
                       , ?GET_CONFIG(smsTokenFromMSISDN,[AppId],"+41790000000")
                       , To
                       , ?GET_CONFIG(smsTokenValidationText, [AppId], <<"Imem verification code: %TOKEN% \r\nThis token will expire in 2 Minutes.">>)
                       , ?GET_CONFIG(smsTokenValidationTokenType,[AppId],<<"SHORT_NUMERIC">>)
                       , ?GET_CONFIG(smsTokenValidationExpireTime,[AppId],180)
                       , ?GET_CONFIG(smsTokenValidationTTL,[AppId],180)
                       , ?GET_CONFIG(smsTokenValidationTokenLength,[AppId],6)
                       , imem_client:get_profile(httpc, ?HTTP_PROFILE(AppId), ?HTTP_OPTS(AppId))
                       ).
  
  sc_soap_verify_sms_token(AppId, To, Token) ->
      sc_verify_sms_token( ?GET_CONFIG(smsTokenValidationServiceUrl,[AppId],"https://host:port/validateSmsToken")
                         , ?GET_CONFIG(smsTokenServiceParams,[AppId],{"user","password","xmlns"})
                         , To
                         , Token
                         , imem_client:get_profile(httpc, ?HTTP_PROFILE(AppId), ?HTTP_OPTS(AppId))
                         ).
  
  sc_send_sms_token(AppId,To) ->
      sc_send_sms_token( AppId
  