Looks like option B is more "spec compliant" and more aligned to the
XML namespaces usage rules. Should I give it a try ?

On 8/19/07, Raymond Feng <[EMAIL PROTECTED]> wrote:
> Hi,
>
> Here is my opinion about the three options:
>
> 1) -0.5 on A)
> 2) +1 on B)
> 3) -0.5 on C)
>
> A) violates the SCA assembly spec.
>
> 2535 ... New interface types, implementation types and binding types that
> are defined using
> 2536 this extensibility model, which are not part of these SCA
> specifications must be defined in
> 2537 namespaces other than the SCA namespace.
>
> C) IMO, the composite file should conform to the XSD defined by the SCA
> spec. The example listed under C) is not a valid SCA composite definition.
> We can make the "http://www.osoa.org/xmlns/sca/1.0"; as the default namespace
> to avoid the repeating prefixes.
>
> B) is right usage of XML namespaces.
>
> Hopefully, the SCA tooling can help ease the XML namespace declarations.
>
> Thanks,
> Raymond
>
> ----- Original Message -----
> From: "Jean-Sebastien Delfino" <[EMAIL PROTECTED]>
> To: <tuscany-dev@ws.apache.org>
> Sent: Sunday, August 19, 2007 5:07 PM
> Subject: Re: [jira] Closed: (TUSCANY-1053) Use a Tuscany namespace for all
> non-spec'd Tuscany extensions
>
>
> > Luciano Resende wrote:
> >> Sebastien wrote :
> >>
> >>> IMO application developers shouldn't have to suffer from the
> >>>
> >> complexity of XML...
> >>
> >>> How about supporting composites without namespace declarations at all?
> >>>
> >>
> >> I'm trying to understand all the proposals here, what would be the
> >> side effects of going with your proposal ? This seems like simple, and
> >> simple is good...
> >>
> >>
> >>
> >
> > Before getting into the side effects, here are three examples:
> >
> > [A] What we have right now, standard SCA extensions and tuscany extensions
> > sharing the standard SCA namespace
> >
> > <composite xmlns="http://www.osoa.org/xmlns/sca/1.0";
> >    targetNamespace="http://bigbank";
> >    xmlns:bb="http://bigbank";
> >    name="BigBank">
> >
> >    <component name="AccountServiceComponent">
> >        <service name="AccountService">
> >            <binding.jsonrpc uri="/AccountJSONService"/>
> >            <binding.ws
> > wsdlElement="http://bigbank#wsdl.port(AccountService/AccountServiceSoap)"/>
> >            <binding.sca/>
> >        </service>
> >
> >        <implementation.java class="bigbank.account.AccountServiceImpl"/>
> >
> >        <reference name="accountDataService"
> > target="AccountDataServiceComponent"/>
> >        <reference name="calculatorService">
> >            <binding.rmi host="localhost" port="8099"
> > serviceName="CalculatorRMIService"/>
> >           </reference>
> >        <reference name="stockQuoteService">
> >            <binding.ws
> > wsdlElement="http://stockquote#wsdl.port(StockQuoteService/StockQuoteSoapPort)"/>
> >        </reference>
> >          <property name="currency">EURO</property>
> >    </component>
> >
> >    <component name="AccountFeedComponent">
> >           <service name="Collection">
> >               <binding.rss uri="/rss"/>
> >               <binding.atom uri="/atom"/>
> >           </service>
> >        <implementation.java class="bigbank.account.feed.AccountFeedImpl"/>
> >        <reference name="accountService" target="AccountServiceComponent"/>
> >    </component>
> >
> >    <component name="AccountDataServiceComponent">
> >        <implementation.composite name="bb:AccountData"/>
> >    </component>
> >
> >    <component name="WebResourceComponent">
> >           <service name="Resource">
> >               <binding.resource uri="/"/>
> >           </service>
> >        <implementation.resource location="web"/>
> >    </component>
> >
> > </composite>
> >
> >
> > (B) What IMO is a more correct use of XML namespaces, standard SCA
> > extensions in the standard SCA namespace, and Tuscany extensions in a
> > Tuscany namespace
> >
> > <composite xmlns="http://www.osoa.org/xmlns/sca/1.0";
> >    xmlns:t="http://incubator.apache.org/xmlns/tuscany/1.0";
> >    targetNamespace="http://bigbank";
> >    xmlns:bb="http://bigbank";
> >    name="BigBank">
> >
> >    <component name="AccountServiceComponent">
> >        <service name="AccountService">
> >            <t:binding.jsonrpc uri="/AccountJSONService"/>
> >            <binding.ws
> > wsdlElement="http://bigbank#wsdl.port(AccountService/AccountServiceSoap)"/>
> >            <binding.sca/>
> >        </service>
> >
> >        <implementation.java class="bigbank.account.AccountServiceImpl"/>
> >
> >        <reference name="accountDataService"
> > target="AccountDataServiceComponent"/>
> >        <reference name="calculatorService">
> >            <t:binding.rmi host="localhost" port="8099"
> > serviceName="CalculatorRMIService"/>
> >           </reference>
> >        <reference name="stockQuoteService">
> >            <binding.ws
> > wsdlElement="http://stockquote#wsdl.port(StockQuoteService/StockQuoteSoapPort)"/>
> >        </reference>
> >          <property name="currency">EURO</property>
> >    </component>
> >
> >    <component name="AccountFeedComponent">
> >           <service name="Collection">
> >               <t:binding.rss uri="/rss"/>
> >               <t:binding.atom uri="/atom"/>
> >           </service>
> >        <implementation.java class="bigbank.account.feed.AccountFeedImpl"/>
> >        <reference name="accountService" target="AccountServiceComponent"/>
> >    </component>
> >
> >    <component name="AccountDataServiceComponent">
> >        <implementation.composite name="bb:AccountData"/>
> >    </component>
> >
> >    <component name="WebResourceComponent">
> >           <service name="Resource">
> >               <t:binding.resource uri="/"/>
> >           </service>
> >        <implementation.resource location="web"/>
> >    </component>
> >
> > </composite>
> >
> > [C] What an application developer could write if we allowed namespaces to
> > be omitted
> >
> > <composite
> >    name="BigBank">
> >
> >    <component name="AccountServiceComponent">
> >        <service name="AccountService">
> >            <binding.jsonrpc uri="/AccountJSONService"/>
> >            <binding.ws
> > wsdlElement="http://bigbank#wsdl.port(AccountService/AccountServiceSoap)"/>
> >            <binding.sca/>
> >        </service>
> >
> >        <implementation.java class="bigbank.account.AccountServiceImpl"/>
> >
> >        <reference name="accountDataService"
> > target="AccountDataServiceComponent"/>
> >        <reference name="calculatorService">
> >            <binding.rmi host="localhost" port="8099"
> > serviceName="CalculatorRMIService"/>
> >           </reference>
> >        <reference name="stockQuoteService">
> >            <binding.ws
> > wsdlElement="http://stockquote#wsdl.port(StockQuoteService/StockQuoteSoapPort)"/>
> >        </reference>
> >          <property name="currency">EURO</property>
> >    </component>
> >
> >    <component name="AccountFeedComponent">
> >           <service name="Collection">
> >               <binding.rss uri="/rss"/>
> >               <binding.atom uri="/atom"/>
> >           </service>
> >        <implementation.java class="bigbank.account.feed.AccountFeedImpl"/>
> >        <reference name="accountService" target="AccountServiceComponent"/>
> >    </component>
> >
> >    <component name="AccountDataServiceComponent">
> >        <implementation.composite name="AccountData"/>
> >    </component>
> >
> >    <component name="WebResourceComponent">
> >           <service name="Resource">
> >               <binding.resource uri="/"/>
> >           </service>
> >        <implementation.resource location="web"/>
> >    </component>
> >
> > </composite>
> >
> > Now here are a few "side effects" :)
> >
> > Option [A]
> > - I cannot validate this composite against the standard SCA schemas (it'll
> > show errors in my XSD aware XML editor) our Tuscany extensions violate the
> > standard SCA namespace
> > - I have one less namespace and prefix declaration to care about
> >
> > Option [B]
> > - I can validate this composite against the standard SCA schemas, as the
> > Tuscany extensions match the xsd:any namespace="##other" extensibility
> > points in the SCA schema
> > - I have one more namespace and prefix declaration to write covering the
> > Tuscany extensions
> >
> > Option [C]
> > - I don't need to worry about namespaces, which are usually long and error
> > prone, writing the composite is simpler
> > - I cannot validate this composite against the standard SCA schemas as it
> > does not declare namespaces
> >
> > My preference is to do both:
> > - [B], be correct with respect to our usage of XML schema, to make people
> > who care about XML schema validation and use XML schema tools happy
> > - and [C] allow people who don't like namespaces to not have to write them
> >
> > Why do I like [C] as well? Here are a few examples:
> >
> > <html>
> >    <body>
> >       Hello! I can write XML without namespaces, isn't that nice?
> >    </body>
> > </html>
> >
> > An axis2.xml configuration file
> > http://svn.apache.org/repos/asf/incubator/tuscany/java/sca/modules/binding-ws-axis2/src/main/resources/org/apache/tuscany/sca/binding/axis2/engine/config/axis2.xml
> >
> > An MS WCF configuration
> > http://msdn2.microsoft.com/en-us/library/ms735103.aspx
> >
> > A Tomcat server.xml file
> > http://tomcat.apache.org/tomcat-6.0-doc/default-servlet.html
> >
> > All work without namespaces...
> >
> > --
> > Jean-Sebastien
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-- 
Luciano Resende
Apache Tuscany Committer
http://people.apache.org/~lresende
http://lresende.blogspot.com/

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to