Return-Path: X-Original-To: apmail-tuscany-user-archive@www.apache.org Delivered-To: apmail-tuscany-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 191B09ABF for ; Sun, 4 Dec 2011 18:27:59 +0000 (UTC) Received: (qmail 70958 invoked by uid 500); 4 Dec 2011 18:27:58 -0000 Delivered-To: apmail-tuscany-user-archive@tuscany.apache.org Received: (qmail 70907 invoked by uid 500); 4 Dec 2011 18:27:58 -0000 Mailing-List: contact user-help@tuscany.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@tuscany.apache.org Delivered-To: mailing list user@tuscany.apache.org Received: (qmail 70900 invoked by uid 99); 4 Dec 2011 18:27:58 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 04 Dec 2011 18:27:58 +0000 X-ASF-Spam-Status: No, hits=0.7 required=5.0 tests=RCVD_IN_DNSWL_NONE,SPF_HELO_PASS,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: local policy) Received: from [212.227.126.187] (HELO moutng.kundenserver.de) (212.227.126.187) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 04 Dec 2011 18:27:49 +0000 Received: from [192.168.0.49] (w-194.cust-4723.ip.static.uno.uk.net [95.172.230.194]) by mrelayeu.kundenserver.de (node=mrbap1) with ESMTP (Nemesis) id 0MSHYx-1RLT6h0k71-00Sy0T; Sun, 04 Dec 2011 19:27:28 +0100 Message-ID: <4EDBBB8E.2020905@apache.org> Date: Sun, 04 Dec 2011 18:27:26 +0000 From: Simon Nash User-Agent: Thunderbird 2.0.0.24 (Windows/20100228) MIME-Version: 1.0 To: user@tuscany.apache.org Subject: Re: Dynamic service references ? References: <32F15738E8E5524DA4F01A0FA4A8E4906C919DC5@hqmbx2.eur.ad.sag> <4ECBC9A4.6040409@apache.org> <4ECCFC06.9020004@apache.org> <4ECFC5B0.9090509@apache.org> In-Reply-To: <4ECFC5B0.9090509@apache.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V02:K0:LHgb422ahybXhweLFSXnOLphs8mEatE0iXITGJilgxz WMDAoxbT3yMqYGkSGGpfbXx8WN8ctHfbzU5QPEp4WdGLqWG0gW KYrq0274tSfXExVWkEyDMWM67YenDX28/WmnO35MEg4mAfN/FT KnspkRg2PlB/MNWYhgYlw+f9IyS2dCVF1pc0Dfv6jWAcJUPha4 9Y3Dh9Qj/PpqvVWATalcdjtWaU6vlYnoKQfFmSdB/IyMZrzMLf okpnKRp0RLHZtLp/yyIU1xjAxg5HBqIV6vN6kSMKCeakv/rUV6 CbElSAyWmiUGdUMY3ATvxzGYSa2FCokdcgCEq46YfiC+kFPDKV 3rtUSh/9rYHyAnpsTdGE= X-Virus-Checked: Checked by ClamAV on apache.org Simon Nash wrote: > Simon Nash wrote: >> Simon Nash wrote: > > >> (cut) >> >> One change that will be necessary in user code is to change the XML >> deserialization call from >> new ServiceReferenceImpl(xmlReader) >> to >> new ServiceReferenceImpl(SomeType.class, xmlReader) >> >> This is necessary for a service reference with interface.wsdl because >> there's no other way for the deserialization code to obtain a Java >> interface from the WSDL interface in the XML. It isn't necessary >> if the service reference uses interface.java. It also shouldn't be >> necessary when using regular Java serialization/deserialization, as >> the service reference can write out the necessary class information >> when it's serialized. >> > Actually there's a problem with making this change. The constructor > new ServiceReferenceImpl(xmlReader) > is used by the XMLStreamReader2CallableReference transformer to create > a ServiceReference or CallableReference from XML received on the wire. > It's not possible for the code in XMLStreamReader2CallableReference to > pass the Java business interface because this code doesn't know what > the business interface should be. > > Instead I'm now looking into how Tuscany can write the business interface > as part of the serialized XML. I think this would need to be a > Tuscany-specific XML element or attribute that only appears in this > serialized form. > > Apart from this remaining issue, I think I now have a fix that works for > the cases that we have been discussing. > > Simon > > > I've checked in a fix to the 1.x trunk that should handle this scenario for both serialization to XML and Java serialization. There's no change to the external API for serializing and deserializing service references. I'm leaving TUSCANY-3984 open for now until we're satisfied that the fix works for all the required cases. Simon