AXForum  
Вернуться   AXForum > Microsoft Dynamics AX > DAX: Программирование
All
Забыли пароль?
Зарегистрироваться Правила Справка Пользователи Сообщения за день Поиск

 
 
Опции темы Поиск в этой теме Опции просмотра
Старый 04.08.2011, 20:55   #1  
ideveloper is offline
ideveloper
Участник
 
34 / 11 (1) +
Регистрация: 11.05.2011
The document hash does not match the hash in the XML
Я пытаюс обновить даты с помощью AIF-update function и BizTalk WebServices.

Для этого мне нужно передать правильный DocumentHash. Его я получаю с помощью функции AIF-find.

Но каждый раз при обновлении я получаю ошибку
The document hash does not match the hash in the XML. The document may have been changed since last read

Считав данные я получаю тот же самый DocumentHash.

В чём же здесь проблема???
Старый 05.08.2011, 09:02   #2  
AndyD is offline
AndyD
Участник
КОРУС Консалтинг
Лучший по профессии 2015
Лучший по профессии 2014
Лучший по профессии AXAWARD 2013
Лучший по профессии 2011
 
2,560 / 2476 (88) +++++++++
Регистрация: 20.08.2005
Не работал с AIF, но...

А разве хэш не рассчитывается при сеарилизации документа? Зачем его самому передавать?
__________________
Axapta v.3.0 sp5 kr2
Старый 05.08.2011, 09:40   #3  
ideveloper is offline
ideveloper
Участник
 
34 / 11 (1) +
Регистрация: 11.05.2011
Так как описано здесь http://msdn.microsoft.com/en-us/library/cc639058.aspx это даже необходимо

[...]When you read data, AIF returns a document hash field. This field contains a hash of all the RecId and RecVersion values for each record that is returned. When you send the data back into AIF to update a record, it recalculates the document hash from the database records in the update and compares it to the document hash in the inbound message. If the data has changed, for example, if a record was updated or added, the calculated document hash will differ from the document hash in the inbound document and AIF will return an error.

When you use the document hash, you only have to read and submit one field for comparison instead of reading and submitting the RecId and RecVersion values for each record.
[...]
Старый 05.08.2011, 20:29   #4  
ideveloper is offline
ideveloper
Участник
 
34 / 11 (1) +
Регистрация: 11.05.2011
Проблема решена.
Я стёр полностю весь сервис и сделал его заного с помощью AIF-Wizard
(Но это очень странно)
Теги
aif, documenthash, update

 

Похожие темы
Тема Автор Раздел Ответов Посл. сообщение
Dynamics AX Sustained Engineering: Sales tax information is not recaculated if document date is changed in a journal when sales tax is calculated using document date Blog bot DAX Blogs 0 22.06.2011 08:13
emeadaxsupport: Document References Are Not Always Deleted Blog bot DAX Blogs 0 23.02.2011 21:11
X++: Serializing Axapta Foundation Class instances as XML streams Blog bot DAX Blogs 0 04.06.2009 23:05
Inside Dynamics AX 4.0: XML Document Integration Blog bot DAX Blogs 0 04.10.2007 11:20
dax-lessons: Document Handling in AX - setup and Example Blog bot DAX Blogs 0 27.08.2007 23:00

Ваши права в разделе
Вы не можете создавать новые темы
Вы не можете отвечать в темах
Вы не можете прикреплять вложения
Вы не можете редактировать свои сообщения

BB коды Вкл.
Смайлы Вкл.
[IMG] код Вкл.
HTML код Выкл.
Быстрый переход

Рейтинг@Mail.ru
Часовой пояс GMT +3, время: 08:06.
Powered by vBulletin® v3.8.5. Перевод: zCarot
Контактная информация, Реклама.