Submitting Xml Documents to BizTalk 2006 via SOAP

原创 2007年09月21日 10:16:00

 The other day, a question was asked in community ‘has anyone expose BizTalk web service as XmlDocument’. I asked the question to myself and figured that I should write something about this.

Pros and cons when expose untyped web service
The benefit seems apparent, by expose a web service consuming XmlDocument, you basically announcing you will accept any types of message. Imagine your firm requires a ‘messaging portal’ web service instead of building every endpoint for each service, untyped web service is the way to go.
The drawback is apparent as well, your web service consumers have to take care of message construction themselves instead of take advantage of strong type message automatic proxy generation.
Scenario
I pictured a simple example, your exposed web service consumes an XmlDocument, it then relays the request to individual processing orchestrations, each processing orchestration returns an acknowledge message after it gets the request and then continue processing.
This untyped web service acts as message router, each concrete processing orchestration registered in the message router by implement an inverse direct bounding port and filter out messages they not interested. By a design like this, as this ‘messaging portal’ involves, new orchestrations can easily be plugged in the message router. Kevin Lam has a wonderful blog regarding direct binding you may want to take a look.
Implementations
Message Router
The message router monitors messages received by SOAP port, it then detects the message type of this untyped message, forward it to processing step on which all processing orchestration is listening on. It gets ACK message back from processing orchestration and echo it back to SOAP port.
Processing Orchestrations
Each processing orchestration implement the direct bound port defined in message router, by doing that, they are listening on messages distributed.
They then filter on the messages they like by setting filters on receive shape, casts the message to the appropriate type and creates an ACK message sent back to message router. After all these, they are free to do their own business logic.
Web service
You may ask ‘how can I generate an untyped webservice?’ This requires a little trick.
Again, you choose to publish schema as web service, in the next step when it ask for the request response message type, you go ahead randomly select a schema as your request message type, select ACK as response message type.
And
here is the trick, after generating the source code; you should modify the generated C# code to rename the parameter type to XmlDocument. You will discover the WSDL changed; the input parameter type is now
Test
I use XmlSpy to generate a request message
Send to the service, got
Take away
 
·         Be very careful when expose your BizTalk web service as untyped, you should always pay attention to filter settings. In my example, message router filters by BTS.ReceivePortName.
·         Implement dynamic router pattern (recipient list). By doing this, you don’t have to limit the portal ability when it grows.
·         Use promoted property as filter condition in processing orchestration. In my example, I have a property field called ‘message type’, each processing orchestration monitor their interest by filtering on this. I was originally try to promote ‘BTS.MessageType’ as the filter, but in the runtime, it gives me the warning saying it cannot do that because that field is readonly (why?)
 
 
 

BizTalk开发系列(三) 单机环境下的BizTalk Server 2006 R2安装

BizTalk开发系列(三) 单机环境下的BizTalk Server 2006 R2安装 大部分的开发环境都是在单机环境下进行的,今天整理了一下BizTalk Server 2...
  • xksyhjb
  • xksyhjb
  • 2016年12月14日 16:36
  • 194

BizTalk 发布服务接口后访问该服务出现错误“Internal SOAP process failed”

今天一个朋友在做BizTalk项目时遇到了这个错误,具体问题是这样的。 错误描述 他通过BizTalk设计了一段业务流程并发布成了一个Web Services接口,并将其部属到了IIS 7上...
  • xuyue1987
  • xuyue1987
  • 2011年04月30日 21:19
  • 2210

将 BizTalk 业务流程发布为 Web Service

一.简介 BizTalk 中的 Web Services 支持分为两类: 使用或调用 Web Service,以及发布或创建 Web Service。 使用 Web Service 可以从业务流程中使...
  • jackiej
  • jackiej
  • 2009年10月30日 16:43
  • 1879

使用BizTalk解析Web service返回的XMLDocument消息

在系统集成过程中,有些系统发布出来的web service会将对象封装成XMLDocument并以字符串形式输出,当使用BizTalk与其他系统交互时,需要在BizTalk一端对XMLDocument...
  • xuyue1987
  • xuyue1987
  • 2011年09月30日 12:26
  • 3249

How to validate Xml Documents against schemas in BizTalk

Copy from:http://www.bizbert.com/bizbert/2007/09/01/How+To+Validate+Xml+Documents+Against+Schemas+In...
  • proxyman
  • proxyman
  • 2009年03月30日 16:14
  • 1124

soap概念,HTTP + XML = SOAP

SOAP 是一种简单的基于 XML 的协议,它使应用程序通过 HTTP 来交换信息。 在我们的 SOAP 教程中,你将了解到什么是 SOAP,以及它如何在应用程序之间交换信息。 S...
  • chinapi_hzh
  • chinapi_hzh
  • 2012年02月04日 21:44
  • 1809

dom4j解析soap型消息xml

就在刚刚项目中用到webservice的soap消息,在解析的时候异常头疼。 本人又是webservice小白一枚。对方的系统返回的消息是这样的。 http://schemas.xmlsoap.o...
  • wangyongxin1990
  • wangyongxin1990
  • 2015年06月19日 22:56
  • 5895

XML,WSDL,SOAP,JSON的关系及区别

转:http://blog.sina.com.cn/s/blog_afb4d07f0101aciz.html   1.XML与JSON比较    首先,XML与JSON的目前主要的两种数据交换...
  • pzasdq
  • pzasdq
  • 2016年09月19日 16:58
  • 2530

PHP SOAP 客户端POST XML详细代码

  • RuningBoys
  • RuningBoys
  • 2016年04月01日 09:16
  • 237

手把手教你SOAP访问webservice并DOM解析返回的XML数据

前言: 目前我们项目组还在采用webservice这种http方式,并且某些网站服务提供的对外接口还在采用webservice方式,因此就总结了一下写了这篇文章。以soap1.2的请求为例,在例子里...
  • u012534831
  • u012534831
  • 2016年05月09日 23:01
  • 5170
内容举报
返回顶部
收藏助手
不良信息举报
您举报文章:Submitting Xml Documents to BizTalk 2006 via SOAP
举报原因:
原因补充:

(最多只允许输入30个字)