tuscany-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Simon Nash <n...@apache.org>
Subject Re: Dynamic service references ?
Date Sun, 04 Dec 2011 18:27:26 GMT
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<SomeType>(xmlReader)
>> to
>>   new ServiceReferenceImpl<SomeType>(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<SomeType>(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


Mime
View raw message