在GAE/J上玩Web服务
Web服务是GAE的主要交流工具,其中的核心部分就是RESTlet。但是目前来说,市场上还有很多很多的Web服务是只提供SOAP服务的,比如我现在正在解决的关于调用GoGrid CDN的API,在CDN这一块,他们只提供SOAP。但是想要在GAE/J上调用SOAP简直就是不可能。因为对很多类的限制,JAX-WS等一系列的传统方式,都无法在GAE/J上运行。
有一个force.com的网站,提供了一个婉转的办法。他们提供了一个WSC的类,可以将下载下来的WSDL文件,自动生成一个JAR包其中包含所需要链接的connector和类,然后在这个类的基础之上来操纵web服务。有兴趣的同志们可以直接去看看。
但是我的问题更严重,因为GoGrid CDN的SOAP API是基于.Net的,而我是用的Java,这又是一条横岗。在GAE的Issue里已经提交了这个问题,希望Google早日支持这个库,不然的话我可不想从JAXB开始手写调用Web服务。
先暂且把这个Task放一放,Azure这个服务商提供的API是支持REST的,这样总可以解决一些问题了。
This entry was posted on Tuesday, November 17th, 2009 at 10:18 am and is filed under GAE . You can follow any responses to this entry through the RSS 2.0 feed. Both comments and pings are currently closed.




Hi
GAE上整合webservice 有什么好方法吗
为什么我整合cxf上去 完全不行啊
Sorry, I am not quite familiar with CXF web service. However, with a simple Google, I just found that CXF may have dependency on JAXB while AppEngine doesn’t support JAXB officially. If that is the case for you, I guess that’s the reason why you cannot integrate nicely. At this stage without any scenario, my best guess would be use other kind of web service instead.