0

我已经开发了一个连接器,带有 Jersey、Jackson 和 OAuth 1。连接器项目可以使用 Maven 构建,然后我将它安装在我的 Mule 项目中,将它包含在流程中,当我运行项目时,我得到:

    Invalid content was found starting with element 'g4:config'. 
One of '{
"http://www.mulesoft.org/schema/mule/core":annotations, 
"http://www.mulesoft.org/schema/mule/core":description, 
"http://www.springframework.org/schema/beans":beans, 
"http://www.springframework.org/schema/beans":bean, 
"http://www.springframework.org/schema/context":property-placeholder, 
"http://www.springframework.org/schema/beans":ref, 
"http://www.mulesoft.org/schema/mule/core":global-property, 
"http://www.mulesoft.org/schema/mule/core":configuration, 
"http://www.mulesoft.org/schema/mule/core":notifications, 
"http://www.mulesoft.org/schema/mule/core":abstract-extension, 
"http://www.mulesoft.org/schema/mule/core":abstract-mixed-content-extension, 
"http://www.mulesoft.org/schema/mule/core":abstract-agent, 
"http://www.mulesoft.org/schema/mule/core":abstract-security-manager, 
"http://www.mulesoft.org/schema/mule/core":abstract-transaction-manager, 
"http://www.mulesoft.org/schema/mule/core":abstract-connector, 
"http://www.mulesoft.org/schema/mule/core":abstract-global-endpoint, 
"http://www.mulesoft.org/schema/mule/core":abstract-exception-strategy, 
"http://www.mulesoft.org/schema/mule/core":abstract-flow-construct, 
"http://www.mulesoft.org/schema/mule/core":flow, 
"http://www.mulesoft.org/schema/mule/core":sub-flow, 
"http://www.mulesoft.org/schema/mule/core":abstract-model, 
"http://www.mulesoft.org/schema/mule/core":abstract-interceptor-stack, 
"http://www.mulesoft.org/schema/mule/core":abstract-filter, 
"http://www.mulesoft.org/schema/mule/core":abstract-transformer, 
"http://www.mulesoft.org/schema/mule/core":processor-chain, 
"http://www.mulesoft.org/schema/mule/core":custom-processor, 
"http://www.mulesoft.org/schema/mule/core":invoke, 
"http://www.mulesoft.org/schema/mule/core":abstract-global-intercepting-message-processor, 
"http://www.mulesoft.org/schema/mule/core":custom-queue-store, 
"http://www.mulesoft.org/schema/mule/core":abstract-processing-strategy}' is expected.

我的 Mule 项目的 XML 是:

<?xml version="1.0" encoding="UTF-8"?>
<mule xmlns:tracking="http://www.mulesoft.org/schema/mule/ee/tracking" xmlns:g4="http://www.mulesoft.org/schema/mule/g4" 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:spring="http://www.springframework.org/schema/beans" version="EE-3.4.1"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-current.xsd
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/g4 http://www.mulesoft.org/schema/mule/g4/1.0-SNAPSHOT/mule-g4.xsd
http://www.mulesoft.org/schema/mule/ee/tracking http://www.mulesoft.org/schema/mule/ee/tracking/current/mule-tracking-ee.xsd">
    <!--g4:config name="Intelisis_G4_Connector" consumerKey="abc" consumerSecret="def" doc:name="Intelisis G4 Connector"/-->
    <g4:config name="G4" consumerKey="abc" consumerSecret="def" doc:name="G4">
        <g4:oauth-callback-config/>
    </g4:config>
    <flow name="g4-clientFlow1" doc:name="g4-clientFlow1">
        <http:inbound-endpoint exchange-pattern="request-response" host="localhost" port="8081" doc:name="HTTP"/>
        <g4:test-rest config-ref="G4" id="123" doc:name="Intelisis G4 Connector"/>
    </flow>
</mule>

我已经被困在这两天了,不知道还能做什么。

如果您需要连接器(或 Java)的 XML,请告诉我。

谢谢你的帮助!

4

1 回答 1

2

您需要配置 mule maven 插件以在创建应用程序 zip 时包含您的连接器。您可以参考salesforce 连接器作为示例

于 2014-03-07T17:59:50.590 回答