继续,看看如何取出结果值,就是<HelloWorldResult>Hello World</HelloWorldResult>中的字串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框架。
617

被折叠的 条评论
为什么被折叠?



