Welcome to Cisco-WebEx Connect Forums

These forums are available to all to read.  However, if you want to fully participate, post, etc., you'll need to sign into the site with Cisco CCO credentials.  If you do not already have these, go to the "Sign In" link in the upper right of the main page, and follow the self-service registration process.  This will not only allow you participate in these forum categories, but also new interactive features coming soon, and many other aspects of the Cisco developer networks set of web sites.

Look in the FAQ category for more information on leveraging the forums, RSS feeds, and more.

Message Boards Message Boards
Combination View Flat View Tree View
Threads [ Previous | Next ]
How Can I create a Discussion?
toggle
How Can I create a Discussion?
development widget wapi webex connect
8/31/09 8:39 AM
Hello Mr. Kingsley Lewis
I need your help to solve an issue on Webexconnect Widget Development Process.
I have a website which I have integrated in a Widget on the WebEx Space through an iFrame. I need to create a Discussion on WebEx Space from my Website in the iFrame as well as I need to participate in that Discussion from my Website opened in the iFrame on the Space through the Widget. Please help me to solve the issue. I know the solution for creation of the Discussion on WebEx Space from the widget if the widget is running on the WebEx Server Directly.....
 
var topic = "Discussion about: [Discussion Title]";
var
host=getExternalHost();
getExternalHost().workspace.CreateChatRm(host.ID,
$(root)._wbxThisWin.instanceId, $(root)._wbxThisWin.instanceId, topic,
mashkit.windowDotExternal.Workspace.ID);


But I need to do the same thing from the External Website.


I also need a detailed documentation on WAPI Calls with some examples if possible. Kindly help me to get my solutions.




MY NEED IS VERY MUCH SIMILAR LIKE THE DISCUSSION AVAILABLE ON WEBEX SPACE FILE TAB FOR THE FILES BUT FROM AN EXTERNAL WEBSITE.




I also need to show the presence of all the members on that particular Space from My Website.



Thanks and Regards


Tariq
Flag Flag
RE: How Can I create a Discussion?
9/2/09 6:48 PM as a reply to Md. Tariq Anjum.
Hi Tariq

Below is the sequence
I used to create a chatEntry.  You can modify this to fit your needs. As an example if your using something like java your server could do this with a URLConnection.   You can download the Cisco WebEx¿ Connect Platform Services - Core Services Reference Guide from the Documents tab above.
 
add chatEntry
 
-Login and get cred
http://swapi.webexconnect.com/wbxconnect/op.do?cmd=login&username={userName}&password={pass}&isp=WBX
cred = {cred}
 
-get UserID
https://swapi.webexconnect.com/wbxconnect/op.do?cmd=execute&task=GetUserProfile&cred={cred}&xml=<users><user><userName>{username}</userName><ISProviderID>AIM</ISProviderID></user></users>
UID={UID}
 
-get workspaces
https://swapi.webexconnect.com/wbxconnect/op.do?cmd=get&type=wksp&cred={cred}&where=<eq>/userID<value>{UID}</value></eq>&select=*
wkspId = {wkspId}
 
-get chat room Id
http://swapi.webexconnect.com/wbxconnect/op.do?cmd=get&type=chrm&select=*&cred={cred}&where=<eq>/workspaceID<value>{wkspId}</value></eq>
chrmId = {chrmId}
 
-setSession (assigns
wksp privileges )
https://swapi.webexconnect.com/wbxconnect/op.do?cmd=setsession&workspace={wkspId}&cred={cred}
 
-Create ChatEntry Obj
https://swapi.webexconnect.com/wbxconnect/op.do?cmd=create&type=chat&cred={cred}&xml=<chatEntry><type>groupchat</type><workspaceID>{wkspId}</workspaceID><timestamp>{UTC
time}</timestamp><chatRoomID>{chrmId}</chatRoomID><toUser/><fromUser>{userName}</fromUser><body>chat
created!!</body></chatEntry>
chatId = {chatId}
 
-commit
https://swapi.webexconnect.com/wbxconnect/op.do?cmd=commit&cred={cred}
 
-review
https://swapi.webexconnect.com/wbxconnect/op.do?cmd=get&type=chat&cred={cred}&select=*&where=<eq>/chatEntryID<value>{chatId}</value></eq>
 
Flag Flag
RE: How Can I create a Discussion?
9/4/09 7:24 AM as a reply to Kingsley Lewis.
Hi Mr. Lewis
Thanks a lot for your guidance and reply to my query. I have tried to use the sequence. I have a WebEx Connect Account with tariq.connect@gmail.com as user ID and when I am trying to login and get the credential using that ID I am getting the following Error:
 
<wbxapi>
¿
<messageStrings>
¿
<message>
wapi.login_failed - Sign in failed. User name or password is invalid or the user is inactive.
</message>
<message>AS0004</message>
</messageStrings>

¿
<securityContext>
<cred/>
</securityContext>
¿
<response>
<result>FAILURE</result>
<exceptionID>wapi.login_failed</exceptionID>
¿
<reason>
wapi.login_failed - Sign in failed. User name or password is invalid or the user is inactive.
</reason>
</response>
</wbxapi>
 
It will be of great help if you help me to sort this out.
 
Looking forward to your kind guidance.
 
Thanks
Tariq
Flag Flag
RE: How Can I create a Discussion?
9/4/09 11:23 PM as a reply to Md. Tariq Anjum.
Try changing &isp=WBX to &isp=AIM.  But a word of caution - this will change in the next release to &isp=WBX. 
 
Thank you,
-Kingsley
Flag Flag
RE: How Can I create a Discussion?
9/5/09 9:23 AM as a reply to Kingsley Lewis.
Hello Mr. Lewis
Thanks a lot for your guidance. I am able to login and get the user ID but when I am using the following CALL as you mentioned in your solution for getting the workspaces
 
-get workspaces
https://swapi.webexconnect.com/wbxconnect/op.do?cmd=get&type=wksp&cred={cred}&where=<eq>/userID<value>{UID}</value></eq>&select=*
 
with the cred and UID its giving me some error as:
 
<wbxapi>
¿
<messageStrings>
¿
<message>
wapi.incorrect_parameter_count - Number of parameters to a conditional or trigger expression is incorrect.
</message>
</messageStrings>
¿
<securityContext>
<cred>W01iIE95Nlj57cGCNi7BsV20000</cred>
</securityContext>
¿
<response>
<result>FAILURE</result>
<exceptionID>wapi.incorrect_parameter_count</exceptionID>
¿
<reason>
wapi.incorrect_parameter_count - Number of parameters to a conditional or trigger expression is incorrect.
</reason>
</response>
</wbxapi>

 
It will be very kind of you if you please guide me how to solve this issue.
 
Thanks and Regards
Tariq
 
Flag Flag
RE: How Can I create a Discussion?
9/9/09 7:07 PM as a reply to Md. Tariq Anjum.
Hi Tariq,
 
Sorry about that,  for some reason the path tags in the where clause keep getting removed.  If you see below I put them in "[" and "]" in place of angle brackets please make sure to change them back.
 
It should look like this
 1
 2-get
 3workspaces
 4https://swapi.webexconnect.com/wbxconnect/op.do?cmd=get&type=wksp&cred={cred}&where=<eq>[path]/userID[/path]<value>{UID}</value></eq>&select=*
 5wkspId = {wkspId}
 6 
 7-get chat room Id
 8http://swapi.webexconnect.com/wbxconnect/op.do?cmd=get&type=chrm&select=*&cred={cred}&where=<eq>[path]/workspaceID[/path]<value>{wkspId}</value></eq>
 9chrmId = {chrmId}
10 
11-setSession
12(assigns wksp privileges )
13https://swapi.webexconnect.com/wbxconnect/op.do?cmd=setsession&workspace={wkspId}&cred={cred}


 
 
After this error I went through this code and found another issue with the ChatEntry toUser tag.  Im currently working with the engineering team to see if we can resolve the issue and will post back here when I have more information.
 
thank you
-Kingsley Lewis
Flag Flag