g*****g 发帖数: 34805 | 1 Any WS expert gives me some update on whether C++ can
process Java collecion types with ease, such as HashMap
Or we have to fall back to array for everything?
Is an interface like this compliant?
public HashMap service() | c*****t 发帖数: 1879 | 2 C++ doesn't have HashMap by default; SGI / GNU implementations have
a version of it, but even then you cant' use it directly because
std::string etc do not have hash functions as part of their interface.
【在 g*****g 的大作中提到】 : Any WS expert gives me some update on whether C++ can : process Java collecion types with ease, such as HashMap : Or we have to fall back to array for everything? : Is an interface like this compliant? : public HashMap service()
| g*****g 发帖数: 34805 | 3 Let me get my question straight, I read a tip below today.
http://www.ibm.com/developerworks/webservices/library/ws-tip-coding.html
It suggested using array to wrap any collection I'd have in Java, which's
fine. But the article was 4 years old, any improvement between then and now?
【在 c*****t 的大作中提到】 : C++ doesn't have HashMap by default; SGI / GNU implementations have : a version of it, but even then you cant' use it directly because : std::string etc do not have hash functions as part of their interface.
| m******t 发帖数: 2416 | 4
now?
None that I know of. IIUC, the limitation on having any interoperable
dictionary type is kind of intrinsic, in that it's hard to standardize on
how null values are handled. IOW, when you get null back by looking up a key
, does it mean the key is available in the dictionary but with a null value,
or does it mean the key isn't available at all? The answer may not make
much difference in Java, but that's not necessarily true for all other
systems.
【在 g*****g 的大作中提到】 : Let me get my question straight, I read a tip below today. : http://www.ibm.com/developerworks/webservices/library/ws-tip-coding.html : It suggested using array to wrap any collection I'd have in Java, which's : fine. But the article was 4 years old, any improvement between then and now?
| g*****g 发帖数: 34805 | 5 You are talking about map here, how about Array/Set, do I have to convert
them to Array too?
key
value,
【在 m******t 的大作中提到】 : : now? : None that I know of. IIUC, the limitation on having any interoperable : dictionary type is kind of intrinsic, in that it's hard to standardize on : how null values are handled. IOW, when you get null back by looking up a key : , does it mean the key is available in the dictionary but with a null value, : or does it mean the key isn't available at all? The answer may not make : much difference in Java, but that's not necessarily true for all other : systems.
| m******t 发帖数: 2416 | 6
I would think so, unless you only need to worry about java clients. It's
probably hard to even come up with a good piece of xml schema to describe
these types.
【在 g*****g 的大作中提到】 : You are talking about map here, how about Array/Set, do I have to convert : them to Array too? : : key : value,
| g*****g 发帖数: 34805 | 7 OK, many thanks. They should probably standardize some collections though,
write wrapper class for every web service is boiler plate.
【在 m******t 的大作中提到】 : : I would think so, unless you only need to worry about java clients. It's : probably hard to even come up with a good piece of xml schema to describe : these types.
| r*****l 发帖数: 2859 | 8 Maybe my knowledge is old: unless you use generics,
you cannot use Collection in WS.
【在 g*****g 的大作中提到】 : Any WS expert gives me some update on whether C++ can : process Java collecion types with ease, such as HashMap : Or we have to fall back to array for everything? : Is an interface like this compliant? : public HashMap service()
|
|