【问题标题】:SAP:PARSING error while calling SAP sRFC FMSAP:调用 SAP sRFC FM 时出现解析错误
【发布时间】:2020-08-06 10:48:53
【问题描述】:

SAP 流程:

<sap:sap-config name="SAP_Config" doc:name="SAP Config" doc:id="03c25b56-7372-4722-92d0-ce2ef568184c" >
    <sap:simple-connection-provider-connection username="${sap.username}" password="${sap.password}" systemNumber="${sap.systemNumber}" client="${sap.client}" applicationServerHost="${sap.host}" />
</sap:sap-config>
<flow name="mule-sap-demoFlow2" doc:id="9291c5c3-319d-4a4e-a5f8-ed0de66b63d5" >
        <http:listener doc:name="Listener" doc:id="7068cc2f-2147-4334-a6e7-189352d9ef54" config-ref="HTTP_Listener_config" path="/sap"/>
        <sap:sync-rfc key="${function.key}" doc:name="Synchronous Remote Function Call" doc:id="5bca83af-159b-4fa2-8872-76fefd79be92" config-ref="SAP_Config"/>
        <ee:transform doc:name="Transform Message" doc:id="bd0b00f4-8acb-4823-a99e-9e39c1c4fe18" >
            <ee:message >
                <ee:set-payload ><![CDATA[%dw 2.0
output application/json
---
payload]]></ee:set-payload>
            </ee:message>
        </ee:transform>
    </flow>

错误:

INFO  2020-08-06 16:02:51,335 [[MuleRuntime].uber.02: [mule-mongo-demo].mule-mongo-demoFlow2.BLOCKING @301a4df3] [processor: ; event: 2df0b2e0-d7d0-11ea-93c5-506b8d070e10] com.mulesoft.connector.sap.internal.service.impl.BAPIFunctionJCoService: Use SAP default format 'false'.
[Fatal Error] :1:1: Premature end of file.
ERROR 2020-08-06 16:02:51,366 [[MuleRuntime].uber.02: [mule-mongo-demo].mule-mongo-demoFlow2.BLOCKING @301a4df3] [processor: ; event: 2df0b2e0-d7d0-11ea-93c5-506b8d070e10] org.mule.runtime.core.internal.exception.OnErrorPropagateHandler: 

Message               : An exception occurred while parsing XML.
Element               : mule-sap-demoFlow2/processors/0 @ mule-sap-demo:mule-mongo-demo.xml:161 (Synchronous Remote Function Call)
Element DSL           : <sap:sync-rfc key="" doc:name="Synchronous Remote Function Call" doc:id="5bca83af-159b-4fa2-8872-76fefd79be92" config-ref="SAP_Config"></sap:sync-rfc>
Error type            : SAP:PARSING
FlowStack             : at mule-sap-demoFlow2(mule-mongo-demoFlow2/processors/0 @ mule-mongo-demo:mule-mongo-demo.xml:161 (Synchronous Remote Function Call))

  (set debug level logging or '-Dmule.verbose.exceptions=true' for everything)

【问题讨论】:

    标签: mule mule4 saprfc


    【解决方案1】:

    问题是连接器无法解析某些 XML 数据。没有更多细节很难准确地说出,但看起来连接器正在期待一些 XML,但它没有从 HTTP 侦听器接收它,或者它没有从 SAP 接收到有效的 XML 响应。请务必使用latest version of the SAP connector。以前的版本在解析带有字符 0x0 的 XML 时存在错误。

    【讨论】:

    • 我使用的是最新版本 5.1.7
    • 你确定响应不是空的吗?
    • 是的,这是 SAP 方面的问题。用户在获得权限后没有所需的权限它能够返回数据
    • 好的,这似乎与not receiving a valid XML response back from SAP匹配。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-01-16
    • 2012-02-11
    • 1970-01-01
    • 1970-01-01
    • 2017-09-29
    相关资源
    最近更新 更多