1
votes

I am publishing Web Services using Mule. Everything works fine but I do not understand why my mule configuration file is not valid in Eclipse.

This is the error message displayed by Eclipse:

cvc-complex-type.2.4.a: Invalid content was found starting with element 'cxf:simple-service'. One of '{"http://www.mulesoft.org/schema/mule/core":annotations, "http://www.mulesoft.org/schema/mule/core":abstract-transformer, "http://www.mulesoft.org/schema/mule/core":abstract-filter, "http://www.mulesoft.org/schema/mule/core":abstract-security-filter, "http://www.mulesoft.org/schema/mule/core":abstract-intercepting-message-processor, "http://www.mulesoft.org/schema/mule/core":abstract-observer-message-processor, "http://www.mulesoft.org/schema/mule/core":processor, "http://www.mulesoft.org/schema/mule/core":custom-processor, "http://www.mulesoft.org/schema/mule/core":abstract-mixed-content-message-processor, "http://www.mulesoft.org/schema/mule/core":response, "http://www.mulesoft.org/schema/mule/core":abstract-redelivery-policy, "http://www.mulesoft.org/schema/mule/core":abstract-transaction, "http://www.mulesoft.org/schema/mule/core":abstract-reconnection-strategy, "http://www.mulesoft.org/schema/mule/core":abstract-multi-transaction, "http://www.mulesoft.org/schema/mule/core":property, "http://www.mulesoft.org/schema/mule/core":properties}' is expected. mule-components.xml /my-project/src/main/resources line 35 XML Problem

This is the portion of my configuration file at line 35:

<flow name="MonFlow">
  <inbound-endpoint address="servlet://monService">
    <cxf:simple-service 
      serviceClass="mon.package.MonClassService" />
  </inbound-endpoint>
  <component>
    <spring-object bean="myApp.monClassService" />
  </component>
</flow>

Here are the schemas used in the file:

<mule xmlns="http://www.mulesoft.org/schema/mule/core"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xmlns:file="http://www.mulesoft.org/schema/mule/file" 
      xmlns:http="http://www.mulesoft.org/schema/mule/http"
      xmlns:https="http://www.mulesoft.org/schema/mule/https" 
      xmlns:jetty="http://www.mulesoft.org/schema/mule/jetty"
      xmlns:jetty-ssl="http://www.mulesoft.org/schema/mule/jetty-ssl"
      xmlns:stdio="http://www.mulesoft.org/schema/mule/stdio" 
      xmlns:vm="http://www.mulesoft.org/schema/mule/vm"
      xmlns:mulexml="http://www.mulesoft.org/schema/mule/xml" 
      xmlns:cxf="http://www.mulesoft.org/schema/mule/cxf"
      xmlns:servlet="http://www.mulesoft.org/schema/mule/servlet"
      xmlns:spring="http://www.springframework.org/schema/beans"
      xsi:schemaLocation="
      http://www.mulesoft.org/schema/mule/core 
        http://www.mulesoft.org/schema/mule/core/3.2/mule.xsd
      http://www.mulesoft.org/schema/mule/file 
        http://www.mulesoft.org/schema/mule/file/3.2/mule-file.xsd
      http://www.mulesoft.org/schema/mule/http 
        http://www.mulesoft.org/schema/mule/http/3.2/mule-http.xsd
      http://www.mulesoft.org/schema/mule/https 
         http://www.mulesoft.org/schema/mule/https/3.2/mule-https.xsd
      http://www.mulesoft.org/schema/mule/jetty 
        http://www.mulesoft.org/schema/mule/jetty/3.2/mule-jetty.xsd
      http://www.mulesoft.org/schema/mule/jetty-ssl 
        http://www.mulesoft.org/schema/mule/jetty-ssl/3.2/mule-jetty-ssl.xsd
      http://www.mulesoft.org/schema/mule/stdio 
        http://www.mulesoft.org/schema/mule/stdio/3.2/mule-stdio.xsd
      http://www.mulesoft.org/schema/mule/vm 
        http://www.mulesoft.org/schema/mule/vm/3.2/mule-vm.xsd
      http://www.mulesoft.org/schema/mule/xml
        http://www.mulesoft.org/schema/mule/xml/3.2/mule-xml.xsd
      http://www.mulesoft.org/schema/mule/cxf 
        http://www.mulesoft.org/schema/mule/cxf/3.2/mule-cxf.xsd
      http://www.mulesoft.org/schema/mule/servlet 
        http://www.mulesoft.org/schema/mule/servlet/3.2/mule-servlet.xsd 
      ">

Any ideas? Thank you!

1
No, no idea. All I can do is confirm that Xerces accepts your flow element as valid, given the schema locations you show, and does not complain about the cxf:simple-service element. (Saxon complains about a regular expression somewhere in the schema, but I was not able to figure out where the problem was or what Saxon was objecting to.)C. M. Sperberg-McQueen

1 Answers

1
votes

Tu dis "dans Eclipse", donc j'assume que tu n'es pas dans "Mule Studio".

Il te faut ajouter les schemas qui se trouvent dans chaque JAR de Mule dans le dictionnaire XML d'Eclipse: http://genschawtech.blogspot.ca/2008/09/eclipse-xml-catalog-entry-for-dtd-or.html

Tu as peut-être aussi ce probleme: http://blogs.mulesoft.org/overcoming-xml-validation-errors-in-eclipse-35/