开发者

Java method exposed as web service using JAX-WS

I have got a function with prototype Bean1 fn(Bean2 ) in java. I am trying to expose it as a web service so that same can be called by a .net client or any other. I am using JAX-WS. Both Bean1 and Bean2 have got Hashmap, String and Int type of class variables. Please suggest me as on how to deal with the Bean classes. Isn't hashmap in java not same as in other technologies(if it exists at all).

Am too new to web services, please help!

开发者_JAVA百科

thanks, Manu


HashMap is java specific, so if you would want to have a map sent across the network via WS, declare it as an interface Map.

As for Bean1 and Bean2, I suggest you use @XmlElement to map your Bean to the XML Element.

For more, see this.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜