Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » Ecore model of w3c ws-policy (Help to create an ecore model from ws-plicy schema)
Ecore model of w3c ws-policy [message #498644] Tue, 17 November 2009 20:50 Go to next message
M.  is currently offline M. Friend
Messages: 19
Registered: November 2009
Junior Member
Hi,

I need to create a model of ws-policy framework except the attachhment part.

I'm thinking to create it (and i've just tried to make it) the ecore model from the schema (only a part of the schema) but probably to obtain a sensate model I need to adjust my schema.

Where are the problem in the translate to ecore model of this schema and how to resolve it:

<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:tns="http://www.w3.org/ns/ws-policy"
xmlns:wsse=" http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wsse curity-secext-1.0.xsd"
xmlns:wsu=" http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wsse curity-utility-1.0.xsd"
targetNamespace="http://www.w3.org/ns/ws-policy" blockDefault="#all"
elementFormDefault="qualified">

<xs:import
namespace=" http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wsse curity-secext-1.0.xsd"
schemaLocation=" http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wsse curity-secext-1.0.xsd" />

<xs:import
namespace=" http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wsse curity-utility-1.0.xsd"
schemaLocation=" http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wsse curity-utility-1.0.xsd" />

<xs:element name="Policy" >
<xs:complexType>
<xs:complexContent>
<xs:extension base="tns:OperatorContentType" >
<xs:attribute name="Name" type="xs:anyURI" />
<xs:anyAttribute namespace="##any" processContents="lax" />
</xs:extension>
</xs:complexContent>
</xs:complexType>
</xs:element>

<xs:element name="All" type="tns:OperatorContentType" />
<xs:element name="ExactlyOne" type="tns:OperatorContentType" />

<xs:complexType name="OperatorContentType" >
<xs:sequence>
<xs:choice minOccurs="0" maxOccurs="unbounded" >
<xs:element ref="tns:Policy" />
<xs:element ref="tns:All" />
<xs:element ref="tns:ExactlyOne" />
<xs:element ref="tns:PolicyReference" />
<xs:any namespace="##other" processContents="lax" />
</xs:choice>
</xs:sequence>
</xs:complexType>

<xs:element name="PolicyReference" >
<xs:complexType>
<xs:sequence>
<xs:any namespace="##any" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
<xs:attribute name="URI" type="xs:anyURI" use="required" />
<xs:attribute name="Digest" type="xs:base64Binary" />
<xs:attribute name="DigestAlgorithm" type="xs:anyURI" default="http://www.w3.org/ns/ws-policy/Sha1Exc" />
<xs:anyAttribute namespace="##any" processContents="lax" />
</xs:complexType>
</xs:element>

<xs:attribute name="Optional" type="xs:boolean" default="false" />
<xs:attribute name="Ignorable" type="xs:boolean" default="false" />
</xs:schema>


Re: Ecore model of w3c ws-policy [message #498731 is a reply to message #498644] Wed, 18 November 2009 12:32 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33140
Registered: July 2009
Senior Member
Comments below.

M. wrote:
> Hi,
>
> I need to create a model of ws-policy framework except the attachhment
> part.
What do you mean by that?
>
> I'm thinking to create it (and i've just tried to make it) the ecore
> model from the schema (only a part of the schema) but probably to
> obtain a sensate model I need to adjust my schema.
>
> Where are the problem in the translate to ecore model of this schema
> and how to resolve it:
What problem are you having? It works fine for me...
>
> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
> xmlns:tns="http://www.w3.org/ns/ws-policy"
> xmlns:wsse=" http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wsse curity-secext-1.0.xsd"
>
> xmlns:wsu=" http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wsse curity-utility-1.0.xsd"
>
> targetNamespace="http://www.w3.org/ns/ws-policy" blockDefault="#all"
> elementFormDefault="qualified">
>
> <xs:import
> namespace=" http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wsse curity-secext-1.0.xsd"
>
>
> schemaLocation=" http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wsse curity-secext-1.0.xsd"
> />
>
> <xs:import
> namespace=" http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wsse curity-utility-1.0.xsd"
>
>
> schemaLocation=" http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wsse curity-utility-1.0.xsd"
> />
>
> <xs:element name="Policy" >
> <xs:complexType>
> <xs:complexContent>
> <xs:extension base="tns:OperatorContentType" >
> <xs:attribute name="Name" type="xs:anyURI" />
> <xs:anyAttribute namespace="##any" processContents="lax" />
> </xs:extension>
> </xs:complexContent>
> </xs:complexType>
> </xs:element>
>
> <xs:element name="All" type="tns:OperatorContentType" />
> <xs:element name="ExactlyOne" type="tns:OperatorContentType" />
>
> <xs:complexType name="OperatorContentType" >
> <xs:sequence>
> <xs:choice minOccurs="0" maxOccurs="unbounded" >
> <xs:element ref="tns:Policy" />
> <xs:element ref="tns:All" />
> <xs:element ref="tns:ExactlyOne" />
> <xs:element ref="tns:PolicyReference" />
> <xs:any namespace="##other" processContents="lax" />
> </xs:choice>
> </xs:sequence>
> </xs:complexType>
>
> <xs:element name="PolicyReference" >
> <xs:complexType>
> <xs:sequence>
> <xs:any namespace="##any" processContents="lax" minOccurs="0"
> maxOccurs="unbounded"/>
> </xs:sequence>
> <xs:attribute name="URI" type="xs:anyURI" use="required" />
> <xs:attribute name="Digest" type="xs:base64Binary" />
> <xs:attribute name="DigestAlgorithm" type="xs:anyURI"
> default="http://www.w3.org/ns/ws-policy/Sha1Exc" />
> <xs:anyAttribute namespace="##any" processContents="lax" />
> </xs:complexType>
> </xs:element>
>
> <xs:attribute name="Optional" type="xs:boolean" default="false" />
> <xs:attribute name="Ignorable" type="xs:boolean" default="false" />
> </xs:schema>
>
>
>


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Ecore model of w3c ws-policy [message #498765 is a reply to message #498731] Wed, 18 November 2009 15:14 Go to previous messageGo to next message
M.  is currently offline M. Friend
Messages: 19
Registered: November 2009
Junior Member
Actually from this schema (deleting line about "import from oasis")I create the ecore and genmodel, thus I'm able to generate the code and run as eclipse plugin.

In the second eclipse instance when i test the plug-in, I don't understand the mean of child (first child of resource) called "DocumetRoot false", and the impossibilty to add a child "policy" that should be my "element root" (mor external tag <policy ..all the doc ..</policy>).

I've tried to select "policy" in the last window of "policy model" creation wizard thinking tht it will be apper as first child of my resource, but nothing..
Re: Ecore model of w3c ws-policy [message #498837 is a reply to message #498765] Wed, 18 November 2009 18:26 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33140
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.
--------------020901000102010604030402
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit

Have a read through

Binding XML to Java
< http://www.theserverside.com/tt/articles/article.tss?l=Bindi ngXMLJava>

You might want to use this option (and note the comment about needing an
element handler during load).

/**
* When {@link #OPTION_EXTENDED_META_DATA} is used,
* this load option set to Boolean.TRUE will direct the
deserializer to suppress creating a document root instance.
* This option is typically used in combination with {@link
#OPTION_ELEMENT_HANDLER}.
* @since 2.4
*/
String OPTION_SUPPRESS_DOCUMENT_ROOT = "SUPPRESS_DOCUMENT_ROOT";



M. wrote:
> Actually from this schema (deleting line about "import from oasis")I
> create the ecore and genmodel, thus I'm able to generate the code and
> run as eclipse plugin.
>
> In the second eclipse instance when i test the plug-in, I don't
> understand the mean of child (first child of resource) called
> "DocumetRoot false", and the impossibilty to add a child "policy" that
> should be my "element root" (mor external tag <policy ..all the doc
> ..</policy>).
>
> I've tried to select "policy" in the last window of "policy model"
> creation wizard thinking tht it will be apper as first child of my
> resource, but nothing..

--------------020901000102010604030402
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: 8bit

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=UTF-8" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Have a read through<br>
<blockquote><a target="_out"
href=" http://www.theserverside.com/tt/articles/article.tss?l=Bindi ngXMLJava">Binding
XML to Java</a><br>
</blockquote>
You might want to use this option (and note the comment about needing
an element handler during load).<br>
<blockquote>  /**<br>
   * When {@link #OPTION_EXTENDED_META_DATA} is used, <br>
   * this load option set to Boolean.TRUE will direct the deserializer
to suppress creating a document root instance.<br>
   * This option is typically used in combination with {@link
#OPTION_ELEMENT_HANDLER}.<br>
   * @since 2.4<br>
   */<br>
  String OPTION_SUPPRESS_DOCUMENT_ROOT = "SUPPRESS_DOCUMENT_ROOT";<br>
</blockquote>
<br>
<br>
M. wrote:
<blockquote cite="mid:he1325$mbi$1@build.eclipse.org" type="cite">Actually
from this schema (deleting line about "import from oasis")I create the
ecore and genmodel, thus I'm able to generate the code and run as
eclipse plugin.
<br>
<br>
In the second eclipse instance when i test the plug-in, I don't
understand the mean of child (first child of resource) called
"DocumetRoot false", and the impossibilty to add a child "policy" that
should be my "element root" (mor external tag &lt;policy ..all the doc
...&lt;/policy&gt;).
<br>
<br>
I've tried to select "policy" in the last window of "policy model"
creation wizard thinking tht it will be apper as first child of my
resource, but nothing..
<br>
</blockquote>
</body>
</html>

--------------020901000102010604030402--


Ed Merks
Professional Support: https://www.macromodeling.com/
Previous Topic:Re: [EMF Compare] Move of an element
Next Topic:[solved] XML Schema Definition Editor with KEY and KEYREF
Goto Forum:
  


Current Time: Wed Apr 24 21:17:19 GMT 2024

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

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

Back to the top