【发布时间】:2018-09-13 14:49:24
【问题描述】:
我正在尝试使用(@XmlElement(required=true) 强制我的@webparam,但生成的XSD 仍将其显示为minOccurs="0"。也试过设置nillable=false,但还是不行。
这是我的网络方法:
@WebMethod
@WebResult(name = "Biller")
public Biller getBiller(@XmlElement(required=true) @WebParam(name = "billerId") Integer billerId){}
请提出建议。
【问题讨论】:
-
尝试了所有这些步骤,仍然面临同样的问题。
-
你的 cxf 版本是多少?
-
它的 2.6.1。还在我的 Web 服务类中添加了 @EndpointProperties(value = { @EndpointProperty(key = "schema-validation-enabled", value = "true") })
-
尝试添加@SchemaValidation(enabled=true),仍然没有成功。
标签: java web-services cxf jax-ws