Hi, I am trying to integrate webex meeting request. I am using following code to do that
Dim strXMLServer As String = "https://apidemoeu.webex.com/WBXService/XMLService"
Dim request As WebRequest = WebRequest.Create(strXMLServer)
' Set the Method property of the request to POST.
request.Method = "POST"
' Set the ContentType property of the WebRequest.
request.ContentType = "application/x-www-form-urlencoded"
' Create POST data and convert it to a byte array.
Dim strXML As String = "<?xml version=""1.0"" encoding=""UTF-8""?>" + vbCrLf
strXML += "<serv:message xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance"">" + vbCrLf
strXML += "<header>" + vbCrLf
strXML += "<securityContext>" + vbCrLf
strXML += "<webExID>hostid</webExID>" + vbCrLf
strXML += "<password>hostpassword</password>" + vbCrLf
strXML += "<siteID>siteid</siteID>" + vbCrLf
strXML += "<siteName>go</siteName>" + vbCrLf
strXML += "<partnerID>g0webx!</partnerID>" + vbCrLf
strXML += "</securityContext>" + vbCrLf
strXML += "</header>" + vbCrLf
strXML += "<body>" + vbCrLf
strXML += "<bodyContent xsi:type=""java:com.webex.service.binding.meeting.CreateMeeting"" >" + vbCrLf
strXML += "<accessControl>" + vbCrLf
strXML += "<meetingPassword>infoneedle</meetingPassword>" + vbCrLf
strXML += "</accessControl>" + vbCrLf
strXML += "<metaData>" + vbCrLf
strXML += "<confName>WebEx Meeting Test 1</confName>" + vbCrLf
strXML += "<agenda>Test</agenda>" + vbCrLf
strXML += " </metaData>" + vbCrLf
strXML += "<enableOptions>" + vbCrLf
strXML += "<chat>1</chat>" + vbCrLf
strXML += "<poll>1</poll>" + vbCrLf
strXML += "<audioVideo>1</audioVideo>" + vbCrLf
strXML += "</enableOptions>" + vbCrLf
strXML += "<schedule>" + vbCrLf
strXML += "<startDate>02/14/2014 7:00:/startDate>" + vbCrLf
strXML += "<poll>1</poll>" + vbCrLf
strXML += "<audioVideo>1</audioVideo>" + vbCrLf
strXML += "</enableOptions>" + vbCrLf
strXML += "<timeZoneID>45</timeZoneID>" + vbCrLf
strXML += "<openTime>900</openTime>" + vbCrLf
strXML += "</schedule>" + vbCrLf
strXML += "</bodyContent>" + vbCrLf
strXML += "</body>" + vbCrLf
strXML += "</serv:message>"
Dim byteArray() As Byte = Encoding.UTF8.GetBytes(strXML)
' Set the ContentLength property of the WebRequest.
request.ContentLength = byteArray.Length
' Get the request stream.
Dim dataStream As Stream = request.GetRequestStream()
' Write the data to the request stream.
dataStream.Write(byteArray, 0, byteArray.Length)
' Close the Stream object.
dataStream.Close()
' Get the response.
Dim response As WebResponse = request.GetResponse()
' Get the stream containing content returned by the server.
dataStream = response.GetResponseStream()
' Open the stream using a StreamReader for easy access.
Dim reader As New StreamReader(dataStream)
' Read the content.
Dim responseFromServer As String = reader.ReadToEnd()
' Display the content.
Console.WriteLine(responseFromServer)
' Clean up the streams.
reader.Close()
dataStream.Close()
response.Close()
But I end up getting response
<?xml version="1.0" encoding="UTF-8" ?> <serv:message xmlns:serv="http://www.webex.com/schemas/2002/06/service" xmlns:com="http://www.webex.com/schemas/2002/06/common"> <serv:header> <serv:response> <serv:result>FAILURE</serv:result> <serv:reason>Failed to get SiteUrl</serv:reason> <serv:gsbStatus>PRIMARY</serv:gsbStatus> <serv:exceptionID>010000</serv:exceptionID></serv:response> </serv:header> <serv:body> </serv:body> </serv:message>
Can anyone help me with resolving this issue?
Thank you
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Hello,
This error occurs when site id or site name are incorrect. You should actually limit the values you use in your securityContext to either WebExID OR email, password, and siteID OR siteName. Also, your site name should match the sub-domain of your WebEx URL, in this case it should be apidemoeu based on your POST URL.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Thank you very much. I figured that out. I have one more question. I have signed up for a Basic plan on WebEx site. Is there a way to integrate with this site? Do i get SiteID and PartnerID for this?
Thank you
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Could You please explain how did you resolved an issue?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Comments
0 comments
Please sign in to leave a comment.