`
yesjavame
  • 浏览: 659003 次
  • 性别: Icon_minigender_2
  • 来自: 杭州
文章分类
社区版块
存档分类
最新评论

Symbian学习笔记(19) - 初探Web Services API 的使用(下)

阅读更多

继续,看看如何取出结果值,就是<HelloWorldResult>Hello World</HelloWorldResult>中的字串HelloWorld,这个代码在CHelloWorldResult中:

TPtrC8 CHelloWorldResult::Result()

	{

		CSenElement * pElement = AsElement().Element(KHelloResult);

		if(pElement)

			{

			_LIT(STR,"result----");

			LOG(STR);

			return pElement->Content();

			}

		else {

			LOG(_L("no result"));

			return KNullDesC8();

			

		}

	}

其实这儿也好理解,看看CSenElement的SDK文档就知道个八九不离十了。

总结一下:

1.利用Symbian中的Web Services API实现一个WEB服务客户端是比较烦人的事情,主要的麻烦点在于SOAP请求与响应的XML内容都得自己去构造和解析。

2.常用的WebService只有EndPoint没有ID服务,所以它应该是基础型的WS框架。

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics