37

I'm writing a web service using jax-ws. One of web service's methods returns bean, which contains reference to its parent. To prevent cyclic references I'm using JAXB @XMLID and @XMLIDRef annotations in my bean.

Then i'm generating proxy class for java client everything works OK and id resolves to Object properties. But then I'm generating web-service client proxy in Visual Studio for .NET, it interprets idrefs as string properties, not an Object.

Is it possible to generate proxy classes from wsdl for .NET with resolving of idrefs?

atiruz
  • 2,782
  • 27
  • 36
stborod
  • 533
  • 4
  • 11
  • 2
    It appears .NET prefers the id/ref attribute combo. See http://stackoverflow.com/a/1617566/278836. So .NET doesn't like the Java way and Java doesn't like the .NET way; at least out of the box (as far as I can tell). I'm very interested in this as well since cross platform references seems like a rather critical feature. – Andrew White Jun 14 '12 at 02:34
  • 1
    @Andrew White thanks for that reference. I'm sitting here pondering how I managed to avoid this interop mess myself all this time. I read through that link, which led to this link: http://blogs.msdn.com/b/sowmy/archive/2006/03/26/561188.aspx. Perhaps the question comes down to: is the technique described sufficient to allow .NET/Java interop? – Richard Sitze Jul 31 '12 at 16:12

1 Answers1

1

Out of the box Microsoft's tools won't do the job for you. You'll have to ask Microsoft to change the

wsdl generation tools. E.g.:

In a recent project I had to work around the short comings of these tools and modified the generated code using a Basic Script fixing what was not generated the way needed (in our case incompatibilities with the Java side wsdl generation)

Wolfgang Fahl
  • 15,016
  • 11
  • 93
  • 186