Is it possible to require the minimum and maximum line length for a parameter in the wsdl file?

I am creating a web service using php SOAPServer. I am creating a wsdl file and looking for information on how to set the minimum and maximum line length for one of the input parameters for one of the web service operations. Is it possible?

By the way, I use the "rpc" soap binding style

+5
source share
2 answers

Do you write WSDL manually or does the library create one for you looking at the endpoint class? If you encode WSDL manually, you can simply add something like this in the 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>
+6
source

, , . , , xml (application-context.xml) .

0

All Articles