Failing on simple schema

Jun 30, 2010 at 3:03 AM
The process seems to breakdown quickly even on very simple schema. 'CODEGEN: Parameter 'id' requires additional schema information that cannot be captured using the parameter mode. The specific attribute is 'System.Xml.Serialization.XmlElementAttribute'. <System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "3.0.0.0"), _ System.ServiceModel.ServiceContractAttribute([Namespace]:="http://tempuri.org/Person.xsd", ConfigurationName:="IPersonService")> _ Public Interface IPersonService 'CODEGEN: Parameter 'id' requires additional schema information that cannot be captured using the parameter mode. The specific attribute is 'System.Xml.Serialization.XmlElementAttribute'. <System.ServiceModel.OperationContractAttribute(Action:="http://tempuri.org/Person.xsd/IPersonService/GetPerson", ReplyAction:="http://tempuri.org/Person.xsd/IPersonService/GetPersonResponse"), _ System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults:=true)> _ Function GetPerson(ByVal request As GetPersonRequest) As <System.ServiceModel.MessageParameterAttribute(Name:="person")> GetPersonResponse End Interface <?xml version="1.0" encoding="utf-8"?> <xs:schema id="Person" targetNamespace="http://tempuri.org/Person.xsd" elementFormDefault="qualified" xmlns="http://tempuri.org/Person.xsd" xmlns:mstns="http://tempuri.org/Person.xsd" xmlns:xs="http://www.w3.org/2001/XMLSchema"> <xs:complexType name="person"> <xs:sequence> <xs:element name="id" type="xs:int" nillable ="true" minOccurs ="0" /> <xs:element name="name" type="xs:string" nillable ="true" minOccurs ="0" /> </xs:sequence> </xs:complexType> <xs:element name="getPerson"> <xs:complexType> <xs:sequence> <xs:element name="id" type="xs:integer"/> </xs:sequence> </xs:complexType> </xs:element> <xs:element name="getPersonResponse"> <xs:complexType> <xs:sequence> <xs:element name="person" type="person"/> </xs:sequence> </xs:complexType> </xs:element> </xs:schema>
Developer
Jun 30, 2010 at 11:18 AM

Can you please provide some information about when this error occurs and what options you are using?

Cheers,

Alex. 

Jun 30, 2010 at 12:46 PM
Alex, I was just running through a very simple exercise. I created the schema above. Use the tool th generate the wsdl, then used the tool to generate the service from the wsdl. I used what I would think would be a very simple example. I had tried the too on some larger production schema and ran into the same issue so I did a small ground up test. The process seems to breakdown quickly even on very simple schema. 'CODEGEN: Parameter 'id' requires additional schema information that cannot be captured using the parameter mode. The specific attribute is 'System.Xml.Serialization.XmlElementAttribute'. Thanks Mike