Has anyone done something like this and can give me some pointers.

 

Vince.

 


From: Jairam, Roopnaraine
Sent: Thursday, October 14, 2004 2:59 PM
To: [EMAIL PROTECTED]
Subject: Need to let axis check if parameter is null ?

 

Is it possible to make axis check if a parameter is null. I don’t want the webservice to be called with null values. I have the service receiving complex types and I want all the elements to be mandatory.

 

   <complexType name="ClientTableRecord">

    <sequence>

     <element name="state" nillable="true" type="xsd:string"/>

     <element name="address2" nillable="true" type="xsd:string"/>

     <element name="address1" nillable="true" type="xsd:string"/>

     <element name="country" nillable="true" type="xsd:string"/>

     <element name="vendorName" nillable="true" type="xsd:string"/>

     <element name="vendorCode" nillable="true" type="xsd:string"/>

     <element name="city" nillable="true" type="xsd:string"/>

     <element name="clientID" nillable="true" type="xsd:string"/>

     <element name="email" nillable="true" type="xsd:string"/>

     <element name="zip2" nillable="true" type="xsd:string"/>

     <element name="zip1" nillable="true" type="xsd:string"/>

     <element name="companyName" nillable="true" type="xsd:string"/>

    </sequence>

   </complexType>

 

 

I know that the nillable property should be set to true but that is what the wsdl2java tool generated. I changed the nillable property by hand and set to false but when I deploy the service the wsdl is still nillable=true.

 

I not sure but does it have anything to do with the ClientTableRecord object. My constructor for that class original had all the members eg.

public ClientTableRecord(String clientID,

                           String companyName,

                           String address1,

                           String address2,

                           String city,

                           String state,

                           String zip1,

                           String zip2,

                           String country,

                           String email,

                           String vendorName,

                           String vendorCode)

 

But then the java2wsdl tool complained that - The class ca.objects.ClientTableRecord does not contain a default constructor, which is a requirement for a bean class.  The class cannot be converted into an xml schema type.  An xml schema anyType will be used to define this class in the wsdl file. So I inserted the default constructor for the class and ran the java2wsdl without any errors.

 

Does anyone have any suggestions or insights for this problem, basically I don’t want the service checking for the necessary elements it should already be taken care of.

 

Vince.

 

 

 

Reply via email to