Mule SAXParseException: cvc-complex-type.2.4.a: Invalid content when running Flow with propietary Connector.

StackOverflow https://stackoverflow.com/questions/22256616

Domanda

I've developed a connector, with Jersey, Jackson and OAuth 1. The connector project builds ok with Maven, then I install it in my Mule project, included it on a flow and when I run the project I get:

    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.

The XML of my Mule project is:

<?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>

I've been stuck in this for two days and don't know what else to do.

If you need the XML of the connector (or the Java), please let me know.

Thanks for your help!

È stato utile?

Soluzione

You need to configure the mule maven plugin to include your connector when the application zip gets created. You can refer to the salesforce connector as an example

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top