OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

sca-assembly message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: Re: [sca-assembly] [ASSEMBLY-206] Test 5032 and 5034 uses runtime-specificURIs - PROPOSAL



Dave,

I very much approve of the sentiment behind your suggestion.

However, the simple answer is that I don't know how to make this work, at least with DTDs and Entity References.

The problem is that the external DTD can be referenced either via a relative URL or via an absolute one.

Relative is taken to be relative to the parent XML document (composite in our case) - and when it comes to a
composite the simplest thing is to place the DTD in the same directory (or ZIP) as the composite.  This is what
I have done.  Any other location could only be a subdirectory of the contribution - there is no meaning for a
relative URL for a second contribution.

Absolute URLs have a major problem in that each installation is going to use its own scheme for laying out the
contributions with the result that no single absolute URL can possibly work.


If we want to achieve your aim, I think a different mechanism would be required.  However, I don't know of such
a mechanism that can be expected to work for all SCA runtimes - external DTDs are standardized for XML
processing.  I'm not sure that any other mechanism can be guaranteed to apply.  We could of course create
a new one within SCA using the SCA import process and resolution rules, but this would require some additions
to the spec.  I don't favour this.


Yours,  Mike.

Strategist - Emerging Technologies, SCA & SDO.
Co Chair OASIS SCA Assembly TC.
IBM Hursley Park, Mail Point 146, Winchester, SO21 2JN, Great Britain.
Phone & FAX: +44-1962-818014    Mobile: +44-7802-467431  
Email:  mike_edwards@uk.ibm.com



From: David Booz <booz@us.ibm.com>
To: sca-assembly@lists.oasis-open.org
Date: 07/05/2010 13:20
Subject: Re: [sca-assembly] [ASSEMBLY-206] Test 5032 and 5034 uses runtime-specific URIs - PROPOSAL





Is there any way to put the sca_variables.dtd in it's own contribution?  My
organized mind likes the idea that modifiable artifacts are contributed to
the test suite via a vendor specific contribution.

Dave Booz
STSM, BPM and SCA Architecture
Co-Chair OASIS SCA-Policy TC and SCA-J TC
"Distributed objects first, then world hunger"
Poughkeepsie, NY (845)-435-6093  or  8-295-6093
e-mail:booz@us.ibm.com


|------------>
| From:      |
|------------>
 >--------------------------------------------------------------------------------------------------------------------------------------------------|
 |Mike Edwards <mike_edwards@uk.ibm.com>                                                                                                            |
 >--------------------------------------------------------------------------------------------------------------------------------------------------|
|------------>
| To:        |
|------------>
 >--------------------------------------------------------------------------------------------------------------------------------------------------|
 |"OASIS Assembly" <sca-assembly@lists.oasis-open.org>                                                                                              |
 >--------------------------------------------------------------------------------------------------------------------------------------------------|
|------------>
| Date:      |
|------------>
 >--------------------------------------------------------------------------------------------------------------------------------------------------|
 |05/07/2010 05:16 AM                                                                                                                               |
 >--------------------------------------------------------------------------------------------------------------------------------------------------|
|------------>
| Subject:   |
|------------>
 >--------------------------------------------------------------------------------------------------------------------------------------------------|
 |[sca-assembly] [ASSEMBLY-206] Test 5032 and 5034 uses runtime-specific URIs - PROPOSAL                                                            |
 >--------------------------------------------------------------------------------------------------------------------------------------------------|






Folks,

ASSEMBLY 206 shows a problem with a couple of the Assembly testcases that
use explicit Web service endpoints as part
of the testing of the handling of Bindings.  The problem is that actual
endpoint addresses are currently contained in the
composites that belong to the testcases - but these endpoint addresses are
likely to change from one SCA runtime to another.

The proposal made here is to parameterize the endpoint addresses using XML
Entity References and to declare values for
those Entity References in a separate file (a DTD file) and to allow SCA
runtime vendors to modify the contents of the separate
file to reflect appropriate values for the Web services endpoints.

This approach is chosen to avoid the main files under test (the composite
files) from being modified - such modifications would
set a bad precedent that could lead to the testcases being subtly
subverted.  This proposal ensures that modifications are only
permitted in a carefully controlled way in very limited places.

So, let's take ASM_5034 testcase as an example.

In the current version, the composite has a reference that uses an explicit
Web service address:

       <reference name="Reference1">
               <interface.wsdl interface="
http://test.sca.oasisopen.org/#wsdl.porttype(Service1)"/>
               <binding.sca uri="TestComponent2/Service1" name="first"/>
               <binding.ws uri="
http://localhost:8080/TestComponent2/Service1/second" name="second"/>
       </reference>


...note the uri value of the binding.ws

The first part of this proposal changes the explicit Web service address
for an entity reference:

       <reference name="Reference1">
               <interface.wsdl interface="
http://test.sca.oasisopen.org/#wsdl.porttype(Service1)"/>
               <binding.sca uri="TestComponent2/Service1" name="first"/>
               <binding.ws uri="&ws_addr_5034;" name="second"/>
       </reference>

....note the &ws_addr_5034; entity reference

The second part of the proposal is to add a reference to an external DTD
file at the start of the composite (before the <composite> element):

<!DOCTYPE sca_assembly SYSTEM "sca_variables.dtd">

...note that the form of the URI for the DTD implies that the file is in
the same directory as the composite file (they are all in the base of the
General contribution in this case)

Finally, the third part of the proposal adds an external DTD file,
sca_variables.dtd, into the set of artifacts:

<!-- * * Copyright(C) OASIS(R) 2005,2010. All Rights Reserved. * OASIS trademark, IPR and other policies apply. * -->
<!-- * This DTD forms part of the SCA Assembly Test Suite. * It declares a number of XML Entities which are used in Entity References in some of the * composites that are artifacts used in the testcases. * * The values declared in the Entity References are intended to reflect SCA runtime specific * values for certain aspects of the composites at runtime - in particular addresses of some * services. * * It is permitted - indeed it is expected - that an SCA runtime provider will MODIFY the values * declared for the Entity References to match the values which would be expected when running the * SCA Assembly test suite against a given SCA runtime.  The values held in the this file are * examples, derived from running the test suite against the Apache Tuscany SCA runtime. -->
<!-- Address of the Web service provided by component "TEST_ASM_5032Component2" in Test_ASM_5032 composite -->
<!ENTITY ws_addr_5032 "
http://localhost:8080/TEST_ASM_5032Component2/Service1/binding2">
<!-- Address of the Web service provided by component "TestComponent2" in Test_ASM_5034 composite -->
<!ENTITY ws_addr_5034 "
http://localhost:8080/TestComponent2/Service1/second
">


This DTD file contains the Entity declarations for all of the Entity
References held in the contribution to which it belongs - and provides
their values.

Note that this file has explicit statements that it can be modified to
contain appropriate values for each of the Entities.  The provided values
are
examples (which happen to work with the Apache Tuscany SCA runtime).


This proposal affects the artifacts for testcases ASM_5032 and ASM_5034 and
you can see the new versions of the artifacts in the
OASIS SVN repository.





Yours,  Mike.

Strategist - Emerging Technologies, SCA & SDO.
Co Chair OASIS SCA Assembly TC.
IBM Hursley Park, Mail Point 146, Winchester, SO21 2JN, Great Britain.
Phone & FAX: +44-1962-818014    Mobile: +44-7802-467431
Email:  mike_edwards@uk.ibm.com






Unless stated otherwise above:
IBM United Kingdom Limited - Registered in England and Wales with number
741598.
Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU














---------------------------------------------------------------------
To unsubscribe from this mail list, you must leave the OASIS TC that
generates this mail.  Follow this link to all your TCs in OASIS at:
https://www.oasis-open.org/apps/org/workgroup/portal/my_workgroups.php









Unless stated otherwise above:
IBM United Kingdom Limited - Registered in England and Wales with number 741598.
Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU








[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]