You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

BizTalk 2020:WCF-WebHTTP适配器始终接收空值问题求助

BizTalk发布REST API时URL参数无法捕获、管道接收空消息问题

尝试将BizTalk业务流程发布为REST API,但遇到URL中传递的值无法被捕获,管道始终接收空消息,使用Postman测试时发送端口生成的文件始终为空。以下是详细配置:

  • 创建入站Schema与属性Schema,提升了Distinguished Fields和Property Fields;
  • 创建出站Schema;
  • 创建接收管道,包含:
    • JSON Decoder:配置Add Message Body For Empty Message=TRUE,指定根节点及命名空间;
    • XML Disassemble:配置Allow Unrecognized Message=TRUE;
  • 创建业务流程,包含入站端口、接收(入站Schema)、构造消息、转换(入站转出站)、发送(出站消息)、出站端口;
  • 使用BizTalk WCF发布向导创建服务并保存为接收位置;
  • 配置接收位置:
    • WCF-WebHTTP方法配置:
      <BtsHttpUrlMapping><Operation Name="Operation_1" Method="GET" Url="/buat?token={token}&amp;jenis_carian={jenis_carian}" /></BtsHttpUrlMapping>
      
    • 完成变量到属性Schema的映射;
    • 使用上述创建的接收管道。

入站Schema

<?xml version="1.0" encoding="utf-16"?>
<xs:schema xmlns="http://testTiga.Schema_msgMasuk" xmlns:b="http://schemas.microsoft.com/BizTalk/2003" xmlns:ns0="https://testTiga.PropertySchema_msgMasuk" targetNamespace="http://testTiga.Schema_msgMasuk" xmlns:xs="http://www.w3.org/2001/XMLSchema">
    <xs:annotation>
        <xs:appinfo>
          <b:imports>
            <b:namespace prefix="ns0" uri="https://testTiga.PropertySchema_msgMasuk" location="\.\PropertySchema_msgMasuk.xsd" />
          </b:imports>
        </xs:appinfo>
      </xs:annotation>
      <xs:element name="Schema_msgMasuk">
        <xs:annotation>
          <xs:appinfo>
            <b:properties>
              <b:property name="ns0:icno" xpath="/*[local-name()='Schema_msgMasuk' and namespace-uri()='http://testTiga.Schema_msgMasuk']/*[local-name()='nokp' and namespace-uri()='']" />
              <b:property name="ns0:dhmno" xpath="/*[local-name()='Schema_msgMasuk' and namespace-uri()='http://testTiga.Schema_msgMasuk']/*[local-name()='nodhm' and namespace-uri()='']" />
              <b:property distinguished="true" xpath="/*[local-name()='Schema_msgMasuk' and namespace-uri()='http://testTiga.Schema_msgMasuk']/*[local-name()='nokp' and namespace-uri()='']" />
              <b:property distinguished="true" xpath="/*[local-name()='Schema_msgMasuk' and namespace-uri()='http://testTiga.Schema_msgMasuk']/*[local-name()='nodhm' and namespace-uri()='']" />
            </b:properties>
          </xs:appinfo>
        </xs:annotation>
        <xs:complexType>
          <xs:sequence>
            <xs:element name="nokp" type="xs:string" />
            <xs:element name="nodhm" type="xs:string" />
          </xs:sequence>
        </xs:complexType>
      </xs:element>
    </xs:schema>

属性Schema

<?xml version="1.0" encoding="utf-16"?>
<xs:schema xmlns="http://testTiga.PropertySchema_msgMasuk" xmlns:b="http://schemas.microsoft.com/BizTalk/2003" targetNamespace="https://testTiga.PropertySchema_msgMasuk" xmlns:xs="http://www.w3.org/2001/XMLSchema">
  <xs:annotation>
    <xs:appinfo>
      <b:schemaInfo schema_type="property" xmlns:b="http://schemas.microsoft.com/BizTalk/2003" />
    </xs:appinfo>
  </xs:annotation>
  <xs:element name="icno" type="xs:string">
    <xs:annotation>
      <xs:appinfo>
        <b:fieldInfo propertyGuid="6277d7c5-ef2d-4b3a-898e-3574bb7d4469" propSchFieldBase="MessageContextPropertyBase" />
      </xs:appinfo>
    </xs:annotation>
  </xs:element>
  <xs:element name="dhmno" type="xs:string">
    <xs:annotation>
      <xs:appinfo>
        <b:fieldInfo propertyGuid="9c017341-774d-4864-95bb-5caf64ef7ef6" propSchFieldBase="MessageContextPropertyBase" />
      </xs:appinfo>
    </xs:annotation>
  </xs:element>
</xs:schema>

相关截图

  • 接收管道配置:接收管道配置
  • 消息属性-上下文:消息属性-上下文

内容的提问来源于stack exchange,提问作者Hairi

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.16 01:13:09