开发者

Why is there no easy way to consume web services in Java?

I've been doing a lot of work exploring different methods to consume (.NET) web services in Java clients. It seems that this area is 开发者_C百科a black hole in Java. The easiest way that I have found is to use Apache Axis2 wsdl2java to generate the source files. But still, this requires some work to integrate Apache into my existing web applications.

I'm surprised that there is no easier way. Why is that?


Because there is. The required functionality for SOAP clients are included in the standard API library. You can use the wsimport tool (located in the bin directory of your JDK installation) to generate client classes from a specified WSDL.


I've not used metro, but it sounds like it integrates with JAXB2.0 well and might be worth taking a look at. I noticed a metro vs axis2 comparison which might be interesting if you are familiar with axis2 already.

for quick and dirty stuff the apache commons httpclient + jaxb works well.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜