You need to sign in to do that
Don't have an account?
Jyosi jyosi
Apex Web services Class Minoccur=1
Hello All ,
I need to make the field required in Apex webservices class
I have variable firstName and it should be mandatory in services
webservice string firstName; is the syntax.When i generate the schema it's shows as below.
<xsd:element name="firstName" minOccurs="0" type="xsd:string" nillable="true"/>
how to make the minOccurs="1" through apex class
<xsd:element name="firstName" minOccurs="1" type="xsd:string" nillable="true"/>
Thanks for help.
Regards,
Ashok N
I need to make the field required in Apex webservices class
I have variable firstName and it should be mandatory in services
webservice string firstName; is the syntax.When i generate the schema it's shows as below.
<xsd:element name="firstName" minOccurs="0" type="xsd:string" nillable="true"/>
how to make the minOccurs="1" through apex class
<xsd:element name="firstName" minOccurs="1" type="xsd:string" nillable="true"/>
Thanks for help.
Regards,
Ashok N
When you make your field required on field level then it sets minOccurs=1 and that is how it referes in your WSDL when exported
We dont want to make on field level,We need to do in Apex class is there any way we can do that ?
Thanks for the help.
Regards,
Jyo