[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [stp-dev] Discussion on policy support in STP
|
Hi Jerry,
Yep, the XEF policy editor is available in SVN. You can find it in the
org.eclipse.stp.xef plugin that's in the org.eclipse.stp.servicecreation
directory.
There are 127 unit tests for it in the org.eclipse.stp.xef.test
fragment. Running / looking at those should help you with understanding
the code.
Basically the XEF editor uses the information in the schema to decide
how to display policies. It does not use a PSVI, it uses information in
the schema directly. For each assertion the schema for that element is
looked up and the XEF editor renders its widgets accordingly.
The XEF editor can actually edit any XML file with schema-based open
content, <wsp:All> is just one of them. When the EditorInput
(XMLProviderEditorInput) is created for the editor a number of
parameters are passed in that decide what part of the XML is edited. It
can be used on standalone WS-Policy documents, policy documents that are
embedded in a WSDL document or even proprietary policy documents that do
not use the wsp: namespace to place their policies in. In all cases the
XEF Policy Editor will only show the policies and hide the non-relevant
XML. When modifications are saved they will be merged back in with the
original document, which can be quite handy if you want to edit policies
that are inside a WSDL file.
This is all set up when the XMLProviderEditorInput that is used when
opening the policy editor is created.
Hope this helps...
David
Gerald Preissler wrote:
Hi David,
I really think that we should try to move to a common model so we can
support multiple editor windows without serializing/de-serializing the
whole document every time someone switches the window. Neethi IMO
would be a good candidate since it also offers the WS-Policy
operations like normalization, merge and intersection for free.
I'm trying to understand how the XEF editor works, is the code
available in the SVN?
Is the following description basically correct:
- When you load a policy, you validate it against the schema for
WS-Policy documents
- For each assertion, you use the psvi information to determine how to
display it
- You currently only support policies in the form
<wsp:Policy>
<wsp:All>
<ns1:Assertion_1/>
...
<nsn:Assertion_n/>
</wsp:All>
</wsp:Policy>
How do you enforce this? Do you use a specialized schema?
regards
Jerry
David Bosschaert wrote:
Hi Jerry,
Currently the XEF Policy Editor does not use Neethi yet. Its internal
representation is actually highly based on the XML Schema definitions
of the policies and for this it uses the Xerces XML Schema API
(http://xerces.apache.org/xerces2-j/javadocs/xs/index.html).
I think at the moment the easiest integration would be on top of the
actual XML (WS-Policy) content. The XEF Policy editor currently has 2
tabs, one with widgets and another one with the XML text. There are
conversions from one to the other which get triggered when a user
flips the page.
If a conversion to/from your WTP-based policy editor from the plain
XML would be added (or maybe its already there?), we should be able
to run both editors (plus a plain text page) in a single multi-page
editor, correct?
Cheers,
David
Gerald Preissler wrote:
Hi David,
we're using the implementation of policy intersection in Neethi. We
thought about using a model based on Neethi, but did not get around
to that yet.
Maybe this is the easiest way to get to a common model beneath the
XEF editor and the Sopera one. Do you think moving to a Neethi-based
model would be feasible for the XEF editor?
regards
Jerry
David Bosschaert wrote:
I don't think XEF policy editor has those same restrictions,
however it does not yet support all of the WS-Policy formats. The
XEF editor currently only supports policies nested in <wsp:All/>, e.g:
<wsp:Policy xmlns:wsp="http://www.w3.org/ns/ws-policy">
<wsp:All>
<acme:Logging xmlns:acme="http://www.acme.com/xsd/2007/08/logging">
<file filename="myService.log" rolling_file="true" />
</acme:Logging>
<acme:Security
xmlns:acme="http://www.acme.com/xsd/2007/08/security" />
</wsp:All>
</wsp:Policy>
On the policy model, did anyone consider Apache Neethi
(http://ws.apache.org/commons/neethi/index.html)? It provides an
API on top of WS-Policy documents. This might provide something in
the context of a Policy model...
Cheers,
David
----------------------------
IONA Technologies PLC (registered in Ireland)
Registered Number: 171387
Registered Address: The IONA Building, Shelbourne Road, Dublin 4,
Ireland
_______________________________________________
stp-dev mailing list
stp-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/stp-dev
----------------------------
IONA Technologies PLC (registered in Ireland)
Registered Number: 171387
Registered Address: The IONA Building, Shelbourne Road, Dublin 4, Ireland