Reputation: 424
I'm getting the following error while deploying the interface
org.xml.sax.SAXParseException: cvc-complex-type.2.4.a: Invalid content was found starting with element 'sfdc:query-single'. One of '{"http://www.mulesoft.org/schema/mule/core":annotations, "http://www.mulesoft.org/schema/mule/core":abstract-message-processor, "http://www.mulesoft.org/schema/mule/core":abstract-outbound-endpoint, "http://www.mulesoft.org/schema/mule/core":abstract-mixed-content-message-processor}' is expected.
I have configured the salesforce connector globally.
PFB schema
xsi:schemaLocation="http://www.mulesoft.org/schema/mule/ee/wmq http://www.mulesoft.org/schema/mule/ee/wmq/current/mule-wmq-ee.xsd
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/ee/dw http://www.mulesoft.org/schema/mule/ee/dw/current/dw.xsd
http://www.mulesoft.org/schema/mule/sfdc http://www.mulesoft.org/schema/mule/sfdc/current/mule-sfdc.xsd
http://www.mulesoft.org/schema/mule/ee/tracking http://www.mulesoft.org/schema/mule/ee/tracking/current/mule-tracking-ee.xsd">
Upvotes: 0
Views: 1441
Reputation: 63
If you are using Maven to build the mule flow you also need to include it in org.mule.tools.maven
<plugin>
<groupId>org.mule.tools.maven</groupId>
<artifactId>mule-app-maven-plugin</artifactId>
<version>${mule.tools.version}</version>
<extensions>true</extensions>
<configuration>
<copyToAppsDirectory>true</copyToAppsDirectory>
<inclusions>
<inclusion>
<groupId>org.mule.modules</groupId>
<artifactId>mule-module-sfdc</artifactId>
</inclusion>
</inclusions>
</configuration>
</plugin>
Along with an entry in dependencies
<dependency>
<groupId>org.mule.modules</groupId>
<artifactId>mule-module-sfdc</artifactId>
<version>6.2.3</version>
</dependency>
Upvotes: 2
Reputation: 1
Try to add dependency in Mule like below and rerun the application using maven with mule
<dependency>
<groupId>org.mule.modules</groupId>
<artifactId>mule-module-sfdc</artifactId>
<version>RELEASE</version>
</dependency>
Upvotes: 0
Reputation: 136
To use probably need SaleForce Dev Account connectivity account for finally connecting and your config file should contain sdfc xmlns, which I did not find in your snippet
I will look something like this
<mule xmlns="http://www.mulesoft.org/schema/mule/core"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:sfdc="http://www.mulesoft.org/schema/mule/sfdc"
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/sfdc
http://www.mulesoft.org/schema/mule/sfdc/current/mule-sfdc.xsd">
And also add Maven dependency, which will be something like
<dependency>
<groupId>org.mule.modules</groupId>
<artifactId>mule-module-sfdc</artifactId>
<version>RELEASE</version>
</dependency>
Upvotes: 0
Reputation: 1
This error occurs when salesforce library is not loaded in the project.Ideally any point studio take cares.But in case the code is copy pasted , we have to add library by using the following steps: 1 Build Path>Configure the Build Path>Add Library >Salesforce jar
Upvotes: 0
Reputation: 172
If you are copy paste one flow xml from one project to another project then you can go to xml view and remove sfdc tag initial portion e.g "sfdc:query-single" then type "sfdc:" from your keyboard and hit ctrl+space it will show you the list of possibilities from there chose again the same value "sfdc:query-single". Now it will automatically import the required dependencies.
Upvotes: 0
Reputation: 1942
If the namespace is in xml config, it could be a problem that the sfdc dependency is not included.
Upvotes: 0