我有一个UCWA应用程序,我希望accept传入onlineMeetingInvitation事件,然后监控所有消息。虽然我已成功接受邀请,但我没有收到任何消息的事件。我相信这可能是因为默认情况下没有连接消息传递模式,所以我尝试addMessaging。不幸的是,此请求始终返回409错误和消息,
发生了冲突,阻止了操作的启动。请稍后再试。
有谁知道, 一个。如果尝试addMessaging是正确的? 湾为什么我收到上述错误?
我在对话中设置了两个普通的Lync客户端。然后我邀请我的UCWA应用程序的用户加入对话。这会在我的事件频道上产生以下响应(包括按预期的接受链接)
{
"_links": {
"self": {
"href": "/ucwa/oauth/v1/applications/102547331865/events?ack=28"
},
"next": {
"href": "/ucwa/oauth/v1/applications/102547331865/events?ack=29"
}
},
"sender": [
{
"rel": "me",
"href": "/ucwa/oauth/v1/applications/102547331865/me",
"events": [
{
"link": {
"rel": "presence",
"href": "/ucwa/oauth/v1/applications/102547331865/me/presence"
},
"type": "updated"
}
]
},
{
"rel": "communication",
"href": "/ucwa/oauth/v1/applications/102547331865/communication",
"events": [
{
"link": {
"rel": "onlineMeetingInvitation",
"href": "/ucwa/oauth/v1/applications/102547331865/communication/onlineMeetingInvitations/6cb18668cbda428e839652ae1f6cd58f"
},
"_embedded": {
"onlineMeetingInvitation": {
"direction": "Incoming",
"importance": "Normal",
"threadId": "AdIw2sMaOjuEJHfcRJiiK5Czug+5Ug==",
"state": "Connecting",
"subject": "",
"onlineMeetingUri": "sip:test.user2@xxx.xxx.xx;gruu;opaque=app:conf:focus:id:KS77KG4B",
"availableModalities": [
"Messaging"
],
"_links": {
"self": {
"href": "/ucwa/oauth/v1/applications/102547331865/communication/onlineMeetingInvitations/6cb18668cbda428e839652ae1f6cd58f"
},
"to": {
"href": "/ucwa/oauth/v1/applications/102547331865/people/test.user1@xxx.xxx.xx"
},
"conversation": {
"href": "/ucwa/oauth/v1/applications/102547331865/communication/conversations/3b80d6be-b57c-4cc1-b10d-cd5c89ffa09d"
},
"accept": {
"href": "/ucwa/oauth/v1/applications/102547331865/communication/onlineMeetingInvitations/6cb18668cbda428e839652ae1f6cd58f/accept"
},
"decline": {
"href": "/ucwa/oauth/v1/applications/102547331865/communication/onlineMeetingInvitations/6cb18668cbda428e839652ae1f6cd58f/decline"
}
},
"_embedded": {
"from": { ....

我在'接受'上执行POST href成功响应没有内容。然后我收到2个事件回复,第2个回复包括以下
...
{
"rel": "communication",
"href": "/ucwa/oauth/v1/applications/102547331865/communication",
"events": [
{
"link": {
"rel": "conversation",
"href": "/ucwa/oauth/v1/applications/102547331865/communication/conversations/3b80d6be-b57c-4cc1-b10d-cd5c89ffa09d"
},
"_embedded": {
"conversation": {
"state": "Conferenced",
"threadId": "AdIw2sMaOjuEJHfcRJiiK5Czug+5Ug==",
"subject": "",
"activeModalities": [
"Messaging"
],
"importance": "Normal",
"participantCount": 3,
"audienceMute": "Disabled",
"audienceMessaging": "Enabled",
"recording": false,
"_links": {
"self": {
"href": "/ucwa/oauth/v1/applications/102547331865/communication/conversations/3b80d6be-b57c-4cc1-b10d-cd5c89ffa09d"
},
"applicationSharing": {
"href": "/ucwa/oauth/v1/applications/102547331865/communication/conversations/3b80d6be-b57c-4cc1-b10d-cd5c89ffa09d/applicationSharing"
},
"audioVideo": {
"href": "/ucwa/oauth/v1/applications/102547331865/communication/conversations/3b80d6be-b57c-4cc1-b10d-cd5c89ffa09d/audioVideo"
},
"dataCollaboration": {
"href": "/ucwa/oauth/v1/applications/102547331865/communication/conversations/3b80d6be-b57c-4cc1-b10d-cd5c89ffa09d/dataCollaboration"
},
"messaging": {
"href": "/ucwa/oauth/v1/applications/102547331865/communication/conversations/3b80d6be-b57c-4cc1-b10d-cd5c89ffa09d/messaging"
},
"phoneAudio": {
"href": "/ucwa/oauth/v1/applications/102547331865/communication/conversations/3b80d6be-b57c-4cc1-b10d-cd5c89ffa09d/phoneAudio"
},
"localParticipant": {
"href": "/ucwa/oauth/v1/applications/102547331865/communication/conversations/3b80d6be-b57c-4cc1-b10d-cd5c89ffa09d/participants/test.user1@xxx.xxx.xx",
"title": "Test User1"
},
"addParticipant": {
"href": "/ucwa/oauth/v1/applications/102547331865/communication/participantInvitations?conversation=3b80d6be-b57c-4cc1-b10d-cd5c89ffa09d"
},
"leaders": {
"href": "/ucwa/oauth/v1/applications/102547331865/communication/conversations/3b80d6be-b57c-4cc1-b10d-cd5c89ffa09d/participants?filter=leaders"
},
"attendees": {
"href": "/ucwa/oauth/v1/applications/102547331865/communication/conversations/3b80d6be-b57c-4cc1-b10d-cd5c89ffa09d/participants?filter=attendees"
},
"lobby": {
"href": "/ucwa/oauth/v1/applications/102547331865/communication/conversations/3b80d6be-b57c-4cc1-b10d-cd5c89ffa09d/participants?filter=lobby"
},
"onlineMeeting": {
"href": "/ucwa/oauth/v1/applications/102547331865/communication/conversations/3b80d6be-b57c-4cc1-b10d-cd5c89ffa09d/onlineMeeting"
},
"enableAudienceMuteLock": {
"href": "/ucwa/oauth/v1/applications/102547331865/communication/conversations/3b80d6be-b57c-4cc1-b10d-cd5c89ffa09d/enableAudienceMuteLock"
},
"disableAudienceMessaging": {
"href": "/ucwa/oauth/v1/applications/102547331865/communication/conversations/3b80d6be-b57c-4cc1-b10d-cd5c89ffa09d/disableAudienceMessaging"
}
},
"rel": "conversation"
}
},
"type": "updated"
}
]
},
...
{
"link": {
"rel": "messaging",
"href": "/ucwa/oauth/v1/applications/102547331865/communication/conversations/3b80d6be-b57c-4cc1-b10d-cd5c89ffa09d/messaging"
},
"_embedded": {
"messaging": {
"state": "Disconnected",
"_links": {
"self": {
"href": "/ucwa/oauth/v1/applications/102547331865/communication/conversations/3b80d6be-b57c-4cc1-b10d-cd5c89ffa09d/messaging"
},
"conversation": {
"href": "/ucwa/oauth/v1/applications/102547331865/communication/conversations/3b80d6be-b57c-4cc1-b10d-cd5c89ffa09d"
},
"addMessaging": {
"href": "/ucwa/oauth/v1/applications/102547331865/communication/messagingInvitations?conversation=3b80d6be-b57c-4cc1-b10d-cd5c89ffa09d"
}
},
"rel": "messaging"
}
},
"type": "updated"
},
...

同样,我相信这是预期的,此时原始Lync客户端按预期显示3个参与者。
接下来,我尝试对上面代码段中的addMessaging href进行POST。 POST没有正文。
URI : https://xxx.xxx.xx/ucwa/oauth/v1/applications/102547331865/communication/messagingInvitations?conversation=0ae942e4-9133-4888-a0fb-8a7b182fff00
Method : POST
Headers : {Accept=[text/plain, application/json, application/*+json, */*], Content-Length=[0]}
Request body:

结果是409冲突,我没有收到两个Lync客户端添加到对话的新邮件的事件。
Header {Cache-Control=[no-cache], Pragma=[no-cache], Via=[1.1 DEVLYNC2.xxx.xxx.xx RtcInt], Content-Length=[120], Content-Type=[application/json], Expires=[-1], Server=[Microsoft-IIS/7.5], X-MS-Server-Fqdn=[DEVLYNC2.xxx.xx.xx], X-AspNet-Version=[4.0.30319], Strict-Transport-Security=[max-age=31536000; includeSubDomains], X-Powered-By=[ASP.NET], Date=[Fri, 28 Oct 2016 07:31:51 GMT]}
Body {"code":"Conflict","message":"There was a conflict that prevented the operation from starting. Please try again later."}

答案 0 :(得分:0)
您的问题似乎可以通过添加operationId来解决,即使在UCWA文档中已将其作为可选项提及。 根本原因可能是有关UCWA的microsoft文档的显示中存在一个可重现的错误:例如https://ucwa.skype.com/documentation/resources-startmessaging,用于选择API版本的下拉列表不可见。 仅在Mozilla Firefox中会发生此错误,并且在您的日志中看到它是您正在使用的版本(nb:我已经使用61版进行了测试)。 使用Chrome,它可以正确显示,并且您有时会看到operationID是强制性的(仅在某些版本的API上)。 您的服务器使用的API版本可以通过以下链接确定: https://docs.microsoft.com/en-us/skype-sdk/ucwa/versioning
我希望这可以帮助您解决UCWA的其他问题-无需使用试错法。