Как включить ведение журнала для XML?Как включить ведение журнала запросов и ответов в .Net DevKit V2
Я пытался следовать инструкциям из http://docs.developer.intuit.com/0025_Intuit_Anywhere/0200_DevKits/0100_IPP_.NET_DevKit/0600_Logging
Я поставил код в тестовой программе, полученной из HelloIntuitAnywhere для транзакции Добавить
Так что я положил его под нормальной обстановкой в нашей процедуре InvoiceAdd
realmId = HttpContext.Current.Session["realm"].ToString();
accessToken = HttpContext.Current.Session["accessToken"].ToString();
accessTokenSecret = HttpContext.Current.Session["accessTokenSecret"].ToString();
consumerKey = ConfigurationManager.AppSettings["consumerKey"].ToString(CultureInfo.InvariantCulture);
consumerSecret = ConfigurationManager.AppSettings["consumerSecret"].ToString(CultureInfo.InvariantCulture);
intuitServiceType = (IntuitServicesType)HttpContext.Current.Session["intuitServiceType"];
oauthValidator = new OAuthRequestValidator(accessToken, accessTokenSecret, consumerKey, consumerSecret);
context = new ServiceContext(oauthValidator, realmId, intuitServiceType);
commonService = new DataServices(context);
////////////////////////////////////////////
//OAuthRequestValidator
oauthValidator = new OAuthRequestValidator("<<accessToken>>",
"<<accessTokenSecret>>",
"<<consumerKey>>",
"<<consumerSecret>>");
//ServiceContext
context = new ServiceContext(oauthValidator, realmId, IntuitServicesType.QBO);
context.EnableServiceRequestsLogging = true;
context.ServiceRequestLoggingLocation = @"c:\IPPlogs";
//////////////////////////////////////////
Но получить InvalidTokenException на
context = new ServiceContext(oauthValidator, realmId, IntuitServicesType.QBO);
Когда ServiceContext создается для QBO, DevKit делает вызов для получения базового URL-адреса области: http: //docs.develo per.intuit.com/0025_Intuit_Anywhere/0050_Data_Services/v2/0400_QuickBooks_Online/0100_Calling_Data_Services/0010_Getting_the_Base_URL Здесь он терпит неудачу. Тоны OAuth истекли или не действительны для области, к которой вы звоните. Вы можете протестировать маркеры в API Explorer: http://apiexplorer.developer.intuit.com/ –