惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Project Zero
Project Zero
Security Archives - TechRepublic
Security Archives - TechRepublic
C
Cyber Attacks, Cyber Crime and Cyber Security
Security Latest
Security Latest
Scott Helme
Scott Helme
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
V
Vulnerabilities – Threatpost
C
CERT Recently Published Vulnerability Notes
S
Schneier on Security
G
GRAHAM CLULEY
L
Lohrmann on Cybersecurity
D
Darknet – Hacking Tools, Hacker News & Cyber Security
I
Intezer
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
F
Full Disclosure
T
The Exploit Database - CXSecurity.com
P
Proofpoint News Feed
WordPress大学
WordPress大学
Microsoft Azure Blog
Microsoft Azure Blog
H
Help Net Security
大猫的无限游戏
大猫的无限游戏
MyScale Blog
MyScale Blog
Hacker News: Ask HN
Hacker News: Ask HN
G
Google Developers Blog
H
Heimdal Security Blog
O
OpenAI News
Hugging Face - Blog
Hugging Face - Blog
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
L
LangChain Blog
C
Cisco Blogs
云风的 BLOG
云风的 BLOG
IT之家
IT之家
Cyberwarzone
Cyberwarzone
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
Know Your Adversary
Know Your Adversary
博客园 - 聂微东
The Cloudflare Blog
C
Check Point Blog
K
Kaspersky official blog
C
CXSECURITY Database RSS Feed - CXSecurity.com
月光博客
月光博客
T
Tor Project blog
T
Threat Research - Cisco Blogs
T
Tailwind CSS Blog
P
Proofpoint News Feed
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
A
About on SuperTechFans
小众软件
小众软件
Cloudbric
Cloudbric
A
Arctic Wolf

博客园 - 徐中

[BTS] WCF-SQL : You can only specify the READPAST lock in the READ COMMITTED or REPEATABLE READ isolation levels [BTS]a non-serializable object type 'System.Xml.XmlNode varXmlNode' can only be declared within an atomic scope or service [BTS] BizTalk EDI character set and separator settings [ThingWorx] Install Guideline [ThingWorx] Install PostgreSQL Issue [BTS] BizTalk EDI AS2 Error 1 [BTS] BizTalk With EF [BTS] Exception occurred when persisting state to the database [BTS] MSDTC [BTS] The value "" for the property InboundId is invalid [Android] Android Sutdio on Surface Pro 3 [RabbitMQ] AMQP close-reason, initiated by Library, code=541 [RabbitMQ] Connection failed [BTS] The adapter "SQL" raised an error message. Details "The Messaging Engine is shutting down. ". [BTS]The join order has been enforced because a local join hint is used.;Duplicate key was ignored.". [BTS] The external credentials in the SSO database are more recent. [BTS] SQL Adapter. New transaction cannot enlist in the specified transaction coordinator [BTS] WCF-SAP adapter [BTS] Deploy Command
[BTS] BizTalk WCF-SQL Adapter 高级应用
徐中 · 2019-12-23 · via 博客园 - 徐中

9102年岁尾,41岁的我居然还在搞 BizTalk,感觉就是一种悲伤。

国内用户少之又少,能坚持一直在使用的“忠实”用户那就更少了。

不是它不好用,而是微软全线转向云服务,这个产品也已经快10年没有微信技术专家的支持了。哎~~

针对 WCF-SAP Adapter 的简单使用,网上已经有专家介绍过了。这里只是记录一下自己在多年相关开发过程中积累下来的一点点经验。

场景:

  • 需要定时从订单表(SQL Server)中抽取订单数据(如:每分钟)
  • 订单数据有 Header 信息,有 Item 信息
  • 抽取到的新订单要推送给 xxx 系统(这个不在讨论范围内)

技术分析

  • 需要用到 SQL Adapter,这里选用 WCF-SQL Adapter
  • 需要轮询,用 WCF-SQL 的 Polling 即可
  • Header : Item 是 1 对多关系,需要用到 left join 查询语句

难点

  • 这个可以体现 Header/Item 一对多的关系,怎么用一个SQL来实现?

我想到的,就是直接用 SQL 写一个可以输出 XML 的查询语句,期中,在XML中体现出 Header/Item 的父子关系即可。

(这个在5年前用过,但到今天,还真给忘了,搞了5个小时,终于还是弄出来了)

示例SQL可以这么写:

select * 
from Header left join Item on Item.HeaderId = Header.Id
for xml auto
, element
, type
, root('Order')
, xmlschema

这样,一个类似如下结构的 XML 就生成了:

<Order>
  <Header>
     ...
    <Item>...</Item>
    <Item>...</Item>
    <Item>...</Item>
  </Header>
</Order>    

这样,就大大减小了在 orchestration 中频繁与 DB 进行交互的次数,并且一次查询,就可以把 header + item 数据一次性 Load 出来,方便很多!

避免遗忘,这里做了记录。 如果兄弟你也能用得上,请直接带走!

www.biztalkgroup.com