简体   繁体   English

Java Swing客户端使用Web服务的最简单方法是什么?

[英]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.

相关问题 带有Java Swing的Netbeans GUI Builder; 组织小部件最简单的方法是什么? - Netbeans GUI Builder with Java Swing; What's the easiest way to organize Widgets? 在Java Swing中显示Windows资源管理器类型的文件结构的最简单方法是什么? - What's the easiest way to show a Windows Explorer-type file structure in Java Swing? 使用带有 Swing 的鼠标绘制(单色)数组的最简单方法是什么? - What's the easiest way to draw a (monochrome) array using a mouse with Swing? 在Eclipse IDE中设计Java Swing GUI的最简单方法是什么? - What is the easiest way to design Java Swing GUIs in Eclipse IDE? 持久化 Java 对象的最简单方法是什么? - What's the easiest way to persist java objects? 在 Java 中实现计时器的最简单方法是什么? - What's the easiest way to implement a timer in Java? 用消息启动默认邮件客户端的最简单方法是什么 - What's the easiest way to start default mail client with message 从RPC编码的WSDL生成Java客户端的最简单方法是什么? - What is the easiest way to generate a Java client from an RPC encoded WSDL 在Java中操作ActiveX对象的最佳/最简单方法是什么? - What's the best/easiest way to manipulate ActiveX objects in Java? 在Java应用程序中使用C源代码的最简单方法是什么? - What's the easiest way to use C source code in a Java application?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM