2012-04-09 76 views
-1

在我的應用程序中,我使用WSDl webservice.And嘗試調用webservice方法。 在該請求successfuly發送並同時獲得response.But當我取,使用下面的方法迴應:WSDL連接拋出一個ADBException

 // 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> 

請建議我解決這個問題的方式。 謝謝。

+0

請提供關於您傳遞給它的Web服務和參數的更多描述。所以我們可以幫助你。 – 2012-04-09 06:25:03

回答

0

從問題描述我們不能確切地找出問題。

但是從你的日誌,我可以給你一些建議,以檢查你的代碼:

<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編碼上。

相關問題