as ajith told -uw works only with the sequece. i.e only for doc/lit wrapped style wsdls.
On 10/26/07, Pantvaidya, Vishwajit <[EMAIL PROTECTED]> wrote: > > Thanks Ajith. By the way - a surprising revelation was that, after > enclosing the choice and inner sequence elements in complextypes, there is > no code now generated for those data elements inside them. could you paste your element here? Amila. - Vish. > > >-----Original Message----- > >From: Ajith Ranabahu [mailto:[EMAIL PROTECTED] > >Sent: Wednesday, October 24, 2007 8:53 PM > >To: [email protected] > >Subject: Re: [Axis2] XmlSchema choice element not supported, other > problems > > > >Hi, > >it is not a matter whether Schema can support it. All the schema > >constructs you mentioned are legal. However the Axis2 codegen supports > >only sequence based unwrapping. What was meant by saying choice is > >supported is the ability to generate code for it in beans - not for > >unwrapping (Actually if you think of unwrapping a choice, it would be > >quite ambiguous. A choice element signifies an alternative and how > >would you select the parameters for it ?). > > If you don't want unwrapping ADB will create a bean for you that has > >all the choice items put at alternatives. i.e you will be given > >setters/getters for all items but only the last item set will take > >effect. > > > > > >Ajith > >On 10/24/07, Pantvaidya, Vishwajit <[EMAIL PROTECTED]> wrote: > >> > >> > >> > >> > >> Success at last! - it worked when I enclosed the choice element and the > >> embedded sequence element within a complexType. > >> > >> But still this is strange because: > >> > >> - as far as I can see, XmlSchema does not require this > >> > >> - the same wsdl used to work in axis1 > >> > >> > >> > >> Attaching the wsdl that works. > >> > >> I have not yet checked if the code generated is backwardly compatible > >with > >> the one generated by axis1. I suspect it may not be. > >> > >> > >> > >> > >> > >> > >> ________________________________ > >> > >> > >> From: Pantvaidya, Vishwajit [mailto:[EMAIL PROTECTED] > >> Sent: Wednesday, October 24, 2007 7:36 PM > >> > >> To: [email protected] > >> Subject: RE: [Axis2] XmlSchema choice element not supported, other > >problems > >> > >> > >> > >> > >> I did a little more try and error and found that it does not seem to > like > >2 > >> things: > >> > >> - the choice element > >> > >> - a sequence element within another sequence element > >> > >> > >> > >> Any of these things if present give that error. Attaching the wsdl with > >the > >> choice and sequence-within-sequence elements commented out from the > >complex > >> type UserType. This wsdl works. Uncomment one/both these cases and it > >fails. > >> > >> > >> > >> Should I file a bug? > >> > >> > >> > >> > >> > >> > >> ________________________________ > >> > >> > >> From: Pantvaidya, Vishwajit [mailto:[EMAIL PROTECTED] > >> Sent: Wednesday, October 24, 2007 5:35 PM > >> To: [email protected] > >> Subject: RE: [Axis2] XmlSchema choice element not supported, other > >problems > >> > >> > >> > >> Thanks Raghu. > >> > >> I am using Axis2 1.3. So according to the wso2 link below - the choice > >> element should not be an issue. But for me it does not work with "-uw" > >> option - it gives the exception I mentioned below. Any ideas why this > is > >> happening? > >> > >> > >> > >> > >> > >> > >> ________________________________ > >> > >> > >> From: Raghu Upadhyayula [mailto:[EMAIL PROTECTED] > >> Sent: Wednesday, October 24, 2007 5:27 PM > >> To: [email protected] > >> Subject: RE: [Axis2] XmlSchema choice element not supported, other > >problems > >> > >> > >> > >> Hi Vish, > >> > >> > >> > >> Both the links shown below are referring to different > >versions > >> of Axis2 > >> > >> > >> > >> > >> http://ws.apache.org/axis2/0_93/adb/adb-howto.html says not > >> supported - From the URL it looks like this link is for version 0.93 of > >> Axis2 > >> > >> http://wso2.org/library/2670 says supported - In the > article, > >it > >> says that it is for version 1.3 of Axis2 > >> > >> > >> > >> So I guess that depends on what version you are using. > >> > >> > >> > >> Thanks > >> > >> Raghu > >> > >> ________________________________ > >> > >> > >> From: Pantvaidya, Vishwajit [mailto:[EMAIL PROTECTED] > >> Sent: Wednesday, October 24, 2007 5:22 PM > >> To: [email protected] > >> Subject: [Axis2] XmlSchema choice element not supported, other > problems > >> > >> > >> > >> I have found the cause of my wsdl2java problems when I use the default > >ADB > >> binding with the options "-o -ss -sd -ssi -f -uw -uri -ns2p" - one of > the > >> complex types defined in my wsdl has an xmlschema choice element. That > >with > >> the "-uw" option gives > >> "org.apache.axis2.wsdl.codegen.CodeGenerationException: > >> Unsupported Schema format for unwrapping! found unknown type but > expected > >> Element at > >> > > > org.apache.axis2.wsdl.codegen.extension.SchemaUnwrapperExtension.processXML > >SchemaSequence(SchemaUnwrapperExtension.java:370)" > >> > >> > >> > >> When I tried to find if choice is supported I got conflicting results: > >> > >> http://ws.apache.org/axis2/0_93/adb/adb-howto.html says not > >> supported > >> > >> http://wso2.org/library/2670 says supported > >> > >> > >> > >> So is xmlschema choice tag supported? > >> > >> > >> > >> > >> > >> - Vish. > >> --------------------------------------------------------------------- > >> To unsubscribe, e-mail: [EMAIL PROTECTED] > >> For additional commands, e-mail: [EMAIL PROTECTED] > >> > >> > > > > > >-- > >Ajith Ranabahu > > > >Reading, after a certain age, diverts the mind too much from its > >creative pursuits. Any man who reads too much and uses his own brain > >too little falls into lazy habits of thinking - Albert Einstein > > > >--------------------------------------------------------------------- > >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] > > -- Amila Suriarachchi, WSO2 Inc.
