I am creating a web service using php SOAPServer. I am creating a wsdl file and looking for info on how to set the min and max string length for one of the input parameters for one of the web service operations. Is it even possible?
By the way I am using soap binding style "rpc"
Do you code the WSDL by hand or does the library create it for you by looking at an endpoint class? If you are coding the WSDL by hand, you could simply add something like this in your schema descriptor:
<simpleType name="MyStringType">
<restriction base="string">
<minLength value="10" />
<maxLength value="30" />
</restriction>
</simpleType>
<element name="greetMe">
<complexType>
<sequence>
<element name="requestType"
type="tns:MyStringType"/>
</sequence>
</complexType>
</element>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With