Ciao a tutti,
ho un problema che non riesco a risolvere: premettendo che non posso installare xsd.exe, dovrei generare una classe c# che soddisfi un xsd file che è gia stato specificato e non modificabile.
Quando realizzo il servizio wcf ottengo questo:
Non so come fare a controllare sulla classe c# alcuni parametri come le restriction,annotation e maxLength che sono specificati..avete qualche idea?codice:<xsd:complexType name="PolicyDetails"> − <xsd:sequence> <xsd:element minOccurs="0" maxOccurs="1" name="LastName" type="xsd:string"/> <xsd:element minOccurs="0" maxOccurs="1" name="FirstName" type="xsd:string"/> <xsd:element minOccurs="0" maxOccurs="1" name="FiscalCode" type="xsd:string"/> <xsd:element minOccurs="0" maxOccurs="1" name="Gender" type="xsd:string"/> <xsd:element minOccurs="0" maxOccurs="1" name="ProductCode" type="xsd:string"/> <xsd:element minOccurs="1" maxOccurs="1" name="BirthDate" type="xsd:dateTime"/> <xsd:element minOccurs="1" maxOccurs="1" name="EffectDate" type="xsd:dateTime"/> <xsd:element minOccurs="1" maxOccurs="1" name="ExpiryDate" nillable="true" type="xsd:dateTime"/> <xsd:element minOccurs="0" maxOccurs="1" name="PolicyStatus" type="xsd:string"/> <xsd:element minOccurs="0" maxOccurs="1" name="PolicyNumber" type="xsd:string"/> <xsd:element minOccurs="1" maxOccurs="1" name="InsuredCapital" nillable="true" type="xsd:decimal"/> <xsd:element minOccurs="1" maxOccurs="1" name="CededLifeCapital" nillable="true" type="xsd:decimal"/> <xsd:element minOccurs="1" maxOccurs="1" name="CededNoLifeCapital" nillable="true" type="xsd:decimal"/> <xsd:element minOccurs="1" maxOccurs="1" name="DebtContractDuration" nillable="true" type="xsd:int"/> <xsd:element minOccurs="1" maxOccurs="1" name="DebtContractFrequency" nillable="true" type="xsd:int"/> <xsd:element minOccurs="0" maxOccurs="1" name="DebtContractNumber" type="xsd:string"/> <xsd:element minOccurs="1" maxOccurs="1" name="DebtContractAmount" nillable="true" type="xsd:decimal"/> <xsd:element minOccurs="1" maxOccurs="1" name="DebtContractInstallment" nillable="true" type="xsd:decimal"/> <xsd:element minOccurs="0" maxOccurs="1" name="Guarantees" type="tns:ArrayOfGuarantee"/> <xsd:element minOccurs="0" maxOccurs="1" name="UnPaidPremiums" type="tns:ArrayOfUnPaidPremium"/> </xsd:sequence>
Grazie
Mike "The Ram"