UCMA(OCS) 开发系列之一

前言


在一个Java项目中, 需要调用发送OCS及时通知的功能。而UCMA是C相关的技术。
实现方式: Java调用UCMA的WebService.


环境准备与要求


IIS 服务器端:
1. Window serves 2008 64 位
2. IIS 7
3. 需要安装.net 4.5 及以上, 因为UcmaSdkSetup4.exe 的需要
下载地址: https://www.microsoft.com/en-US/download/confirmation.aspx?id=30653
4. UCMA4 安装包 UcmaSdkSetup4.exe


本地开发端:
1. Visual Studio 2013
2. 需要安装.net 4.5 及以上, 因为UcmaSdkSetup4.exe 的需要
3. UCMA4 安装包 UcmaSdkSetup4.exe




 需要安装.net 4.5 及以上, 因为UcmaSdkSetup4.exe 的需要


Windows Power Shell 3.0
说明 :  https://technet.microsoft.com/zh-cn/library/dn362783.aspx
下载地址:  https://www.microsoft.com/en-us/download/details.aspx?id=34595


windows 2008 Desktop Experience 
安装说明: https://technet.microsoft.com/en-us/library/cc754314.aspx


本地开发与测试

1. 在Visual 新建Web工程
File --> New --> Project ...



2.选择Visual C# 下的Web , ASP.NET Empty Web Application, 命个名, 点击  OK




3. 默认只有一个Web.config, 



4. 工程上按右键, 点击Add --> New Item..:



5. 选择Web Service, 文件名修改为message.asmx



6. 接下来就是编写代码了。
主要是三个代码文件


message.asmx.cs   webservice 的类
OCSCall.cs        OCS的方法
OCSHelper.cs      OCS的子方法



7. 导入UCMA 包 , 
右键Reference--> Add Reference 



8. 选择 UCMA 的dll 的地址, 名字为Microsoft.Rtc.Collaboration.dll



9. [重要], 点击测试
测试之前, 一定要做如下动作
TOOLS -->Projects and Solution-->Web Projects --> 勾选 Use the 64 bit version of ....

如果不做的话, 会出现错误


出现以下错误:
An exception of type 'System.IO.FileNotFoundException' occurred in ocsnew.dll but was not handled in user code


Additional information: Could not load file or assembly 'SIPEPS, Version=5.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified


10. 至此, 本地测试的OCS Webservice信息就可以发送了



评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

oscar999

送以玫瑰,手留余香

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值