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 Fri, 25 Nov 2011 16:43:28 GMT
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


Mime
View raw message