Я хочу отправлять электронные письма с вложениями csv и получать их через POP3, отображать и помещать в базу данных SQL с помощью biztalk.
У меня есть место получения файла, которое выбирает файл.
Получить свойства местоположения:
Конфигурации трубопровода
Вставляю файл в папку.
Файл выбран biztalk.
Журналы, показывающие обрабатываемый файл:
Timestamp: 5/9/2018 10:48:20 AM Message: <ns0:Request
xmlns:ns0='http://ABC.MW.BackEnds.sp_MW_InformacaoTransaccaoSQL'>
<ns1:sp_MW_InformacaoTransaccoes
xmlns:ns1='http://schemas.microsoft.com/Sql/2008/05/TypedProcedures/dbo'>
<ns1:codEstado>1</ns1:codEstado> <ns1:ficheiroNome>C:\XYZ\TransacFecho\NoErrors-
a.csv</ns1:ficheiroNome> <ns1:numLinhas>0</ns1:numLinhas>
<ns1:Debug>false</ns1:Debug> </ns1:sp_MW_InformacaoTransaccoes> </ns0:Request>
Category: General Priority: 1 EventId: 0 Severity: Information Title: Machine:
CORE04 Application Domain: __XDomain_3.0.1.0_0 Process Id: 44997 Process Name:
C:\Program Files (x86)\Microsoft BizTalk Server 2013 R2\BTSNTSvc.exe Win32
Thread Id: 952 Thread Name: Extended Properties:
Данные вставляются в базу данных после сопоставления.
Я создал адрес электронной почты, аналогичный местоположению получения файла.
Свойства почты.
Свойства POP3.
Конфигурации трубопровода.
Я проверяю тот же CSV-файл по почте.
Получено письмо с вложенным файлом.
Почта обрабатывается и удаляется biztalk.
Я получаю ошибку.
Timestamp: 5/9/2018 2:39:47 PM Message:
Microsoft.XLANGs.Core.PersistenceException: Exception occurred when persisting
state to the database. --->
Microsoft.BizTalk.XLANGs.BTXEngine.PersistenceItemException: A batch item failed
persistence Item-ID c99ae447-8f55-4589-9003-012e6bc599ad OperationType
MAIO_CommitBatch Status -1061151998 ErrorInfo The published message could not be
routed because no subscribers were found. . --->
Microsoft.BizTalk.XLANGs.BTXEngine.PublishMessageException: Failed to publish
(send) a message in the batch. This is usually because there is no one expecting
to receive this message. The error was The published message could not be routed
because no subscribers were found. with status -1061151998. --- End of inner
exception stack trace --- --- End of inner exception stack trace --- at
Microsoft.BizTalk.XLANGs.BTXEngine.BTXXlangStore.Commit() at
Microsoft.XLANGs.Core.Service.Persist(Boolean dehydrate, Context ctx, Boolean
idleRequired, Boolean finalPersist, Boolean bypassCommit, Boolean terminate) at
Microsoft.XLANGs.Core.LongRunningTransaction.PendingCommit(Boolean ignore,
XMessage msg) at Microsoft.XLANGs.Core.Service.PendingCommit(Boolean ignore,
XMessage msg) at Microsoft.XLANGs.Core.ServiceContext.PendingCommit(Boolean
ignore, XMessage msg) at
Microsoft.XLANGs.Core.ExceptionHandlingContext.PendingCommit(Boolean
ignoreCommit, XMessage msg) at
Microsoft.XLANGs.Core.ExceptionHandlingContext.PendingCommit(Boolean
ignoreCommit, XMessage msg) at
Microsoft.BizTalk.XLANGs.BTXEngine.BTXPortBase.SendMessage(Int32 iOperation,
XLANGMessage msg, Correlation[] initCorrelations, Correlation[]
followCorrelations, Context cxt, Segment seg, ActivityFlags flags) at
XYZ.Middleware.Core.Bts.Orchestrations.oProcessSelectorPublisher.segment2(S
topConditions stopOn) at
Microsoft.XLANGs.Core.SegmentScheduler.RunASegment(Segment s, StopConditions
stopCond, Exception& exp) Category: Critical Priority: 4 EventId: 0 Severity:
Critical Title: Machine: CORE04 Application Domain: __XDomain_3.0.1.0_0 Process
Id: 44998 Process Name: C:\Program Files (x86)\Microsoft BizTalk Server 2013
R2\BTSNTSvc.exe Win32 Thread Id: 5792 Thread Name: Extended Properties:
Edit1: я перехватил сообщение в biztalk, полученное через POP3, остановив оркестровку, и сравнил его с сообщением, полученным через местоположение файла.
Сообщение электронной почты:
Файл сообщения:
В письме есть дополнительная часть тела. Можно ли игнорировать его непосредственно в месте получения, используя mime-декодер? Иначе какие варианты у меня есть? Если возможно, я бы не хотел редактировать оркестровку или добавлять новую оркестровку.