axis-c-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jairam, Roopnaraine" <Roopnaraine.Jai...@ca.com>
Subject RE: Need to let axis check if parameter is null ?
Date Tue, 19 Oct 2004 14:51:15 GMT
Please help.......

 

  _____  

From: Jairam, Roopnaraine 
Sent: Monday, October 18, 2004 10:03 AM
To: axis-user@ws.apache.org
Subject: RE: Need to let axis check if parameter is null ?

 

Doesn't anyone have some insight?

 

Vince.

 

  _____  

From: Jairam, Roopnaraine 
Sent: Friday, October 15, 2004 2:58 PM
To: axis-user@ws.apache.org
Subject: RE: Need to let axis check if parameter is null ?

 

Thanks Timothy that made the service point to the right wsdl file now
but I'm still able to pass null objects to the service I'm I specifying
the wrong values in my wsdl or is there something else that needs to be
done? Could you take a look the help is greatly appreciated.

 

<?xml version="1.0" encoding="UTF-8"?>

<wsdl:definitions targetNamespace="urn:ca"
xmlns="http://schemas.xmlsoap.org/wsdl/"
xmlns:apachesoap="http://xml.apache.org/xml-soap" xmlns:impl="urn:ca"
xmlns:intf="urn:ca"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:tns2="http://objects.ca"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">

 <wsdl:types>

  <schema targetNamespace="http://objects.ca"
xmlns="http://www.w3.org/2001/XMLSchema">

   <import namespace="http://schemas.xmlsoap.org/soap/encoding/"/>

   <complexType name="ClientTableRecord">

    <sequence>

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

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

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

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

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

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

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

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

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

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

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

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

    </sequence>

   </complexType>

   <complexType name="ProductTableRecord">

    <sequence>

     <element name="productBuild" nillable="false" type="xsd:int"/>

     <element name="nodeCount" nillable="false" type="xsd:int"/>

     <element name="os" nillable="false" type="xsd:string"/>

     <element name="language" nillable="false" type="xsd:string"/>

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

     <element name="productVersion" nillable="false" type="xsd:int"/>

     <element name="productName" nillable="false" type="xsd:string"/>

     <element name="productCode" nillable="false" type="xsd:string"/>

    </sequence>

   </complexType>

   <complexType name="KeyTableRecord">

    <sequence>

     <element name="nodes" nillable="false" type="xsd:int"/>

     <element name="startDate" nillable="false" type="xsd:dateTime"/>

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

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

     <element name="regDate" nillable="false" type="xsd:dateTime"/>

     <element name="componentCode" nillable="false" type="xsd:string"/>

     <element name="oemKey" nillable="false" type="xsd:string"/>

     <element name="expired" nillable="false" type="xsd:boolean"/>

     <element name="key" nillable="false" type="xsd:string"/>

     <element name="days" nillable="false" type="xsd:int"/>

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

    </sequence>

   </complexType>

  </schema>

  <schema targetNamespace="urn:ca"
xmlns="http://www.w3.org/2001/XMLSchema">

   <import namespace="http://schemas.xmlsoap.org/soap/encoding/"/>

   <complexType name="RegistrationResults">

    <sequence>

     <element name="status" nillable="false" type="xsd:int"/>

     <element name="timeStamp" nillable="false" type="xsd:int"/>

     <element name="key" nillable="false" type="xsd:string"/>

     <element name="days" nillable="false" type="xsd:int"/>

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

    </sequence>

   </complexType>

   <complexType name="ArrayOf_tns2_KeyTableRecord">

    <complexContent>

     <restriction base="soapenc:Array">

      <attribute ref="soapenc:arrayType"
wsdl:arrayType="tns2:KeyTableRecord[]"/>

     </restriction>

    </complexContent>

   </complexType>

   <complexType name="VerificationResults">

    <sequence>

     <element name="status" nillable="false" type="xsd:int"/>

     <element name="violationCode" nillable="false" type="xsd:int"/>

     <element name="days" nillable="false" type="xsd:int"/>

    </sequence>

   </complexType>

  </schema>

 </wsdl:types>

 

   <wsdl:message name="registerLicenseRequest">

 

      <wsdl:part name="in0" type="tns2:ClientTableRecord"/>

 

      <wsdl:part name="in1" type="tns2:ProductTableRecord"/>

 

      <wsdl:part name="in2" type="tns2:KeyTableRecord"/>

 

   </wsdl:message>

 

   <wsdl:message name="registerLicenseResponse">

 

      <wsdl:part name="registerLicenseReturn"
type="impl:RegistrationResults"/>

 

   </wsdl:message>

 

   <wsdl:message name="verifyLicenseRequest">

 

      <wsdl:part name="in0" type="xsd:string"/>

 

      <wsdl:part name="in1" type="impl:ArrayOf_tns2_KeyTableRecord"/>

 

   </wsdl:message>

 

   <wsdl:message name="verifyLicenseResponse">

 

      <wsdl:part name="verifyLicenseReturn"
type="impl:VerificationResults"/>

 

   </wsdl:message>

 

   <wsdl:portType name="LicenseSystem">

 

      <wsdl:operation name="registerLicense" parameterOrder="in0 in1
in2">

 

         <wsdl:input message="impl:registerLicenseRequest"
name="registerLicenseRequest"/>

 

         <wsdl:output message="impl:registerLicenseResponse"
name="registerLicenseResponse"/>

 

      </wsdl:operation>

 

      <wsdl:operation name="verifyLicense" parameterOrder="in0 in1">

 

         <wsdl:input message="impl:verifyLicenseRequest"
name="verifyLicenseRequest"/>

 

         <wsdl:output message="impl:verifyLicenseResponse"
name="verifyLicenseResponse"/>

 

      </wsdl:operation>

 

   </wsdl:portType>

 

   <wsdl:binding name="LicenseSystemSoapBinding"
type="impl:LicenseSystem">

 

      <wsdlsoap:binding style="rpc"
transport="http://schemas.xmlsoap.org/soap/http"/>

 

      <wsdl:operation name="registerLicense">

 

         <wsdlsoap:operation soapAction=""/>

 

         <wsdl:input name="registerLicenseRequest">

 

            <wsdlsoap:body
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="urn:ca" use="encoded"/>

 

         </wsdl:input>

 

         <wsdl:output name="registerLicenseResponse">

 

            <wsdlsoap:body
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="urn:ca" use="encoded"/>

 

         </wsdl:output>

 

      </wsdl:operation>

 

      <wsdl:operation name="verifyLicense">

 

         <wsdlsoap:operation soapAction=""/>

 

         <wsdl:input name="verifyLicenseRequest">

 

            <wsdlsoap:body
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="urn:ca" use="encoded"/>

 

         </wsdl:input>

 

         <wsdl:output name="verifyLicenseResponse">

 

            <wsdlsoap:body
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="urn:ca" use="encoded"/>

 

         </wsdl:output>

 

      </wsdl:operation>

 

   </wsdl:binding>

 

   <wsdl:service name="LicenseSystemService">

 

      <wsdl:port binding="impl:LicenseSystemSoapBinding"
name="LicenseSystem">

 

         <wsdlsoap:address
location="http://fries/axis/services/LicenseSystem"/>

 

      </wsdl:port>

 

   </wsdl:service>

 

</wsdl:definitions>

 

Vince.

 

  _____  

From: Barlotta, Timothy - Arlington, VA - Contractor
[mailto:Timothy.Barlotta@usps.gov] 
Sent: Friday, October 15, 2004 2:17 PM
To: axis-user@ws.apache.org
Subject: RE: Need to let axis check if parameter is null ?

 

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">
  <wsdlFile>/MyModifiedWSDLFile.wsdl</wsdlFile>

....

</service>

	-----Original Message-----
	From: Jairam, Roopnaraine [mailto:Roopnaraine.Jairam@ca.com] 
	Sent: Friday, October 15, 2004 2:13 PM
	To: axis-user@ws.apache.org
	Subject: RE: Need to let axis check if parameter is null ?

	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: axis-user@ws.apache.org
	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. 

	 

	 

	 


Mime
View raw message