views:

418

answers:

1

I'm using JAX-WS api for wsdl generation. Java-bean class is something like:

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

    // and here appropriate get/set/ters
}

When wsdl is generated then nullability of this fields is not specified.

Question: what (and where) necessary to specify that fields have corresponding nillable='' value in wsdl? I.e. how can I specify fields nullability in plain java code for wsdl?

At this time I'm generating wsdl and then correcting xml manually for fields nullability. That's not convenient. I want this nillable attribute'll be generated by java-ws automatically.

Any suggestions?

Thanks.

+2  A: 

AFAIK, it is still not possible to generate nillable=false when using @WebParam i.e. when using a Java-first approach (as discussed in this thread). Actually, I'd recommend to use a WSDL-first approach if you want fine control.

Pascal Thivent
Ok. I've hot yet used wsdl-first approach. But I'll try. Thank you!
foobar