Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Epsilon » Loading a WSDL file with type information(EOL workflow and EMF type information)
Loading a WSDL file with type information [message #1848320] Sun, 28 November 2021 10:14 Go to next message
Jörn Guy Süß is currently offline Jörn Guy SüßFriend
Messages: 320
Registered: July 2009
Location: Anstead, Brisbane, Queens...
Senior Member

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
allInstances()
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 Go to previous messageGo to next message
Jörn Guy Süß is currently offline Jörn Guy SüßFriend
Messages: 320
Registered: July 2009
Location: Anstead, Brisbane, Queens...
Senior Member

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
ExampleService!
model locator makes no difference.

https://www.eclipse.org/forums/index.php?t=getfile&id=41393&

[Updated on: Sun, 28 November 2021 10:28]

Report message to a moderator

Re: Loading a WSDL file with type information [message #1848322 is a reply to message #1848321] Sun, 28 November 2021 10:53 Go to previous messageGo to next message
Dimitris Kolovos is currently offline Dimitris KolovosFriend
Messages: 2163
Registered: July 2009
Location: York, UK
Senior Member

Hi Jörn,

Adding a metamodelUri [1] parameter with the namespace URI of the WSDL metamodel to your <epsilon.loadModel> task should do the trick but please let me know if this is not the case.

Best,
Dimitris

[1] https://www.eclipse.org/epsilon/doc/workflow/#model-loading-tasks
Re: Loading a WSDL file with type information [message #1848323 is a reply to message #1848321] Sun, 28 November 2021 11:10 Go to previous messageGo to next message
Jörn Guy Süß is currently offline Jörn Guy SüßFriend
Messages: 320
Registered: July 2009
Location: Anstead, Brisbane, Queens...
Senior Member

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 #1848325 is a reply to message #1848323] Sun, 28 November 2021 11:24 Go to previous messageGo to next message
Dimitris Kolovos is currently offline Dimitris KolovosFriend
Messages: 2163
Registered: July 2009
Location: York, UK
Senior Member

Could you please try setting the metamodelUri property instead of modelFile? I suspect that WST has already registered a copy of the WSDL Ecore metamodel (you should be able to check this through [1]), which EMF uses to load the model against.

Best,
Dimitris

[1] https://www.eclipse.org/epsilon/doc/articles/epackage-registry-view/

Re: Loading a WSDL file with type information [message #1848329 is a reply to message #1848325] Sun, 28 November 2021 11:53 Go to previous messageGo to next message
Jörn Guy Süß is currently offline Jörn Guy SüßFriend
Messages: 320
Registered: July 2009
Location: Anstead, Brisbane, Queens...
Senior Member

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>
Re: Loading a WSDL file with type information [message #1848330 is a reply to message #1848329] Sun, 28 November 2021 12:40 Go to previous messageGo to next message
Dimitris Kolovos is currently offline Dimitris KolovosFriend
Messages: 2163
Registered: July 2009
Location: York, UK
Senior Member

The problem is that when you specify a metamodelFile, the EPackage that it is parsed into is a different Java object to the EPackage that WST registered for the WSDL metamodel in EPackage.Registry.Instance. Does this clarify things?

Best,
Dimitris

[Updated on: Sun, 28 November 2021 12:54]

Report message to a moderator

Re: Loading a WSDL file with type information [message #1848340 is a reply to message #1848325] Mon, 29 November 2021 05:13 Go to previous message
Jörn Guy Süß is currently offline Jörn Guy SüßFriend
Messages: 320
Registered: July 2009
Location: Anstead, Brisbane, Queens...
Senior Member

Thanks. Shadowing was the issue. This works well.
Previous Topic:Load HUTN as ecore model
Next Topic:Java Lifting with EMC-JDT
Goto Forum:
  


Current Time: Fri Apr 26 16:27:37 GMT 2024

Powered by FUDForum. Page generated in 0.04130 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top