Handle JAXB @XMLIDRef in .NET

2019-03-22 12:04发布

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?

1条回答
在下西门庆
2楼-- · 2019-03-22 12:37

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)

查看更多
登录 后发表回答