John Smith
John Smith

Reputation: 11

#Id/#Ref is unresolved

I have created a very simple Web Service using WCF/.NET framework 4.0 (C#). I have generated a WSDL file using the svcutil.exe utility. When I import the WSDL file using Eclipse (Java EE), I get the following errors:

XSD: Attribute reference 'http://schemas.microsoft.com/2003/10/Serialization/#Id' is unresolved XSD: Attribute reference 'http://schemas.microsoft.com/2003/10/Serialization/#Ref' is unresolved

I am using the DataContractSerializer with reference preservation turned on using:

[DataContract(IsReference = true)]

When I turn this option off, the error above, disappears. I have also flatten my WSDL file as suggested in another thread here on SO.

Upvotes: 1

Views: 203

Answers (1)

krisragh MSFT
krisragh MSFT

Reputation: 1918

If you don't need to preserve references in Java, turn off IsReference, and instead turn on "preserveObjectReferences". You can do this via an overload of the DataContractSerializer constructor, via the DataContractSerializerOperationBehavior attribute, or via the config file.

Upvotes: 0

Related Questions