Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Where is the xsd file #1135

Open
ssrini opened this issue Dec 19, 2019 · 6 comments
Open

Where is the xsd file #1135

ssrini opened this issue Dec 19, 2019 · 6 comments

Comments

@ssrini
Copy link

ssrini commented Dec 19, 2019

While adding the score:engine/ declarations to the spring config xml, Eclipse shows errors and does not run due to both links resulting in 404 errors.

  1. http://www.cloudslang.io/schema/score
  2. http://www.cloudslang.io/schema/score/score.xsd

As a workaround I hosted the score.xsd internally (copied it from the GitHub repo) and referred that in my spring config.

Can the link http://www.cloudslang.io/schema/score/score.xsd be restored to working state please?

@dasom1982
Copy link

document is very old...

<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xmlns:score="http://www.cloudslang.io/schema/score" xmlns:context="http://www.springframework.org/schema/context"
       xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
		http://www.cloudslang.io/schema/score http://www.cloudslang.io/schema/score.xsd
        http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd">

Try this.

@ssrini
Copy link
Author

ssrini commented Feb 25, 2020

http://www.cloudslang.io/schema/score.xsd also results in a 404 error.

@datacore-aniket
Copy link

Hi @ssrini,
Where did you find the score.xsd on Github? Could you send me the path to it?
Could you also share your application context?
I am also struggling with getting a workflow to run by embedding it in a Java application.

@srinisubramanian
Copy link

srinisubramanian commented Mar 26, 2021

https://github.com/CloudSlang/score/blob/master/score-api/src/main/resources/io/cloudslang/schema/score.xsd

Also this issue has some steps on what I did to get it working: #1133

What exactly do you additionally need?

@datacore-aniket
Copy link

datacore-aniket commented Mar 26, 2021

Thank you @srinisubramanian for the response.

I copied the xsd to the location : /CloudSlangDemo/src/main/resources/schema/score.xsd.
Here's my applicationContext:

<beans xmlns="http://www.springframework.org/schema/beans"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xmlns:score="file:/CloudSlangDemo/src/main/resources/schema/"
       xsi:schemaLocation="http://www.springframework.org/schema/beans
                        http://www.springframework.org/schema/beans/spring-beans.xsd
                        file:/CloudSlangDemo/src/main/resources/schema
                        file:/CloudSlangDemo/src/main/resources/schema/score.xsd">

<bean class="io.cloudslang.lang.api.configuration.SlangSpringConfiguration"/>

<score:engine externalDatabase="true" />
<score:worker uuid="-1"/>

</beans>

Now I get this error:
cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element
'score:engine'.

Any suggestion on how to resolve it?

@srinisubramanian
Copy link

srinisubramanian commented Mar 27, 2021

Looks like the schema file is not being found. Actually the xsd file is found in score-api.jar .. your dev setup probably needs adjustment to have a reference to it so it can be located

In any case, if you do not want to use a http link but rather use a local file, this should work.
In the spring-config refer as follows:

http://www.cloudslang.io/schema/score score.xsd

In the META-INF folder create a properties file called spring.schemas with the following content

http\://www.cloudslang.io/schema/score.xsd=score.xsd

And copy score.xsd to your src folder. If you are using Eclipse the error should now disappear

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants