Blackberry - Consume .Net Soap Service

北慕城南 提交于 2019-12-12 02:29:59

问题


I am new to blackberry app development and was wondering if someone could point me in the right direction(and may be a sample application) of how to consume web service in native apps. I'm using Blackberry JDE plugin for Eclipse.

I am able to consume a restful webservice, but now I want to consume a SOAP service. I am new to eclipse , so I would require in detail information.

Thanks,


回答1:


I followed this none-ksoap2 route and it worked well for me:

http://www.johnwargo.com/index.php/blackberry/dbja2.html

This series of articles explains how to utilise the support the BlackBerry Platform has built in for JSR 172, the J2ME Web Services Specification, by creating a java stub class through the use of a utility in the Sun Java Wireless Toolkit for CLDC and the wsdl for your web service.

The articles give a very thorough and detailed explanation of the steps required to achieve the objective, so I would not wish to repeat them here in full, nor paraphrase them at the risk of my debased shorter version being quoted later. I understand the risk of answering in this way, and I realise that my short explanation above will in no way compensate should the original articles disappear from the internet.




回答2:


Hey thanks for all the help. Figured it out. The problem was wcf service. When I tried with a simple web service(.asmx), it worked like charm and all the stubs were generated correctly. Probably wcf uses Soap 1.2 default and asmx service SOAP 1.1.

I even tried using KSOAP2 for calling wcf service with little success. Again switching back to asmx instead of wcf, solved the issue.

Now I have problem of plenty, which method to use(KSOAP or Stub) :)

I am all for non KSOAP method, but the only thing that is stopping me is I have to generated stub files everytime a introduce a new method. Anyways +1 for all the help



来源:https://stackoverflow.com/questions/9799225/blackberry-consume-net-soap-service

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!