开发者

Consume Xml "AS IS" using BizTalk Sql Adapter

I have a stored procedure which returns a fully formed schema instance as an xml datatype:

<ns0:PolicyCreated xmlns:ns0="http://blah/v1.0">
  <ns0:Source>开发者_如何学JAVA
    <ns0:Organisation>Company1</ns0:Organisation>
    <ns0:System>System1</ns0:System>
  </ns0:Source>
</ns0:PolicyCreated>

The problem is when I try to consume this with the Sql Adapter it wraps the xml in a root node and namespace:

<ns0:PolicyCreated xmlns:ns0="http://blah/v1.0">
  <ns0:PolicyCreated xmlns:ns0="http://blah/v1.0">
    <ns0:Source>
      <ns0:Organisation>Company1</ns0:Organisation>
      <ns0:System>System1</ns0:System>
    </ns0:Source>
  </ns0:PolicyCreated>
</ns0:PolicyCreated>

So I get a double root node and namespace.

Any ideas how can I get around this?

Thanks in adavnce

Tom


Update: It seems there is a way to do this with WCF SQL adapter because you can specify the body xpath on the response message in the send port WCF configutation.

However, this is just wasteful because all you are doing is telling the adapter to "unwrap" the xml and then apply another, identical, wrapper.

With SQL adapter there is no such option. So there is no way to do what I want to do, but it's not the end of the world. I will just have to specify a different wrapper in the sql adapter configuration and have another schema to maintain.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜