在我的应用程序中,我正在使用 WSDl webservice。并尝试调用 webservice 方法。在该请求中成功发送并获得响应。但是当我使用以下方法获取该响应时:
// Called when the connection has finished loading.
- (void)connectionDidFinishLoading:(NSURLConnection *)connection {
NSError* error;
if(self.logging == YES) {
NSString* response = [[NSString alloc] initWithData: self.receivedData encoding: NSUTF8StringEncoding];
NSLog(@"response=%@", response);
[response release];
}
它给出了以下异常。我的 NSLog 语句显示了以下详细信息:
response=<?xml version='1.0' encoding='utf-8'?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Body><soapenv:Fault><faultcode>soapenv:Server</faultcode><faultstring>org.apache.axis2.databinding.ADBException: Unexpected subelement {http://services.webservices.sparta.com}sSessionId</faultstring><detail /></soapenv:Fault></soapenv:Body></soapenv:Envelope>
请建议我解决此问题的方法。谢谢你。