0

我有一个工作灯通知适配器 - 有效负载如下所示:

WL.Server.notifyAllDevices(userSubscription, {
        badge: 1,
        sound: "sound.mp3",
        activateButtonLabel: "ClickMe",
        alert: notificationText,
        payload: {
            valueOne : inp1,
            valueTwo : inp2,
            valueThree : inp3
        }
    });

下面是调用此 2 次的示例 - 来自 messages.log 的消息:

[

3/11/13 23:37:52:595 GMT] 00000981 com.notnoop.apns.internal.ApnsConnectionImpl                 W Failed to send message com.notnoop.apns.EnhancedApnsNotification@bb51701b... trying again
java.net.SocketException: Connection closed by remote host
    at com.ibm.jsse2.qc.k(qc.java:71)
    at com.ibm.jsse2.h.write(h.java:29)
    at java.io.OutputStream.write(OutputStream.java:86)
    at com.notnoop.apns.internal.ApnsConnectionImpl.sendMessage(ApnsConnectionImpl.java:161)
    at com.notnoop.apns.internal.ApnsServiceImpl.push(ApnsServiceImpl.java:46)
    at com.notnoop.apns.internal.AbstractApnsService.push(AbstractApnsService.java:52)
    at com.notnoop.apns.internal.ApnsServiceImpl.push(ApnsServiceImpl.java:36)
    at com.worklight.integration.notification.apns.ApplicationConnection.sendNotification(ApplicationConnection.java:84)
    at com.worklight.integration.notification.apns.APNSMediator.sendNotification(APNSMediator.java:85)
    at com.worklight.integration.notification.Mediator$4.run(Mediator.java:174)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:482)
    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:345)
    at java.util.concurrent.FutureTask.run(FutureTask.java:177)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1121)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:614)
    at java.lang.Thread.run(Thread.java:780)

[3/11/13 23:41:53:849 GMT] 00000bff com.notnoop.apns.internal.ApnsConnectionImpl                 W Exception while waiting for error code
java.net.SocketException: Connection reset
    at java.net.SocketInputStream.read(SocketInputStream.java:200)
    at java.net.SocketInputStream.read(SocketInputStream.java:132)
    at com.ibm.jsse2.a.a(a.java:100)
    at com.ibm.jsse2.a.a(a.java:125)
    at com.ibm.jsse2.qc.a(qc.java:207)
    at com.ibm.jsse2.qc.a(qc.java:488)
    at com.ibm.jsse2.e.read(e.java:32)
    at java.io.InputStream.read(InputStream.java:113)
    at com.notnoop.apns.internal.ApnsConnectionImpl$1MonitoringThread.run(ApnsConnectionImpl.java:102)

然而,如果我将我的有效载荷减少到只有 2 个值 - 它可以工作。2是某种限制吗?

干杯

4

1 回答 1

1

有效载荷值大小没有限制。SocketException 是否始终以超过 2 个值发生在您身上?

于 2013-03-12T06:46:55.667 回答