DataIMType

5 views
Skip to first unread message

Justin Stander

unread,
May 13, 2008, 12:46:00 PM5/13/08
to wimas3
Again, thanks for updating the code such that the dataIM transactions
are connected to the session object!

I am probably being blissfully ignorant here, but I have an instance
of FileStream in AIR via Flex 3 set up writing a UTF string out to
Session.sendDataIM and no matter what DataIMType I pass into that
method I get "Bad type received for type". I've tried all the
enumerations contained within DataIMType, and I am thinking I've over
looked a preliminary step to initiating a dataIM session from my
client.

Thoughts?

Jay Lynch

unread,
May 13, 2008, 11:05:33 PM5/13/08
to wimas3
Are you able to send an "invite"? Try just sending one of these with a
plain or empty string and see what happens, but you should be able to
send an invite, return an accept, and go from there.

There's no particular special steps involved before using DataIMs,
though you do need to make sure your capabilities are set properly on
each end and matching, perhaps it could be a problem there? The error
messages aren't always entirely accurate.

Justin Stander

unread,
May 14, 2008, 5:15:12 PM5/14/08
to wimas3
Thanks for the update Jay....

First thing I did was to update my capabilities with those that are
returned from a user using the AIM6 (I think its v6) client. On a side
note, is there an enumeration of the standard AIM capabilies, or is it
published some where? I've been throwing around UUID strings returned
from Pidgin and AIM with out having any clue what they indicate!

So, I populate my user object's capabilities array with all those
capabilities. I pass my user object back into setState( user:User )
and successfully got UserEvent.MY_INFO_UPDATE_RESULT. I don't know why
this is, but when I examine the User object attached to the event, the
capabilities array is still null. I used the debugger to step through
the code in the WIMAS3 library to see the incoming data before its
parsed into a User object, and it seems there aren't any capabilities
returned from the server though I explicity passed a User object into
setState( user:User ) that had an array of capabilities.

Outside of the capabilities, I also tried your suggestion with passing
in an empty string. I tried the following:

session.sendDataIM( buddyScreenName , DataIMType.INVITE , new
String() , user.capabilities.join(",") , false , false , message ) ;
session.sendDataIM( buddyScreenName , DataIMType.INVITE , "" ,
user.capabilities.join(",") , false , false , message ) ;

In both cases I get the warning:
"Missing required parameter (data)"

If I slip one character in as the data argument such as:
session.sendDataIM( buddyScreenName , DataIMType.INVITE , " " ,
user.capabilities.join(",") , false , false , message ) ;

I get the error as before:
"Bad type received for type"


> > Thoughts?- Hide quoted text -
>
> - Show quoted text -

Osman Ullah

unread,
May 14, 2008, 5:37:24 PM5/14/08
to wim...@googlegroups.com
How are you asserting capabilities? To assert capabilities, you have
to set the assertCapabilities array before signing in. You can't
change it once you are signed in.

Osman

Justin Stander

unread,
May 14, 2008, 6:58:06 PM5/14/08
to wimas3
Doah! Thanks for the heads up...

So now I am asserting my capabilities correctly, and the user signed
into my client is available to others for file transfers, so this is
definitely a step in the right direction. This still did not solve my
"Bad type received for type" problem, and now I am facing another
problem in light of being able to receive a data IM invite.
So, I receive the dataIM invite from another user, and I am trying to
send DataIMType.ACCEPT back:

session.sendDataIM( buddyScreenName , DataIMType.ACCEPT, " " ,
user.capabilities.join(",") , false , false , message ) ;

This also yields the error: "Bad type received for type". So now, any
time I try to use the sendDataIM in any capacity, I always get "Bad
type received for type".


> >> - Show quoted text -- Hide quoted text -

Jay Lynch

unread,
May 14, 2008, 7:45:33 PM5/14/08
to wimas3
> session.sendDataIM( buddyScreenName , DataIMType.ACCEPT, " " ,
> user.capabilities.join(",") , false , false , message ) ;

I'd suggest the issue is probably in the parameters here, this way
could work but as I see it and have been using it the capability here
is A capability, ie. the individual cap UUID assigned to the specific
feature you are using DataIMs to initiate, not the array of all that
you are supporting.

Justin Stander

unread,
May 15, 2008, 5:18:05 PM5/15/08
to wimas3
Thanks guys, that did the trick.

Justin Stander

unread,
May 19, 2008, 11:06:23 AM5/19/08
to wimas3
For those interested in the published UUIDs, I found them here:
http://dev.aol.com/aim/oscar/#UUID
Reply all
Reply to author
Forward
0 new messages