我用cordova做了一个Windows phone8.1应用程序,它使用PushPlugin来发送通知。我已经成功地订阅了频道,它给出了这样的东西:
https://db3.notify.windows.com/?token=AwYAAACgzvv%2b6pMI9lq1oUFa3HF31%...
我试图用PHP发送一个简单的Toast通知(见下文),但Microsoft服务器给出了标题400 - Bad Request answer。
HTTP/1.1 400 Bad Request Content-Length: 0 X-WNS-MSG-ID: D5DAEFC56A10C79 X-WNS-DEBUG-TRACE: DB3WNS4011233 Strict-Transport-Security: max-age=31536000; includeSubDomains WWW-Authenticate: Bearer Date: Thu, 01 Oct 2015 09:20:48 GMT‘内容类型:文本/xml’
‘'Accept: application/*’
"X-NotificationClass:$delay“
<?xml version="1.0" encoding="utf-8"?>
<wp:Notification xmlns:wp="WPNotification">
<wp:Toast>
<wp:Text1>test</wp:Text1>
<wp:Text2>test</wp:Text2>
</wp:Toast>
</wp:Notification>发布于 2015-10-01 19:11:33
对于Push Notification Service response codes for Windows Phone 8,您会出现以下错误:
当云服务发送包含错误的XML文档或格式错误的通知URI的通知请求时为
。
但我想知道,当你使用MPNS时,为什么你的请求答案包括"X-WNS-MSG-ID"和"X-WNS-DEBUG-TRACE",之类的东西。您可能在您的应用程序中混合了WNS和MPNS ...
有关此问题的详细信息,请单击此处:Choosing MPNS or WNS for a Windows Phone Silverlight 8.1 app
https://stackoverflow.com/questions/32884066
复制相似问题