Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » issues while creating ecore from WSDL XSD
issues while creating ecore from WSDL XSD [message #1826551] Mon, 27 April 2020 04:27 Go to next message
nour nour is currently offline nour nourFriend
Messages: 19
Registered: April 2020
Junior Member
Hi,

I am new to EMF and I wanted to create an ecore model from WSDL xml schema. The schema was available on the WSDL specification document, however, when I try to use it, I get two types of errors:

1/ the uriReference type is unknown. I tried to replace it with a String, however, it is supposed to be the type of a namespace ( exp: <attribute name="namespace" type="uriReference" use="required"/>), I don't think a String would work properly here? how can I replace the uriReference type in a correct manner?
2/i get this error
"cos-nonambig: ".../schemas.xmlsoap.org/wsdl/":input and "..//schemas.xmlsoap.org/wsdl/":input (or elements from their substitution group) violate "Unique Particle Attribution"."
because of the Unique Particle Attribute constraints. How can I solve that knowing that I can't remove any of the elements that generate this constraint issue because they represent the inputs/outputs of WSDL.

Thanks in advance.

Re: issues while creating ecore from WSDL XSD [message #1826604 is a reply to message #1826551] Mon, 27 April 2020 15:56 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33142
Registered: July 2009
Senior Member
I can't really guess what's wrong without a sample. I don't see a cos-nonambig message property in the XSD model so I don't think that's coming from the XSD model.

Ed Merks
Professional Support: https://www.macromodeling.com/
Re: issues while creating ecore from WSDL XSD [message #1826605 is a reply to message #1826604] Mon, 27 April 2020 16:21 Go to previous messageGo to next message
nour nour is currently offline nour nourFriend
Messages: 19
Registered: April 2020
Junior Member
Hi Ed,

Here is exactly the part that causes the Unique Particle Attribute constraint error, and it is due to (according to my understanding) the "wsdl:input" which exists in the different operation types groups:
 <element name="operation" type="wsdl:operationType"/>
   <complexType name="operationType">
      <complexContent>
   <extension base="wsdl:documented">
      <choice>
         <group ref="wsdl:one-way-operation"/>
         <group ref="wsdl:request-response-operation"/>
         <group ref="wsdl:solicit-response-operation"/>
         <group ref="wsdl:notification-operation"/>
      </choice>
      <attribute name="name" type="NCName" use="required"/>
   </extension>
  </complexContent>
  </complexType>
   <group name="one-way-operation">
      <sequence>
         <element ref="wsdl:input"/>
      </sequence>
   </group>
   <group name="request-response-operation">
      <sequence>
         <element ref="wsdl:input"/>
         <element ref="wsdl:output"/>
         <element maxOccurs="unbounded" minOccurs="0" ref="wsdl:fault"/>
      </sequence>
   </group>
   <group name="solicit-response-operation">
      <sequence>
         <element ref="wsdl:output"/>
         <element ref="wsdl:input"/>
         <element maxOccurs="unbounded" minOccurs="0" ref="wsdl:fault"/>
      </sequence>
   </group>
   <group name="notification-operation">
      <sequence>
         <element ref="wsdl:output"/>
      </sequence>
   </group>
Re: issues while creating ecore from WSDL XSD [message #1826630 is a reply to message #1826605] Tue, 28 April 2020 02:53 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33142
Registered: July 2009
Senior Member
This is not a complete resource. I don't see any use of uriReference. This documentation about "ecore:*" annotations is not very up-to-date:

https://www.eclipse.org/modeling/emf/docs/overviews/XMLSchemaToEcoreMapping.pdf

And this is not very complete:

https://wiki.eclipse.org/Authoring_XML_Schemas_for_use_with_EMF

But in general you can use ecore:type to change the type of an element or attribute.

Looking at your content model, it does look rather ambiguous. After all, if I see in an instance XML an input followed by an output, is that a one-way-operation followed by a notification-operation or a request-response-operation without any faults?


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: issues while creating ecore from WSDL XSD [message #1826633 is a reply to message #1826630] Tue, 28 April 2020 03:49 Go to previous messageGo to next message
nour nour is currently offline nour nourFriend
Messages: 19
Registered: April 2020
Junior Member
Hi Ed,
thanks for your help.
Here is a sample of the xsd code that presents the urirRference problem:
<element name="import" type="wsdl:importType"/>
   <complexType name="importType">
      <complexContent>
   <extension base="wsdl:documented">
   <attribute name="namespace" type="uriReference" use="required"/>
      <attribute name="location" type="uriReference" use="required"/>
   </extension>
  </complexContent>
  </complexType>

Should i still be trying the ecore:type to change the type of the element??

In regards to the ambiguity, i agree with you, it is rather ambiguous, and my issue is mainly that this code was provided in the WSDL specification page, so i assumed it would be 100% correct, which is not the case as it triggers errors.
Re: issues while creating ecore from WSDL XSD [message #1826637 is a reply to message #1826633] Tue, 28 April 2020 04:57 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
Hi

'100% correct'. For too long I too thought that specifications were written by the 'gods'. Not so, they too are busy, under-resourced humans doing their best. Machine readables accompanying specifications are often only readable by the author's prototype tool and machine readable or tool is often stale long before anyone notices.

Regards

Ed Willink
Re: issues while creating ecore from WSDL XSD [message #1826638 is a reply to message #1826633] Tue, 28 April 2020 04:59 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33142
Registered: July 2009
Senior Member
It's impossible to comment effectively on snippets. Something must define the simple type named uriReference. Given it's unqualified, and elsewhere in the snippet unqualified names are those from the XML Schema namespace, uriReference must be defined in the XMLSchema for Schemas and I don't believe there is such a type. Perhaps it's supposed to be anyURI not uriReference.

In any case, I don't see such snippets in this schema:

http://schemas.xmlsoap.org/wsdl/

So I can't comment on your where your sources are coming from given you haven't told me.


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: issues while creating ecore from WSDL XSD [message #1826690 is a reply to message #1826638] Wed, 29 April 2020 03:58 Go to previous messageGo to next message
nour nour is currently offline nour nourFriend
Messages: 19
Registered: April 2020
Junior Member
Hello again Ed,
I'de like to thank you for sticking around to help me :)

I totally agree with you, I, too, assume that it refers to any URI.
Here is the namespace definition:
<schema xmlns="http://www.w3.org/2000/10/XMLSchema"
        xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
        targetNamespace="http://schemas.xmlsoap.org/wsdl/"
        elementFormDefault="qualified">

and my source is the "w3.org" WSDL 1.1 documentation , Section A.4.1 http://www.w3.org/TR/wsdl.html#A4
I am not sure if this resource is outdated or something.
Re: issues while creating ecore from WSDL XSD [message #1826695 is a reply to message #1826690] Wed, 29 April 2020 06:58 Go to previous message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
Hi

Somehow you are referencing the 2001 version in which the XML is not well-formed; no XML header.

In contrast https://www.w3.org/TR/wsdl/ redirects to https://www.w3.org/TR/wsdl20/ which is the 2007 version in which the XML looks more plausible. If you visit its http://www.w3.org/ns/wsdl namespace you find https://www.w3.org/2007/06/wsdl/wsdl20.xsd which as a genuinely machine readable file is much more likely to work.

Regards

Ed Willink
Previous Topic:CDO: DB Connection leaks caused by InterruptedExceptions
Next Topic:[CDO] Loading JAVA_CLASS CdoType -> ClassNotFoundException
Goto Forum:
  


Current Time: Fri Apr 26 07:43:50 GMT 2024

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

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

Back to the top