|
Are you using Axis-generated (WSDL2Java) server
side classes? The axis-generated classes do some kind of Schema checking (not
sure if nillable check is done). It does not carry out a complete Schema
validation. You can always write a handler that does Schema validation and plug
it in the request flow. Keep in mind that complete Schema validation is very
performance intensive. - Junaid From: Juan Cervera
[mailto:[EMAIL PROTECTED] Hi all, We are using Axis 1.2.1 as a WebService provider and we have
experienced issues when interfacing with clients that are not implemented with
Axis. The problem is that when a field is marked as non nillable in
the WSDL (nillable="false") Axis will always check this when working
as a client and will prevent the message being sent if there are nil values in
not nillable fields. But when Axis acts as a the server, this check is not
performed and will take anything coming through. Our issue is that we expected
Axis to verify that non nillable fields where actually present and populated,
so we did not make our own checks for not nillable fields. As Axis seems like
not actually doing these checks we end up with Null exceptions if any of these
fields is not sent or is nil. Of course this kind of issues only happen when the client
does not follow the WSDL specification properly and these issues are discovered
during integration tests, but failing in our code with a null exception is a
lot harder to debug than if Axis would just return an error telling that such
field is not nillable, which will make our integration tests a lot easier. I
can see advocates for both solutions, having Axis checking or having the server
code doing it (which allows for customised error responses). The checks I've done for Axis 1.4 and 2.0 indicate that this
seems to be still the case in the latest versions of Axis. I just
wanted to check if this is the expected behaviour, if there is any parameter in
Axis that can be set to turn on this checks at the deserialization level and
what people are doing to deal with this situation, in case that there
is an easier approach than checking manually that the values are not
nil. Thanks, Juan |
- RE: Are there not nillable field checks at deserializati... Bhatra, Junaid
- Re: Are there not nillable field checks at deserial... Anne Thomas Manes
- RE: Are there not nillable field checks at deserial... Juan Cervera
