If that doesn't work, there are two other possibilities. Use a custom serializer for the type. If there are invalid properties, throw a runtime exception in the serialize() method. Or write a handler that you configure into the request chain on the client. The handler would have to examine the SOAP body, to determine if any elements are empty, and throw an exception if any are invalid. I've never tried to do anything like this, but either should work.

Tony

"Jairam, Roopnaraine" <[EMAIL PROTECTED]> wrote on 14/12/2004 15:27:29:

> So after I use Java2WSDL to generate the wsdl, I can just manually
> edit the wsdl and change the property to nillable=âfalseâ and then
> run wsdl2java to generate the java stub code and this will require
> that the element be sent assuming it is fixed in axis.

>  
>  
>
> From: Sheptunov, Bogdan [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, December 14, 2004 10:12 AM
> To: [EMAIL PROTECTED]
> Subject: RE: data validation

>  
> It is supposed to be implemented via nillable="false" in WSDL, but I
> don't think it is working right in 1.2RC1.

> -----Original Message-----
> From: Jairam, Roopnaraine [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, December 14, 2004 9:05 AM
> To: [EMAIL PROTECTED]
> Subject: RE: data validation

> Does anyone know how to do this???
>  
>
> From: Jairam, Roopnaraine
> Sent: Thursday, December 09, 2004 10:30 AM
> To: [EMAIL PROTECTED]
> Subject: data validation

>  
> Hi:
>  
> Is there a way for axis to validate data before it is sent to the
> web service. Basically the data the client sends should not be null.
> When it comes to my web service all the required parameters should
> not be null. E.g. if the client is supposed to send a struct that
> identifies a client e.g. first name, last name, address1, address2,
> city,state,zip1,zip2. All the members of the struct canât be null
> except for address2 & zip2. Is there a way to do this?

>  
> Thanks in advance.
>  
> Vince.

Reply via email to