Hi Keith,
 
I tried your suggestion of updating the wsdl and including it in the
aar. (Also set the "useOriginalWSDL" parameter to true). However when I
make a web service call which returns the Field object, I get this
exception:
 
reason:org.apache.axis2.databinding.ADBException: Unexpected subelement

If I do not include the updated wsdl, then everything works properly. 

Any suggestions on what could be wrong? 

Thanks,

Jai


________________________________

From: keith chapman [mailto:[EMAIL PROTECTED] 
Sent: Monday, September 01, 2008 9:25 PM
To: [email protected]
Subject: Re: Strong types in Axis2 wsdl 

Hi,

You cannot get this into a auto generated WSDL.  The workaround for you
will be to save the auto generated WSDL, edit it to your needs and pack
it into the aar file and deploy the service in Axis2. You will need to
use restictions on your dataType in order to achieve this. Here is an
example of a WSDL that has restrictions
<http://mooshup.com/services/system/digit2image?wsdl2>   [1]

Thanks,
Keith.

[1] http://mooshup.com/services/system/digit2image?wsdl2



On Tue, Sep 2, 2008 at 9:42 AM, Pugalia, Jai P (JP) <[EMAIL PROTECTED]>
wrote:


        Hi Keith,
        
        I have written the Java class and then generating the WSDL from
that.
        
        The WSDL generates this:
        
                   <xs:complexType name="Field">
                       <xs:sequence>
        
                                 <xs:element minOccurs="0"
name="objectType"
        nillable="true" type="xs:string"/>
        
                               <xs:element minOccurs="0" name="dataType"
        
        nillable="true" type="xs:string"/>
        
                           <xs:element minOccurs="0" name="name"
        
        nillable="true" type="xs:string"/>
        
                           <xs:element minOccurs="0" name="value"
        
        nillable="true" type="xs:string"/>
        
                       </xs:sequence>
                   </xs:complexType>
        
        I want to restrict the values of objectType to actual string
values like
        "Array", "Structure" & "Table".
        
        Thanks,
        Jai
        

        -----Original Message-----
        From: keith chapman [mailto:[EMAIL PROTECTED]
        Sent: Monday, September 01, 2008 9:41 AM
        To: [email protected]
        
        Subject: Re: Strong types in Axis2 wsdl
        
        Hi Jai,
        
        Could you elaborate on what you mean by "Array" and "Structure"?
Do you
        mean the string values "Array" and "Structure"? or the actual
structure
        of an Array and Structure?
        
        Thanks,
        Keith.
        
        On Thu, Aug 28, 2008 at 6:31 PM, Pugalia, Jai P (JP)
        <[EMAIL PROTECTED]> wrote:
        > Hi,
        >
        > I have an Axis2 wsdl which exposes an ObjectType as
        >
        > <xs:element minOccurs="0" name="objectType" nillable="true"
        > type="xs:string"/>
        >
        > I want to restrict the valid values to say "Array" and
"Structure". If
        
        > I change the element to be an enumeration, it does not work as
looks
        > like
        > Axis2 does not support enumerations yet. Is there any other
way I can
        > make this strongly typed in the wsdl.
        >
        > Thanks,
        > Jai
        
        
        
        --
        Keith Chapman
        Senior Software Engineer
        WSO2 Inc.
        Oxygenating the Web Service Platform.
        http://wso2.org/
        
        blog: http://www.keith-chapman.org
        
        
        
---------------------------------------------------------------------
        To unsubscribe, e-mail: [EMAIL PROTECTED]
        For additional commands, e-mail: [EMAIL PROTECTED]
        
        
        
---------------------------------------------------------------------
        To unsubscribe, e-mail: [EMAIL PROTECTED]
        For additional commands, e-mail: [EMAIL PROTECTED]
        
        




-- 
Keith Chapman
Senior Software Engineer
WSO2 Inc.
Oxygenating the Web Service Platform.
http://wso2.org/

blog: http://www.keith-chapman.org

Reply via email to