Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Handle JAXB @XMLIDRef in .NET

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?

like image 330
stborod Avatar asked Apr 26 '12 13:04

stborod


1 Answers

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.:

  • wsdl.exe: http://msdn.microsoft.com/library/7h3ystb6(VS.80).aspx
  • svcutil.exe: http://msdn.microsoft.com/en-us/library/aa347733.aspx

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)

like image 64
Wolfgang Fahl Avatar answered Sep 28 '22 06:09

Wolfgang Fahl