Return-Path: Delivered-To: apmail-ws-tuscany-dev-archive@locus.apache.org Received: (qmail 4376 invoked from network); 3 Mar 2006 00:10:48 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 3 Mar 2006 00:10:48 -0000 Received: (qmail 52318 invoked by uid 500); 3 Mar 2006 00:11:35 -0000 Delivered-To: apmail-ws-tuscany-dev-archive@ws.apache.org Received: (qmail 52181 invoked by uid 500); 3 Mar 2006 00:11:34 -0000 Mailing-List: contact tuscany-dev-help@ws.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: tuscany-dev@ws.apache.org Delivered-To: mailing list tuscany-dev@ws.apache.org Received: (qmail 52171 invoked by uid 99); 3 Mar 2006 00:11:34 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 02 Mar 2006 16:11:34 -0800 X-ASF-Spam-Status: No, hits=1.2 required=10.0 tests=RCVD_IN_SORBS_WEB X-Spam-Check-By: apache.org Received-SPF: neutral (asf.osuosl.org: local policy) Received: from [204.127.192.84] (HELO rwcrmhc14.comcast.net) (204.127.192.84) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 02 Mar 2006 16:11:32 -0800 Received: from [9.26.237.123] (bi01pt1.ct.us.ibm.com[129.33.1.37]) by comcast.net (rwcrmhc14) with ESMTP id <20060303001111m1400583koe>; Fri, 3 Mar 2006 00:11:11 +0000 Message-ID: <4407898F.5050500@apache.org> Date: Thu, 02 Mar 2006 16:10:55 -0800 From: Jean-Sebastien Delfino User-Agent: Thunderbird 1.5 (X11/20051025) MIME-Version: 1.0 To: tuscany-dev@ws.apache.org Subject: Re: Defining WSDL to SDO References: <71e1b5740603010843l8b7a8c7u4fc0d2352fd6d366@mail.gmail.com> <4405F1D8.2010504@apache.org> In-Reply-To: <4405F1D8.2010504@apache.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Jean-Sebastien Delfino wrote: > ant elder wrote: >> For the new Axis2 based WS binding we need to get WSDL defined to SDO so >> that the SOAP Body XML can be (de)serialized to DataObjects >> correctly. Could >> that happen when the import.wsdl in the sca.module is being >> processed? Thats >> done by org.apache.tuscany.model.assembly.impl.AggregateImpl in the >> initialize method. Adding the following line just after the >> getAssemblyLoader().loadDefinition call seems to work: >> >> XSDHelper.INSTANCE.define(url.openStream(), null); >> >> Would this be ok? >> >> Thanks, >> >> ...ant >> >> > Yes I think this is OK. If your service is flowing complex types and > you have generated SDO classes then you just need one of the > components in your application module to reference the generated SDO > Factory to trigger the initialization of the metadata for your complex > types. But in scenarios flowing elements of simple types e.g. name="getGreetings" type="xsd:string"> you won't have generated SDO > classes so you definitely need to invoke > XSDHelper.INSTANCE.define(url.openStream(), null) to get the metadata > for your elements in place. > I have a set of related SDO questions - and depending on the answers we may have a problem or not :) Let's say that at build time I give x.wsdl to the SDO code generator. I get SDO classes generated for the XSD types defined in my WSDL section . Then at runtime I want to use these SDO classes in an SCA component. To trigger the initialization of the SDO metadata for these types I simply reference the generated factory or use SDOUtil.registerStaticTypes(...) when my SCA component starts. Then Ant's Axis2 Entry Point runtime does XSDHelper.INSTANCE.define(the exact same x.wsdl)... My understanding is that this will dynamically generate SDO metadata from the given WSDL.. Which version of the metadata is the SDO runtime going to use? the first one that gets registered? the last one? Is XSDHelper going to detect that already have SDO metadata registered with static types for the given namespace? Do we get new SDO metadata each time we invoke XSDHelper.define(...)? -- Jean-Sebastien