我有一个工作编排来处理 X12 消息。 现在,我需要将编排公开为 Web 服务 (ASMX),它接受文本输入(X12 消息)并返回文本响应(X12 响应)。 如果我尝试使用该向导,生成的 Web 服务将公开 X12 请求的内部 XML 表示形式,而不是其原始纯文本表示形式。
简而言之,我希望能够连接到 Web 服务(ASMX 而不是 WCF 服务),发送 X12 请求(纯文本)并获得适当的响应(也是纯文本)。
我见过使用 WCF 的示例,但没有一个使用简单的 Web 服务。
你能帮我一下吗?
谢谢!
I have an working orchestration in place to process X12 messages. Now I need to expose the orchestration as a webservice (ASMX) that accepts a text input (the X12 message) and returns the text response (the X12 response). If I try to use the wizard, the generated webservice will expose the inner XML representation of the X12 request and not the its original plain text representation.
In short, I want to be able to connect to a webservice (ASMX and not a WCF service), send a X12 request (plain text) and get the appropriate response (also plain text).
I've seen examples of this using WCF, but none with a simple webservice.
Can you give me a hand with this?
Thanks!
发布评论
评论(3)
一种可能的解决方案是创建一个 SOAP 处理程序,将纯文本转换为 xml 表示形式(以便 BizTalk 可以读取它),然后再转换回来。 虽然我自己没有尝试过,但它可能会起作用。 您需要为请求创建一个处理程序,并为响应创建一个处理程序,以拦截字符串并将其转换为 xml 模式并再次转换回来。 您还可以考虑使用通用 XML 文档而不是字符串,这可能是最简单的。 查看这篇文章:
http://blogs.msdn.com/richardbpi/archive/2006/11/10/exusing-biztalk-web-services-that-accept-generic-content.aspx
-Bryan
One possible solution would be to create a SOAP handler to convert the plain text to the xml representation (so BizTalk can read it) and back again. While I haven't tried this myself, it might work. You would need to create a handler for the request and one for the response to intercept the string and convert it to the xml schema and back again. You can also look at using a generic XML document instead of a string, that might be easiest. Check out this post:
http://blogs.msdn.com/richardbpi/archive/2006/11/10/exposing-biztalk-web-services-that-accept-generic-content.aspx
-Bryan
虽然我还没有尝试过,但我有一种感觉,如果管道中没有某种程度的自定义编码,您将无法做到这一点。
当您使用向导发布 Web 服务时,BizTalk 会获取所涉及的架构并将它们用作 Web 服务的类型,这在几乎所有情况下都有意义,但在您的情况下则不然。
然而,据我所知,没有什么好的方法可以通过 SOAP 获取 EDI 消息; 您可以创建 Web 服务来接受字符串消息并让客户端“知道”它需要是 X12,但无法在 WSDL 中对此进行描述。
但是,如果您这样做,您将在进入反汇编器和编排之前将 X12 消息放入管道中,包装在元素中(或类似的东西,具体取决于您修改 Web 服务的方式)您将需要一些代码来删除它,但这应该相对容易编写。
While I haven't tried, I have a feeling you will not be able to do that without some degree of custom coding in the pipeline.
When you publish the web service using the wizard, BizTalk takes the schemas involved and uses them as the types for the web service, this makes sense in almost all cases, but not in yours.
However , as far as I know, there is no good way to take and EDI message over SOAP; you could create your web service to accept a string message and have the client "know" that it needs to be X12, but there's no way to describe that in the WSDL.
If you would do that, however, you will get the X12 message into the pipeline, wrapped in a element (or somehting like that, depending on how you've modified your web service), before you get to the disassembler and to the orchestration you will have to have some code to strip that out, but that should be relatively easy to write.
我还将我的 x12 260 文件转换为 SOAP Webservice 。 最好的方法是什么...我正在转换为 XML 和 XML 发送到 SOAP...但这里的一个问题是我只得到 3 个 xml,其中该文件中只有事务详细信息...我的标题和消息在哪里? 预告片消失了:(
有人遇到过这样的问题
I would also Translate my x12 260 file to SOAP Webservice . what are the best way... iam converting to XML & sending to SOAP... but here a problem is i get only 3 xml's which has only Transaction Details inside that file.... where are my Header & Trailers gone :(
Anyone faced such issue