【问题标题】:WSDL connection throws an ADBExceptionWSDL 连接引发 ADBException
【发布时间】:2012-04-13 00:50:22
【问题描述】:

在我的应用程序中,我正在使用 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>

请建议我解决此问题的方法。 谢谢。

【问题讨论】:

  • 请提供更多关于 Web 服务和传递给它的参数的描述。以便我们为您提供帮助。

标签: iphone objective-c xcode wsdl xmlhttprequest


【解决方案1】:

从问题描述中我们无法准确找出问题所在。

但是从你的日志中我可以给你一些建议来检查你的代码:

<soapenv:Fault><faultcode>soapenv:Server</faultcode><faultstring>

1) 您可能向网络服务传递了错误数量的参数。

2) 参数data type 可以是not be matching。例如,您传递string,服务器接受integer,反之亦然。

3) 或web-service having some problem

您也可以搜索org.apache.axis2.databinding.ADBException: Unexpected subelement。有许多有用的链接可以帮助您确定问题出在您的网络服务还是您的 iphone 编码中。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2017-08-23
    • 1970-01-01
    • 1970-01-01
    • 2013-04-11
    • 2016-10-26
    • 1970-01-01
    • 2013-05-10
    • 1970-01-01
    相关资源
    最近更新 更多