使用 wcf-sql 适配器

发布于 2025-01-05 08:40:00 字数 528 浏览 7 评论 0原文

我需要轮询 xml 格式的数据并将其映射到 EDI 834.........

我已经编写了用于 xml auto 的存储过程,

当我使用添加适配器元数据使用它时,我得到了一个 xml消息....

但我需要使用此 xml 消息将其映射到 EDI834 ....如何获取 xml 的结构,以便我可以在地图中使用它...

我也遵循 http://social.msdn.microsoft.com/Forums/en-US/biztalkgeneral/thread/6a7e0093-0692-4ba5-9e14-0d2090c2cf54

此线程并使用 xml 轮询生成方案并将其映射到 EDI834。

但是当我将地图用于出站地图时...它不会将轮询数据映射到 edi 834 ..

I need to poll the data in xml format and map it to the EDI 834.........

I have written the stored procedure using for xml auto,element

when i consume it using add adapter metadata i am getting a xml message....

but i need to use this xml message to map it to the EDI834 ....How to get the structure of xml so that i can use that in map....

I also followed http://social.msdn.microsoft.com/Forums/en-US/biztalkgeneral/thread/6a7e0093-0692-4ba5-9e14-0d2090c2cf54

this thread and generated the schems using xml polling and mapped that to EDI834.

But when i use the map into outbound map...It doesnt map the polling data to edi 834..

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

无所谓啦 2025-01-12 08:40:00

WCF-SQL 适配器无需使用“for xml auto, elements”语法。这是旧的 Sql 适配器的遗留物。

只需以返回一致结果集的方式编写存储过程,然后针对存储过程生成元数据。适配器框架将根据从存储过程返回的元数据创建适当的架构。

然后只需将数据从 WCF-SQL 架构映射到 EDI834 架构即可。

The WCF-SQL adapter removes the need to use the 'for xml auto, elements' syntax. This is a legacy leftover from the old Sql Adapter.

Just write your stored procedure in a manner to return a consistent result set, then generate metadata against the stored procedure. The adapter framework will create an appropriate schema based on the metadata returned from your stored procedure.

Then simply map the data from your WCF-SQL schema to your EDI834 schema.

动听の歌 2025-01-12 08:40:00

使用 FOR XML PATH 语法创建返回 xml(或 xml 部分)的存储过程

- 使用 WCF-SQL 设置接收位置。选择 XmlPolling。选择适配器的根名称和命名空间以包装从 SQL 返回的 xml(强制)。

-将轮询语句设置为:exec [SPNAME]

-将 PollDataAvailableStatement 设置为适当的值,该值将返回计数 >如果有要轮询的行/xml,则为 0。

- 对接收位置使用 passthrureceive 管道

- 设置一个发送端口 (FILE),该端口订阅来自用于接收位置的接收端口的所有内容。

-启动应用程序。检查从适配器返回的 XML。

-在 VS 中使用格式正确的 XML 生成架构(添加 -> 添加生成的项目 -> 生成架构)(注意:如果您之前尚未在机器上完成此操作)。

- 选择适配器生成的 xml 文件(为该文件指定一个代表您尝试创建的架构的名称)。

- 现在您应该有一个表示适配器返回的 xml 的架构,您可能必须手动浏览该架构并将数据类型更改为比向导选择的更合适的类型。

Create the stored procedure that returns xml (or xml part) by using the FOR XML PATH syntax

-Setup a receive location using WCF-SQL. Select XmlPolling. Choose a rootname and namespace for the adapter to wrap around the xml returned from SQL (mandatory).

-Set Polling Statement to: exec [SPNAME]

-Set PollDataAvailableStatement to something appropriate that will return a count > 0 if there are rows/xml to be polled.

-Use passthrureceive pipeline for the receive-location

-Set up a send port (FILE) that subscribes to everything that comes from the receiveport used for the receivelocation.

-Start the application. Examine the XML returned from the adapter.

-In VS generate a schema using well-formed XML (Add->Add generated Items->Generate Schemas) (NOTE: You may have to run the InstallWFX.vbs found under the BizTalk SDK/Utilities/Schema generator, if you have not already done this earlier on the machine).

-Choose the xml file generated by the adapter (give the file a name representing the schema you are trying to create).

-Now you should have a schema representing the xml returned by the adapter, you may have to go through the schema manually and change data types to something more appropriate than what the wizard has chosen.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文