Return-Path: Delivered-To: apmail-ws-axis-c-user-archive@www.apache.org Received: (qmail 34112 invoked from network); 19 Oct 2004 14:52:37 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 19 Oct 2004 14:52:37 -0000 Received: (qmail 66442 invoked by uid 500); 19 Oct 2004 14:51:25 -0000 Delivered-To: apmail-ws-axis-c-user-archive@ws.apache.org Received: (qmail 66288 invoked by uid 500); 19 Oct 2004 14:51:23 -0000 Mailing-List: contact axis-c-user-help@ws.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: list-post: List-Id: "Apache AXIS C User List" Reply-To: "Apache AXIS C User List" Delivered-To: mailing list axis-c-user@ws.apache.org Received: (qmail 66204 invoked by uid 99); 19 Oct 2004 14:51:22 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=HTML_MESSAGE X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: local policy) Received: from [208.232.182.11] (HELO mail15.ca.com) (208.232.182.11) by apache.org (qpsmtpd/0.28) with ESMTP; Tue, 19 Oct 2004 07:51:19 -0700 Received: from usilms22.ca.com ([141.202.201.22]) by mail15.ca.com with Microsoft SMTPSVC(5.0.2195.6713); Tue, 19 Oct 2004 09:51:16 -0500 X-MimeOLE: Produced By Microsoft Exchange V6.0.6603.0 content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01C4B5EB.1583B010" Subject: RE: Need to let axis check if parameter is null ? Date: Tue, 19 Oct 2004 10:51:15 -0400 Message-ID: <3DAC20ED9FB78B43B765220C31CBD86203A408F7@usilms22.ca.com> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Need to let axis check if parameter is null ? Thread-Index: AcSyIMH+Hlthde1SQfKsUzDUq3hl6wAwrDHgAAAqoTAAAU/icACMqW8AADP5swA= From: "Jairam, Roopnaraine" To: , "Apache AXIS C Developers List" , "Apache AXIS C User List" X-OriginalArrivalTime: 19 Oct 2004 14:51:16.0183 (UTC) FILETIME=[15DAF670:01C4B5EB] X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N This is a multi-part message in MIME format. ------_=_NextPart_001_01C4B5EB.1583B010 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Please help....... =20 _____ =20 From: Jairam, Roopnaraine=20 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 ? =20 Doesn't anyone have some insight? =20 Vince. =20 _____ =20 From: Jairam, Roopnaraine=20 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 ? =20 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. =20 =20 =20 =20 =20 =20 =20 =20 =20 =20 =20 =20 =20 =20 =20 =20 =20 =20 =20 =20 =20 =20 =20 =20 =20 =20 =20 =20 =20 =20 =20 =20 =20 =20 =20 =20 =20 =20 =20 =20 =20 =20 =20 =20 =20 =20 =20 =20 =20 =20 =20 =20 =20 =20 Vince. =20 _____ =20 From: Barlotta, Timothy - Arlington, VA - Contractor [mailto:Timothy.Barlotta@usps.gov]=20 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 ? =20 If you have an object like Integer, String, Long, etc... Axis will set the nillable=3D"true" for you since the Java code can accept a null = value. =20 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. =20 Specify in wsdd like this: =20 /MyModifiedWSDLFile.wsdl .... -----Original Message----- From: Jairam, Roopnaraine [mailto:Roopnaraine.Jairam@ca.com]=20 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. =20 Vince. =20 =09 _____ =20 From: Jairam, Roopnaraine=20 Sent: Thursday, October 14, 2004 2:59 PM To: axis-user@ws.apache.org Subject: Need to let axis check if parameter is null ? =20 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.=20 =20 =20 =20 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=3Dtrue. =20 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.=20 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) =20 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. =20 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. =20 Vince.=20 =20 =20 =20 ------_=_NextPart_001_01C4B5EB.1583B010 Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Message

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=3D"1.0" encoding=3D"UTF-8"?>

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

 <wsdl:types>

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

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

   <complexType name=3D"ClientTableRecord">

    = <sequence>

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

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

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

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

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

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

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

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

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

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

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

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

    = </sequence>

   = </complexType>

   <complexType name=3D"ProductTableRecord">

    = <sequence>

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

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

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

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

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

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

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

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

    = </sequence>

   = </complexType>

   <complexType name=3D"KeyTableRecord">

    = <sequence>

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

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

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

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

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

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

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

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

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

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

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

    = </sequence>

   = </complexType>

  = </schema>

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

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

   <complexType name=3D"RegistrationResults">

    = <sequence>

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

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

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

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

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

    = </sequence>

   = </complexType>

   <complexType name=3D"ArrayOf_tns2_KeyTableRecord">

    <complexContent>

     = <restriction base=3D"soapenc:Array">

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

=

     </restriction>

    </complexContent>

   = </complexType>

   <complexType name=3D"VerificationResults">

    = <sequence>

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

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

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

    = </sequence>

   = </complexType>

  = </schema>

 </wsdl:types>

 

   <wsdl:message name=3D"registerLicenseRequest">

 

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

 

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

 

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

 

   = </wsdl:message>

 

   <wsdl:message name=3D"registerLicenseResponse">

 

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

 

   = </wsdl:message>

 

   <wsdl:message name=3D"verifyLicenseRequest">

 

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

 

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

 

   = </wsdl:message>

 

   <wsdl:message name=3D"verifyLicenseResponse">

 

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

 

   = </wsdl:message>

 

   <wsdl:portType name=3D"LicenseSystem">

 

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

 

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

 

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

 

      </wsdl:operation>

 

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

 

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

 

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

 

      </wsdl:operation>

 

   = </wsdl:portType>

 

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

 

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

 

      <wsdl:operation = name=3D"registerLicense">

 

      =    <wsdlsoap:operation = soapAction=3D""/>

 

      =    <wsdl:input = name=3D"registerLicenseRequest">

 

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

 

      =    </wsdl:input>

 

      =    <wsdl:output = name=3D"registerLicenseResponse">

 

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

 

      =    </wsdl:output>

 

      </wsdl:operation>

 

      <wsdl:operation = name=3D"verifyLicense">

 

      =    <wsdlsoap:operation = soapAction=3D""/>

 

      =    <wsdl:input = name=3D"verifyLicenseRequest">

 

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

 

      =    </wsdl:input>

 

      =    <wsdl:output = name=3D"verifyLicenseResponse">

 

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

 

      =    </wsdl:output>

 

      </wsdl:operation>

 

   = </wsdl:binding>

 

   <wsdl:service name=3D"LicenseSystemService">

 

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

 

      =    <wsdlsoap:address = location=3D"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=3D"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=3D"MyService" provider=3D"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=3D"ClientTableRecord">

    = <sequence>

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

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

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

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

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

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

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

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

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

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

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

     <element name=3D"companyName" nillable=3D"true" type=3D"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=3Dtrue.

 

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,

         =             &= nbsp;     String companyName,

         =             &= nbsp;     String address1,

         =             &= nbsp;     String address2,

         =             &= nbsp;     String city,

         =             &= nbsp;     String state,

         =             &= nbsp;     String zip1,

         =             &= nbsp;     String zip2,

         =             &= nbsp;     String country,

         =             &= nbsp;     String email,

         =             &= nbsp;     String vendorName,

     =             &= nbsp;         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.

 

 

 

------_=_NextPart_001_01C4B5EB.1583B010--