有 Java 编程相关的问题?

你可以在下面搜索框中键入要查询的问题!

java在SMSLib JSMPPGateway中指定“编号计划指示器”

使用SMSLib(JSMPPGateway)连接到SMPP服务器时,如何指定“编号计划指示器”

这是我当前的JSMPPGateway初始化:

gateway = new JSMPPGateway(systemId, ip, port, new BindAttributes(username, password, "smpp_1", BindType.TRANSCEIVER));

问题是我无法连接到网关:

IOException: java.io.IOException:
Receive negative bind response: Negative response 0000000f found

我的提供者(SMPP服务器的所有者)告诉我,我没有使用正确的编号计划指示器如何设置该参数


共 (1) 个答案

  1. # 1 楼答案

    Set the values of NPI,TON values specified by SMSC in Address params.
    

    例:

    网关=新的JSMPPGateway(系统ID、ip、端口、新的BindAttributes(用户名、密码、“smpp_1”、BindType.收发器、新地址(Address.TypeOfNumber.INTERNATIONAL、Address.NumberingPlanIndicator.NATIONAL))