Java bean to wsdl - how to make fields empty?

I am using the JAX-WS api to generate wsdl. The Java bean class looks something like this:

public class MyBean {
    private String nullableField;
    private String notNullableField;

    // and here appropriate get/set/ters
}

When wsdl is generated, nullability of this field is not specified.

Question: what (and where) is it necessary to indicate that the fields have the corresponding nillable = '' value in wsdl? That is, how can I indicate the validity of fields in plain java code for wsdl?

At this time, I generate wsdl and fix the xml manually to reset the fields. It is not comfortable. I want this attribute to nillablebe generated using java-ws automatically.

Any suggestions?

Thanks.

+3
source share
1 answer

AFAIK, nillable=false @WebParam, .. , Java ( ). , WSDL-first, .

+2

Source: https://habr.com/ru/post/1725277/


All Articles