如何修复Mule4中的共享点连接问题

时间:2019-04-26 13:53:02

标签: mule

在Mule 4中,当我尝试使用Mule连接器在共享点中添加文件时。 即使测试连接成功,我也会遇到未知问题。 相同的东西在mule3中工作。 请找到错误日志和代码段。

<?xml version="1.0" encoding="UTF-8"?>
<mule xmlns:ee="http://www.mulesoft.org/schema/mule/ee/core" xmlns:sharepoint="http://www.mulesoft.org/schema/mule/sharepoint"
               xmlns:http="http://www.mulesoft.org/schema/mule/http"
               xmlns="http://www.mulesoft.org/schema/mule/core" xmlns:doc="http://www.mulesoft.org/schema/mule/documentation" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/current/mule.xsd
http://www.mulesoft.org/schema/mule/http http://www.mulesoft.org/schema/mule/http/current/mule-http.xsd
http://www.mulesoft.org/schema/mule/sharepoint http://www.mulesoft.org/schema/mule/sharepoint/current/mule-sharepoint.xsd
http://www.mulesoft.org/schema/mule/ee/core http://www.mulesoft.org/schema/mule/ee/core/current/mule-ee.xsd">
               <http:listener-config name="HTTP_Listener_config" doc:name="HTTP Listener config" doc:id="54aa91e3-2f66-4dbf-9349-1cacea345848" >
                              <http:listener-connection host="0.0.0.0" port="8086" />
               </http:listener-config>
               <sharepoint:sharepoint-online-config name="Sharepoint_Sharepoint_online" doc:name="Sharepoint Sharepoint online" doc:id="72344b3a-193c-4463-bbc3-fbc0fa131bca" >
                              <sharepoint:online-connection onlineUsername="prathap@int.com" onlinePassword="prtp1234" siteUrl="https://localhost.sharepoint.com/" disableCnCheck="true" />
               </sharepoint:sharepoint-online-config>
               <flow name="sharepointpocFlow" doc:id="44196631-d17d-4c8a-9203-bc81e61c7b50" >
                              <http:listener doc:name="Listener" doc:id="07e29185-4e68-43c4-9027-15dfcf0899d9" config-ref="HTTP_Listener_config" path="/sppoc"/>
                              <ee:transform doc:name="Transform Message" doc:id="31761010-3352-42c8-adfa-979175f64685" >
                                             <ee:message >
                                                            <ee:set-payload ><![CDATA[%dw 2.0
output application/csv
---
[test:"test"]]]></ee:set-payload>
                                             </ee:message>
                              </ee:transform>
                              <sharepoint:file-add doc:name="File add" doc:id="433475a1-8b79-4cb2-b442-a94f371f4d51" config-ref="Sharepoint_Sharepoint_online" fileServerRelativeUrl="sites/Infosario_Integration/ecoatest/testing/test1.csv" overwrite="true">
                                             <sharepoint:file-content-stream ><![CDATA[#[payload]]]></sharepoint:file-content-stream>
                              </sharepoint:file-add>
               </flow>
</mule>

错误日志:

错误2019-04-26 18:47:03,113 [[MuleRuntime] .cpuLight.06:[sharepointpoc] .sharepointpocFlow.CPU_LITE @ 7e810f53] [event:] org.mule.runtime.core.internal.exception.OnErrorPropagateHandler :


消息:类型[简单类型,类com.mulesoft.connectors.sharepoint.sharepoint.internal.service.mapping.entity.json.SharepointFileJson]的根名称'error'与预期的('d')不匹配 在[来源:(字符串)“ {”错误“:{”代码“:”-2147024891,System.UnauthorizedAccessException“,”消息“:{” lang“:” zh-CN“,”值“:”访问被拒绝。您无权执行此操作或访问此资源。“}}}”;行:1,列:2]。 错误类型:SHAREPOINT:未知 元素:sharepointpocFlow / processors / 1 @ sharepointpoc:sharepointpoc.xml:18(添加文件) 元素XML: #[payload.parts.test.content]

0 个答案:

没有答案