cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
14162
Views
1
Helpful
1
Replies

We had use CWMS Rest API to schedule a meeting . after request success . but in the CWMS GUI, not have meeting . how can it solve this issues ?

xiangwa2
Cisco Employee
Cisco Employee

We had use CWMS Rest API to schedule a meeting . after request success . but in the CWMS GUI, not have meeting . how can it solve this issues ?


our request code as below

package demo;

import java.io.*;

import java.net.*;

import java.util.*;

import junit.framework.TestCase;

import org.apache.commons.codec.binary.Base64;

import org.apache.commons.codec.digest.DigestUtils;

import org.apache.commons.io.IOUtils;

import org.slf4j.Logger;

import org.slf4j.LoggerFactory;

public class DemoTest extends TestCase {

  private static Logger logger = LoggerFactory.getLogger(DemoTest.class);

  private JsonMapper jsonMapper = new JsonMapper();

  public void testDefault() throws Exception {

  logger.info("start");

  String requestText = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"

+"<serv:message xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\">"

+"    <header>"

+"        <securityContext>"

+"            <siteName>acme</siteName>"

+"            <webExID>hostid@acme.com</webExID>"

+"            <password>passw0rd</password>"

+"        </securityContext>"

+"    </header>"

+"    <body>"

+"        <bodyContent"

+"            xsi:type=\"java:com.webex.service.binding.meeting.CreateMeeting\">"

+"            <accessControl>"

+"                <meetingPassword>pass123</meetingPassword>"

+"            </accessControl>"

+"            <metaData>"

+"                <confName>Sample Meeting</confName>"

+"                <meetingType>1</meetingType>"

+"                <agenda>Test</agenda>"

+"            </metaData>"

+"            <participants>"

+"                <maxUserNumber>4</maxUserNumber>"

+"                <attendees>"

+"                    <attendee>"

+"                        <person>"

+"                            <name>Xu Huisheng</name>"

+"                            <email>xuhuisheng@xiaomi.com</email>"

+"                        </person>"

+"                    </attendee>"

+"                </attendees>"

+"            </participants>"

+"            <enableOptions>"

+"                <chat>true</chat>"

+"                <poll>true</poll>"

+"                <audioVideo>true</audioVideo>"

+"            </enableOptions>"

+"            <schedule>"

+"                <startDate>06/13/2018 10:10:10</startDate>"

+"                <openTime>900</openTime>"

+"                <joinTeleconfBeforeHost>true</joinTeleconfBeforeHost>"

+"                <duration>20</duration>"

+"                <timeZoneID>4</timeZoneID>"

+"            </schedule>"

+"            <telephony>"

+"                <telephonySupport>CALLIN</telephonySupport>"

+"                <extTelephonyDescription>"

+"                    Call 1-800-555-1234, Passcode 98765"

+"                </extTelephonyDescription>"

+"            </telephony>"

+"        </bodyContent>"

+"    </body>"

+"</serv:message>";

  System.setProperty("https.protocols", "TLSv1.1");

  String strXMLServer = "https://webextest.mioffice.cn/WBXService/XMLService";

  URL urlXMLServer = new URL(strXMLServer);

  URLConnection urlConnectionXMLServer = urlXMLServer.openConnection();

  urlConnectionXMLServer.setDoOutput(true);

  PrintWriter out = new PrintWriter(urlConnectionXMLServer.getOutputStream());

  out.println(requestText);

  BufferedReader in = new BufferedReader(new

  InputStreamReader(urlConnectionXMLServer.getInputStream()));

  String strInputLine;

  String strReturnXML = "";

  while((strInputLine = in.readLine()) != null) {

  strReturnXML += strInputLine;

  }

  strReturnXML = URLDecoder.decode(strReturnXML);

  System.out.println(strReturnXML);

  in.close();

  logger.info("end");

  }

}

return success coding

1 Reply 1

nmorrow
Cisco Employee
Cisco Employee

Hello,

     I cannot help with the CWMS API service, but I can answer your concern from the cloud based WebEx Meetings API perspective. XML API service error messages will appear as successful HTTPS requests if you are only checking HTTP status code. The actual error message would be needed to determine the cause of failure, but the example XML in your code is definitely using an incorrect siteName value, WebExID value, password value, and meetingType value. I cannot confirm the XML service URL, but you may also try launching the service URL in a web browser inside your network to see if a default XML service response is returned.