[英]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). 我有一个Java Swing应用程序客户端,我想使用它来使用某些Web服务,但是我想使其变得尽可能轻松地进行编码(因为实际上我想要的只是信息)。 I do understand that whatever solution is used will need to stub the POJO's too.
我确实知道,无论使用哪种解决方案,都需要对POJO进行存根处理。
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). 我确实看过Axis,包括最新的Axis2,但它比我希望的复杂得多(又名。我必须学习一些东西)。 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?
至少只是为了一些快速的原型测试而不是真正的开发,更多只是为了说我可以,那里有东西或教程吗?
Are you writing the web service yourself? 您是在自己编写Web服务吗? Use springframework's HttpInvokerProxyFactoryBean and HttpInvokerServiceExporter.
使用springframework的HttpInvokerProxyFactoryBean和HttpInvokerServiceExporter。 I use these and swear by them.
我使用这些并向他们发誓。
Also you want to use apache's HttpClient. 您还想使用apache的HttpClient。
Are you using someone else's web service? 您是否在使用别人的网络服务? Pick a framework (axis/castor/metro?) and have it generate stubs.
选择一个框架(轴/铸造/地铁?),并使其产生存根。
我讨厌这么说,但是最简单的方法是实际学习Axis2 。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.