SVCUtil fails to Generate Code for Nested Attributes in AttributeGroup RRS feed

  • Question

  • Below is a sample to illustrate the problem. Notice all attribute groups are not generated

    The attributes with red line are what we need but not generated by svcutil. The attributeGroup with blue line is referenced by those base classes that we call. And the attributeGroup highlighted is the one wrapping all those attributes which aren’t generated.

    The point is, only an attributeGroup wrapping another which contains attributes, those attributes will not be generated. Once I remove this extra wrapping, all attributes inside are generated correctly.

    Monday, July 7, 2014 4:09 PM


  • Hi,

    Please first try to use the "Add Service Reference" to generate the client to see if it works.

    Then its probably is an issue with XML namespaces in that the incoming messages has the elements in a namespace that the WCF code is not expecting. Please have a look at the egenerated classes and see what namespace WCF thinks they should be in (should be a property of the DataContract attribute). Now look at the message and see what namespace they are actually in.

    Best Regards,
    Amy Peng

    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Tuesday, July 8, 2014 6:59 AM