2012-02-28 8 views
0

crm4 환경의 계약 엔티티에서 첨부 파일과 메모를 다운로드하여 crm 2011 환경에 업로드하려고합니다.서비스에서 SOAP 예외가 발생했습니다.

내가 라인에서 SOAP의 예외가 (// 문자열 결과 = service.Fetch (sfetch))

// --------- Server Name ----------- 
string OrgName = "USF"; 
string CrmSite = "http://crm4"; 
string TmpFolder = "C:\\TempAnnotation\\"; 


CrmAuthenticationToken token = new CrmAuthenticationToken(); 
token.AuthenticationType = 0; 
token.OrganizationName = OrgName; 
CrmService service = new CrmService(); 

service.Url = CrmSite + "/mscrmservices/2007/crmservice.asmx"; 
service.CrmAuthenticationTokenValue = token; 
//service.Credentials = System.Net.CredentialCache.DefaultCredentials; 

service.Credentials = new System.Net.NetworkCredential("username", "password", "domain"); 

string sfetch = @"<fetch mapping='logical'><entity name='contract'> 
        <attribute name='modifiedon' /> 
        <attribute name='title' /> 
        <link-entity name='annotation' from='objectid' to='contractid'> 
         <attribute name='annotationid'/> 
         <attribute name='createdon'/> 
         <attribute name='createdby'/> 
         <attribute name='documentbody'/> 
         <attribute name='filename'/> 
         <attribute name='isdocument'/> 
         <attribute name='mimetype'/> 
         <attribute name='notetext'/> 
        </link-entity> 
        </entity> 
       </fetch> 
      "; 

String result = service.Fetch(sfetch); 
+0

System.Web.Services.Protocols.SoapException는 처리되지 않은 메시지 = 서버가 요청을 처리 할 수 ​​없습니다이었다. Source = System.Web.Services Actor = "" Lang = "" 노드 = "" Role = "" – maatthias

+0

결과로 10000 개가 넘는 레코드가 가능합니까? – arunes

답변

0

내가 시도 할 때 귀하의 코드가 잘 작동합니다.

추가 오류 세부 정보를 보려면 try/catch 블록을 추가 할 수 있습니까?

catch (System.Web.Services.Protocols.SoapException ex) 
{ 
    string error = ex.Message + " : " + ex.Detail.InnerText; 
} 
+0

"서버가 요청을 처리 할 수 ​​없습니다 : \ n 0x80040216 \ n 예기치 않은 오류가 발생했습니다. \ n 플랫폼 \ n" – maatthias

+0

내 코드가 사용중인 빌드는 무엇입니까? – maatthias

+0

CRM SDK 5.0.9 버전을 사용 중입니다. –

관련 문제