3 Replies Latest reply on Jan 2, 2013 9:49 AM by rcernich

    switchyard.xml eclipse validation errors

    eleni.papadopoulou

      Hi,

       

      Although I have disabled the 'Windows->Preferences->XML->XML Schemas->Validation-> Honour All XML Schemas locations' option I still get errors in switchyard.xml related to the http binding.

       

      The error I get is the following:

      cvc-complex-type.2.4.a: Invalid content was found starting with element 'http:binding.http'. One of '{"http://docs.oasis-open.org/ns/

      opencsa/sca/200912":binding, "http://docs.oasis-open.org/ns/opencsa/sca/200912":callback, "http://docs.oasis-open.org/ns/opencsa/

      sca/200912":requires, "http://docs.oasis-open.org/ns/opencsa/sca/200912":policySetAttachment, "http://docs.oasis-open.org/ns/

      opencsa/sca/200912":extensions}' is expected.

       

      The project is successfully built and deployed. However, how can I avoid this error?

       

      Attached you can find my switchyard.xml file

       

      Also, in the Bean implementation I get the following error when I use @Inject and @Reference annotations in  order to reference a service:

      "ITestService cannot be resolved to a type". The "ITestService" is the name of one of the services I try to reference. This error is appeared for every service with @Inject@Reference annotations.

      This error does not create any issue when building or deploying the application, but I would like to know what causes it.

       

      Thank you in advance!

        • 1. Re: switchyard.xml eclipse validation errors
          kcbabo

          For the first issue, make sure you have the HTTP component listed in your project's dependencies.  Your pom.xml should have the following dependency in it:

           

                 <dependency>
                      <groupId>org.switchyard.components</groupId>
                      <artifactId>switchyard-component-http</artifactId>
                  </dependency>
          

           

          You can copy and paste the above into your pom.xml or right-click on your project in Eclipse and select SwitchYard -> Configure Capabilities.  Then select the checkbox next to HTTP.

           

          The second issue might be due to not having auto-build enabled for your project.  Check the Project menu and make sure "Build Automatically" is selected.

          • 2. Re: switchyard.xml eclipse validation errors
            eleni.papadopoulou

            Hi,

             

            A maven build to the project so as the Maven Dependencies to be added in the project's classpath solves the second issue.

             

            With respect to the http.binding validation error, although I have the HTTP componen listed in the project's dependencies, the error still appears. The http component is the only one I am facing this issue. I don't have the same problem with the soap, the bean and th camel components which I also use in the same project.

            However, this validation error does not create any issue in the way the application operates; I am just wondering why it behaves this way for the http component.

             

            Thank you.

            • 3. Re: switchyard.xml eclipse validation errors
              rcernich

              Hey Eleni,

               

              I think there was an issue where the configuration schema for the http component was not included in the xsd catalog supplied by the SwitchYard tooling.  I believe this issue has been addressed, in a subsequent build and will be fixed in 0.7.0.Final.

               

              Best,

              Rob