Loading a WSDL file with type information [message #1848320] |
Sun, 28 November 2021 10:14 |
|
I am trying to load a WSDL model file using a simple workflow below. I have the wst Ecore package loaded in the context.
<?xml version="1.0" encoding="UTF-8"?>
<project name="project" default="default">
<target name="default" description="description">
<epsilon.loadModel name="ExampleService" type="EMF">
<parameter name="modelFile" value="wonkey-donkey/HelloService.wsdl" />
<parameter name="readOnLoad" value="true" />
</epsilon.loadModel>
<epsilon.eol>
<model ref="ExampleService" />
ExampleService.println();
ExampleService.allContents()[0].eMessages.eParts.collect(x | x.name).println();
</epsilon.eol>
</target>
</project>
The navigation for features works, as shown below. But the listout for the model type shows
org.eclipse.epsilon.eol.models.ReflectiveModelReference@2bd17028
And class does not work for any type in the model.
I am suspecting, that I am not actually seeing a model with EMF type features here, and that I hence cannot use types.
I have also tried the Interpreter and get the same behaviour.
How can I diagnose this further? I would really like to use type-based navigation.
|
|
|
Re: Loading a WSDL file with type information [message #1848321 is a reply to message #1848320] |
Sun, 28 November 2021 10:21 |
|
Below a statement and error, for reference:
ExampleService!wsdl::Message.allInstances().eParts.collect(x | x.name);
BUILD FAILED
/home/jg/git/wonkey-donkey/build.xml:9: Undefined variable, type or model: 'ExampleService!wsdl::Message'
at (unknown@5:3-5:31)
at (unknown@5:3-5:46)
at (unknown@5:3-5:53)
at (unknown@5:3-5:74)
at (unknown@5:3-5:74)
at (unknown@3:3-5:74)
at (unknown@3:3-5:74)
This works in the interpreter, and the model locator makes no difference.
[Updated on: Sun, 28 November 2021 10:28] Report message to a moderator
|
|
|
|
Re: Loading a WSDL file with type information [message #1848323 is a reply to message #1848321] |
Sun, 28 November 2021 11:10 |
|
The below is type-correct, but the collection evaluates to 0, despite there being parts in the model, as the navigation shows.
This is also a reflective model, but it most be different somehow.
<?xml version="1.0" encoding="UTF-8"?>
<project name="project" default="default">
<target name="default" description="description">
<epsilon.emf.loadModel name="ExampleService" modelfile="HelloService.wsdl" metamodelfile="WSDL.ecore" />
<epsilon.eol>
<model ref="ExampleService" />
ExampleService.println();
ExampleService.allContents()[0].eMessages.eParts.collect(x | x.name).println();
ExampleService!wsdl::Part.allInstances().size().println();
</epsilon.eol>
</target>
</project>
Buildfile: /home/jg/git/wonkey-donkey/build.xml
default:
[epsilon.eol] org.eclipse.epsilon.eol.models.ReflectiveModelReference@68ad8d1
[epsilon.eol] Sequence {Sequence {firstName}, Sequence {greeting}}
[epsilon.eol] 0
BUILD SUCCESSFUL
Total time: 136 milliseconds
[Updated on: Sun, 28 November 2021 11:12] Report message to a moderator
|
|
|
|
Re: Loading a WSDL file with type information [message #1848329 is a reply to message #1848325] |
Sun, 28 November 2021 11:53 |
|
Solution found, but this is confusing. It works only if the metamodeluri is used. And I am still mystified, why...
<?xml version="1.0" encoding="UTF-8"?>
<project name="project" default="default">
<target name="default" description="description">
<epsilon.emf.loadModel name="ExampleService" modelfile="HelloService.wsdl" metamodeluri="http://www.eclipse.org/wsdl/2003/WSDL" />
<epsilon.eol>
<model ref="ExampleService" />
Message.all.size().println();
</epsilon.eol>
</target>
</project>
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.04130 seconds