处理SUDZC的响应结果

编程入门 行业动态 更新时间:2024-10-15 08:25:55
本文介绍了处理SUDZC的响应结果-NSMutableArray的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我正在将SUDZC与Web服务一起使用,该服务响应几个不同的数组:E_ANT,EFULLNAME,E_RULE,E_VACDAYS.但是,当我查看请求结果时,只有E_ANT的值可见.我如何才能访问其他项目,或者使用sudzc无法做到这一点?

I am using SUDZC with a web service that responds with several different arrays: E_ANT, EFULLNAME, E_RULE, E_VACDAYS. But when I take a look into the request result there are only the values for the E_ANT visible. How can I access the other items or is this not possible with sudzc?

<n0:Z_COM_URL_GETRECORDSResponse xmlns:n0="urn:sap-com:document:sap:rfc:functions"> <E_ANT> <item> <MANDT>010</MANDT> <USERID>00000016</USERID> <VAC_DATE>2012-01-09</VAC_DATE> </item> <item> <MANDT>010</MANDT> <USERID>00000016</USERID> <VAC_DATE>2012-02-01</VAC_DATE> </item> .... <item> <MANDT>010</MANDT> <USERID>00000016</USERID> <VAC_DATE>2012-03-15</VAC_DATE> </item> </E_ANT> <E_FULLNAME>Vanessa Martinez</E_FULLNAME> <E_RULE> <item> <MANDT>010</MANDT> <USERID>00000016</USERID> <DATE_FROM>2008-01-07</DATE_FROM> <DATE_TO>9999-12-31</DATE_TO> <VAC_ENTITLE>30.0</VAC_ENTITLE> <ERNAM_ID>00004001</ERNAM_ID> <ERDAT>2008-01-15</ERDAT> </item> </E_RULE> <E_VACDAYS> <MANDT>010</MANDT> <USERID>00000016</USERID> <KJAHR>2012</KJAHR> <VAC_THIS_YEAR>30.0</VAC_THIS_YEAR> </E_VACDAYS> <E_VACPAID/> </n0:Z_COM_URL_GETRECORDSResponse>

推荐答案

我的输出不在xml中.您是在向我们显示sudzc的输出还是实际的xml数据? 这就是我提取sudzc数据的方式

My output was not in xml. Are you showing us the output from sudzc or the actual xml data? This is how I extracted my sudzc data

if( [value isKindOfClass:[NSError class]] || [value isKindOfClass:[SoapFault class]] ) { NSLog(@"%@", [value description]); return; } // Verify we're a dictionary if( ![value isKindOfClass:[NSDictionary class]] ) { NSLog(@"ERROR: Response not a dictionary"); return; } NSDictionary* dict = (NSDictionary*)value; NSDictionary* resp = [dict objectForKey:@"E_AN"]; if( ( resp == nil ) || ![resp isKindOfClass:[NSDictionary class]] ) { NSLog(@"ERROR: E_AN not a dictionary"); return; } dict = [resp objectForKey:@"item"]; if( ( dict == nil ) || ![dict isKindOfClass:[NSDictionary class]] ) { NSLog(@"ERROR: item not a dictionary"); return; } resp = [dict objectForKey:@"MANDT"]; if( ( resp == nil ) || ![resp isKindOfClass:[NSDictionary class]] ) { NSLog(@"ERROR: MANDT not a dictionary"); return; }

...

更多推荐

处理SUDZC的响应结果

本文发布于:2023-11-25 23:06:30,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1631710.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:SUDZC

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!