tuscany-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Millies, Sebastian" <Sebastian.Mill...@softwareag.com>
Subject Re: Dynamic service references ?
Date Mon, 21 Nov 2011 15:35:45 GMT
> -----Original Message-----
> From: Simon Nash [mailto:nash@apache.org]
> Sent: Monday, November 21, 2011 4:21 PM
> To: user@tuscany.apache.org
> Subject: Re: Dynamic service references ?
>
[snip]
> I strongly suspect that no-one has ever tried mixing XML serialization
> with authentication before.
>
> Would you be able to quickly try doing this with regular Java binary
> serialization of the service reference to see if the authentication
> problem
> occurs in this case as well?
>
> Thanks,
> Simon

I did try the following coding, which has the same problem:

@SuppressWarnings("unchecked")
private ServiceReference<T> copy2( ServiceReference<T> serviceRef, String uri
) throws Exception
{
  ByteArrayOutputStream baos = new ByteArrayOutputStream();
  ObjectOutputStream out = new ObjectOutputStream( baos );
  out.writeObject( serviceRef );

  ObjectInputStream in = new ObjectInputStream( new ByteArrayInputStream( baos.toByteArray()
) );
  ServiceReference<T> copy = (ServiceReference<T>) in.readObject();
  return copy;
}

Of course, ObjectOutputStream#writeObject() will implicitly also use XML,
because ServiceReference implements Externalizable.

Or did you have something else in mind?

-- Sebastian


IDS Scheer Consulting GmbH
Geschäftsführer/Managing Directors: Kamyar Niroumand, Ivo Totev
Sitz/Registered office: Altenkesseler Straße 17, 66115 Saarbrücken, Germany - Registergericht/Commercial
register: Saarbrücken HRB 19681
http://www.softwareag.com

Mime
View raw message