目标c中的XMLParser错误,期望开始标记,'<'未找到?

时间:2012-09-06 10:26:36

标签: iphone web-services xml-parsing sudzc

在我的应用程序中,我尝试以NSString格式发送Web服务请求。我使用sudzc来生成Web服务。但是,当我发送请求时,我显示错误

Entity: line 1: parser error : Start tag expected, '<' not found
Bad Request

  Error Domain=CXMLErrorDomain Code=1 "The operation couldn’t be completed. (CXMLErrorDomain error 1.)"^

这是我的发送字符串,格式为xml,

 NSString *string=[NSString stringWithString:@"<request><ClosingDate>06-Sep-2012</ClosingDate><ProductName>Document Management Software</ProductName><ProductID>3</ProductID><CurrencyID>3</CurrencyID></request>"];

但错误显示'&lt;'未找到, 我不确切地知道错误是什么? 需要一些帮助

修改

我使用SUDZC来生成网络服务

 MFLCommonServices *services1=[MFLCommonServices service];

 NSString *request=[NSString stringWithString:@"<request><ClosingDate>06-Sep-2012</ClosingDate><ProductName>Document Management Software</ProductName><ProductID>3</ProductID><CurrencyID>3</CurrencyID></request>"];

 [services1 CreateRequest:self action:@selector(CreateRequestHandler:) Email:@"xxxxx"  Password:@"xxxxxx" Token:@"xxxxxx" Request:request];

0 个答案:

没有答案