IIB 字段前缀

IIB Prefix to a field

我正在使用 IIB 10.0.0.11

当我使用此消息调用我的 SOAP 服务时:

    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soap="urn://hfgroup.co.ke/SharedResources/Schemas/SOAMessages/SoapHeader" xmlns:com="urn://hfgroup.co.ke/Common/DataModel/Common/SecureGetBusinessDate/1.0/Common.SecureGetBusinessDate" xmlns:ns="urn://hfgroup.co.ke/CanonicalDataModel/Security/1.0">
   <soapenv:Header>
      <soap:HeaderRequest>
         <soap:Control>
            <soap:RequesterSystemCode>013</soap:RequesterSystemCode>
            <soap:MessageID>45</soap:MessageID>
         </soap:Control>
         <soap:Credentials>
            <soap:Credential>
               <soap:Username>ESBAPP01</soap:Username>
               <soap:Password>!@#$_!K@O#C$E%L^A*_$#@!</soap:Password>
            </soap:Credential>
         </soap:Credentials>
      </soap:HeaderRequest>
   </soapenv:Header>
   <soapenv:Body>
      <com:DataInput>
         <com:SecureGetBusinessDateInput>
            <ns:Security>
               <ns:ChannelId>99997</ns:ChannelId>
            </ns:Security>
         </com:SecureGetBusinessDateInput>
      </com:DataInput>
   </soapenv:Body>
</soapenv:Envelope>

一切正常,但当我收到此消息时:

<NS1:Envelope xmlns:NS1="http://schemas.xmlsoap.org/soap/envelope/"  >
   <NS1:Header>
      <NS2:HeaderRequest xmlns:NS2="urn://hfgroup.co.ke/SharedResources/Schemas/SOAMessages/SoapHeader">
         <NS2:Control>
            <NS2:RequesterSystemCode>013</NS2:RequesterSystemCode>
            <NS2:MessageID>49</NS2:MessageID>
         </NS2:Control>
         <NS2:Credentials>
            <NS2:Credential>
               <NS2:Username>ESBAPP01</NS2:Username>
               <NS2:Password>!@#$_!K@O#C$E%L^A*_$#@!</NS2:Password>
            </NS2:Credential>
         </NS2:Credentials>
      </NS2:HeaderRequest>
   </NS1:Header>
   <NS1:Body>
      <NS3:DataInput xmlns:NS3="urn://hfgroup.co.ke/Common/DataModel/Common/SecureGetBusinessDate/1.0/Common.SecureGetBusinessDate">
         <NS3:SecureGetBusinessDateInput>
            <NS4:Security xmlns:NS4="urn://hfgroup.co.ke/CanonicalDataModel/Security/1.0">
               <NS4:ChannelId>99997</NS4:ChannelId>
            </NS4:Security>
         </NS3:SecureGetBusinessDateInput>
      </NS3:DataInput>
   </NS1:Body>
</NS1:Envelope>

IIB 将前缀 NS3 和 NS4 作为一个字段,我稍后会在服务中出错:

调试中的树变量:

SOAP
    Context
           Namespace
                    NS1:CHARACTER:http://schemas.xmlsoap.org/soap/envelope/

Body
    DataInput
            NS3:CHARACTER:urn://hfgroup.co.ke/Common/DataModel/Common/SecureGetBusinessDate/1.0/Common.SecureGetBusinessDate
            SecureGetBusinessDateInput
                    Security
                            NS4:CHARACTER:urn://hfgroup.co.ke/CanonicalDataModel/Security/1.0
                            ChannelId:CHARACTER:99997

如何解决没有前缀作为字段的问题?

发送到服务的日志:

0x03000102:NamespaceDecl):xmlns                                           = 'urn://hfgroup.co.ke/Common/DataModel/Common/GetBusinessDate/1.0/Common.GetBusinessDate' (CHARACTER)
      (0x03000102:NamespaceDecl)xmlns:nsS100                                     = 'urn://hfgroup.co.ke/CanonicalDataModel/Security/1.0' (CHARACTER)
      (0x03000102:NamespaceDecl)xmlns:soapenv                                    = 'http://schemas.xmlsoap.org/soap/envelope/' (CHARACTER)
      (0x01000000:Folder       )http://schemas.xmlsoap.org/soap/envelope/:Body   = (
        (0x01000000:Folder)urn://hfgroup.co.ke/Common/DataModel/Common/GetBusinessDate/1.0/Common.GetBusinessDate:DataInput = (
          (0x01000000:Folder)urn://hfgroup.co.ke/Common/DataModel/Common/GetBusinessDate/1.0/Common.GetBusinessDate:GetBusinessDateInput = (
            (0x01000000:Folder)urn://hfgroup.co.ke/CanonicalDataModel/Security/1.0:Security = (
              (0x03000000:PCDataField)http://www.w3.org/2000/xmlns/:NS4                              = 'urn://hfgroup.co.ke/CanonicalDataModel/Security/1.0' (CHARACTER)
              (0x03000000:PCDataField)urn://hfgroup.co.ke/CanonicalDataModel/Security/1.0:ChannelId = '99997' (CHARACTER)
              (0x03000000:PCDataField)urn://hfgroup.co.ke/CanonicalDataModel/Security/1.0:CoreToken = 'Z]XWVUTSr>P<NW>Mw;MZ' (CHARACTER)
            )
          )
        )

我在您的评论中看到您没有正确声明 SOAP 命名空间:它缺少前导 http://。请像这样尝试:

DECLARE ns250 NAMESPACE 'http://schemas.xmlsoap.org/soap/envelope/';
DECLARE nszF00 NAMESPACE 'urn://hfgroup.co.ke/Common/DataModel/Common/GetBusinessDate/1.0/Common.GetBusinessDate';
DECLARE nsS100 NAMESPACE 'urn://hfgroup.co.ke/CanonicalDataModel/Security/1.0';
SET OutputRoot.XMLNSC.ns250:Envelope.(XMLNSC.NamespaceDecl)xmlns = nszF00;
SET OutputRoot.XMLNSC.ns250:Envelope.(XMLNSC.NamespaceDecl)xmlns:nsS100 = nsS100;
SET OutputRoot.XMLNSC.ns250:Envelope.(XMLNSC.NamespaceDecl)xmlns:soapenv = ns250;

我还从您的评论和跟踪输出中看到您从 Environment 复制了数据;跟踪中的 PCDataField 字段告诉我 Environment 中没有域信息(请参阅 similiar problem). Here a quote from the InfoCenter

Copying a message tree (or a portion of it) into the Environment can be useful for many scenarios, but it is essential that the correct domain is created prior to copying the structure. Forgetting to assign the correct domain to the Environment tree before copying the fragment of the input message causes inflation of the tree to occur before the copy happens

所以请像这样将您的输入数据复制到 Environment:

CREATE LASTCHILD OF Environment DOMAIN 'XMLNSC' FROM InputRoot.XMLNSC;