What's the purpose of minOccurs, nillable and restriction?

后端 未结 5 1787
故里飘歌
故里飘歌 2021-02-02 13:44

Documentation for required says:

If required() is true, then Javabean property is mapped to an XML schema ele

5条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2021-02-02 14:16

    Indeed it seems that SOAP envelopes aren't validated upon WSDL, neither on server or client.

    And I think it's best this way. Validation consumes resources and time. For most WebServices, all we need with WSDL is to provide to client the definitions to be able to talk to WebService, and not set restrictions like if a property can or not be null.

    When server and client are on same PC, Axis2 add 3-5 milisecs of overhead compared to internal calls. Unecessary validation would only increase overhead. I's better to make operations throw an exception and manually validate what's really needed.

提交回复
热议问题