首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >有人知道思科TelePresence服务器API4.0(2.8)

有人知道思科TelePresence服务器API4.0(2.8)
EN

Stack Overflow用户
提问于 2015-01-08 16:53:45
回答 1查看 302关注 0票数 0

现在,我有一个Java程序,我想用它来启动网真服务器。代码如下:

代码语言:javascript
复制
public static XmlRpcClient getMCUClient() throws MalformedURLException{
    Lock lock = new ReentrantLock();
    lock.lock();
    try {
        XmlRpcClient client = new XmlRpcClient("https://10.0.0.53/RPC2", true);
        return client;
    } finally {
        lock.unlock();
    }
}

我使用以下代码来创建一个会议:

代码语言:javascript
复制
XmlRpcClient client = XMLClientFactory.getMCUClient();

List<Conference> list = new ArrayList<Conference>();
conference.setAuthenticationUser("admin");
conference.setAuthenticationPassword("password");
conference.setConferenceName("conference_eg");
list.add(conference);

client.invoke("conference.create", list);

我想知道这是否正确,因为没有环境可供我测试。

EN

回答 1

Stack Overflow用户

发布于 2015-04-08 03:36:32

结合使用Spring和CXF。这很简单,而且很快:

SchedulingAPI13ServiceTest-context.xml:

代码语言:javascript
复制
<jaxws:client address="http://10.66.73.77:8080/ctxapi/api/v1_3/sched"
              id="client" 
              xmlns:s="http://sched.api.ctc.txbu.cisco.com"
              serviceName="s:SchedulingAPI_V1_3Service"
              endpointName="s:SchedulingAPI_V1_3Port"
              wsdlLocation="http://10.66.73.77:8080/ctxapi/api/v1_3/sched?wsdl"
              serviceClass="com.cisco.txbu.ctc.api.sched.ISchedulingAPI"
              username="foo"
              password="bar" >
</jaxws:client>

JUnit测试:

代码语言:javascript
复制
@ContextConfiguration
@RunWith(SpringJUnit4ClassRunner.class)
public class SchedulingAPI13ServiceTest {

    @Autowired
    ISchedulingAPI port;

    @Test
    public void requestResponseTest() throws Exception {
        GetServiceProvidersResult serviceProviders = port.getServiceProviders("(name sw Enterprise)");

    }
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/27836151

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档