Chinaunix首页 | 论坛 | 博客
  • 博客访问: 22203
  • 博文数量: 28
  • 博客积分: 670
  • 博客等级: 上士
  • 技术积分: 285
  • 用 户 组: 普通用户
  • 注册时间: 2010-05-09 11:27
文章分类

全部博文(28)

文章存档

2011年(28)

我的朋友
最近访客

分类: 嵌入式

2011-01-29 12:24:13

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

view plaincopy to clipboardprint?

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();   

     }    

}  

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框架。

阅读(237) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~