I'm getting this error:
Two declarations cause a collision in the ObjectFactory class
When running the command to map java classes from a WCF service:
wsimport http://path/to/service.svc?wsdl -Xnocompile -extension -keep -XadditionalHeaders -B-XautoNameResolution
This problem happens because I have two classes with the same name, but in different namespaces (and different properties), like this:
namespace App.TestService.Request
{
[DataContract]
public class Foo
{
.....
namespace App.TestService.Response
{
[DataContract]
public class Foo
{
.....
Is there a way to avoid this error without renaming these classes or using (Name="....") attribute?