What's the easiest way for a Java Swing client to consumer a webservice?
I have a Java Swing application client that I want to use to consume certain webservices开发者_如何学运维, but I want to make it as painless as possible to code (because really all I want is the info). I do understand that whatever solution is used will need to stub the POJO's too.
If you'd like to give a demo, that would be great, or if you can point to a tutorial that would also be really appreciated.
I did look at Axis, including the more recent Axis2, but it's a bit more complex than I was hoping (aka. I have to learn something). At least just for some quick prototype testing and not real development, more for the sake of just saying I can, is there something or a tutorial out there?
Try http://sourceforge.net/projects/wsdl2javawizard/.
Are you writing the web service yourself? Use springframework's HttpInvokerProxyFactoryBean and HttpInvokerServiceExporter. I use these and swear by them.
Also you want to use apache's HttpClient.
Are you using someone else's web service? Pick a framework (axis/castor/metro?) and have it generate stubs.
I hate to say it, but the easiest way was to actually learn Axis2.
精彩评论