axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Barlotta, Timothy - Arlington, VA - Contractor" <>
Subject RE: Need to let axis check if parameter is null ?
Date Fri, 15 Oct 2004 18:16:55 GMT
If you have an object like Integer, String, Long, etc... Axis will set
the nillable="true" for you since the Java code can accept a null value.
You should let Axis generate the WSDL.  Save it off.  Then modify it to
your needs.  Then in the .wsdd file specify that you want to use a
static wsdl file (put it in WEB-INF/classes so Axis can see it).  Use
the modified wsdl.
Specify in wsdd like this:
 <service name="MyService" provider="java:RPC">

	-----Original Message-----
	From: Jairam, Roopnaraine [] 
	Sent: Friday, October 15, 2004 2:13 PM
	Subject: RE: Need to let axis check if parameter is null ?

	Has anyone done something like this and can give me some





	From: Jairam, Roopnaraine 
	Sent: Thursday, October 14, 2004 2:59 PM
	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


   <complexType name="ClientTableRecord">


     <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"/>





	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


	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.






View raw message