|
Re: [XSD] EList of Object as operation return type [message #1504513 is a reply to message #1499010] |
Tue, 09 December 2014 10:13 |
Ed Merks Messages: 33113 Registered: July 2009 |
Senior Member |
|
|
Pascal,
On 04/12/2014 10:18 PM, Pascal Rapicault wrote:
> Hi,
>
> I have an XSD that contains a couple operations and it is working when
> I refer to types defined in my XSD. However I'm having difficulties
> specifying an EList<java.lang.Object> as a return type or any other
> plain Java type . When I do so using the following markup, the
> returned type specified in the generated code is EObject.
> It all looks like the loss of information happens when I go from the
> XSD to the ecore but I'm not sure why it is happening since I have
> seen the following markup in other places including the emf.xsd.
Keep in mind that the types such as ecore:EJavaObject must resolve so
you'd need a correspong xsd:import
One trick to try is modify the generated *.ecore to be how you want, and
export it back to an XML Schema and look at the annotations in that *.xsd
>
>
> <xsd:annotation>
> <xsd:appinfo ecore:key="operations"
> source="http://www.eclipse.org/emf/2002/Ecore">
> <operation name="getValue" type="ecore:EEList{ecore:EJavaObject}">
> <parameter name="expression" type="xsd:string" />
> </operation>
>
> Thanks in advance,
>
> Pascal
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
Powered by
FUDForum. Page generated in 0.03117 seconds