Dennis, thank you for your reply, so will just be anticipating your next release :)
Pavel -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Dennis Sosnoski Sent: Wednesday, August 29, 2007 8:00 AM To: JiBX users Subject: Re: [jibx-users] jibx2wsdl: wrong schema generated Hi Pavel, I haven't forgotten about this, and will try to get a fix in for the next update (hopefully next week, if I can clean up some of the JiBX bug reports in the meantime). For the sake of others on the list, I'll mention that your issue is an unfortunate side effect of using substitution groups (the currently-implemented approach for JiBX/Jibx2Wsdl). Substitution groups implement polymorphism by changing the element name to match the actual instance type. Unfortunately, this means that if you have multiple instances of the base type in a definition, and they're optional, there's no way to distinguish between the different alternatives - and that in turn means the schema is not valid. I'm planning to implement a way of adding a wrapper element around values in the customizations, which should give you a work-around for this issue. Hmm. Perhaps I should also extend the nillable support in the customizations to work with regular data classes, rather than just for service method parameters in the WSDL portion - but I'd need to look up if this would even work. If the base element is abstract, can you use it with xsi:nil='true'? Let me slaughter a goat and read the entrails - I mean, consult my schema references... nope, as far as I can see you can never use an instance of an abstract element, even with xsi:nil='true'. So if there was a substitution group with an abstract head element, we'd need to use an instance of one of the non-abstract elements in the group with xsi:nil='true'. That's too ugly for me to take, even when I'm thinking in terms of schema. The other alternative is to implement type substitution in JiBX as an alternative to substitution groups. I'd like to do this, at least on a limited level (for complexTypes only), and perhaps I'll work it into the 1.2 release now that I'm finally wrapping up the 1.1.x series. - Dennis Dennis M. Sosnoski SOA and Web Services in Java Training and Consulting http://www.sosnoski.com - http://www.sosnoski.co.nz Seattle, WA +1-425-939-0576 - Wellington, NZ +64-4-298-6117 Pavel Sharov wrote: > Dennis, > > Thank you for updating jibx2wsdl 4, however my problem persists with the > updated version... Could you please give me any hint on how I could get > it fixed? > Thank you in advance, > > Pavel > > -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of Pavel > Sharov > Sent: Tuesday, July 31, 2007 2:40 PM > To: JiBX users > Subject: Re: [jibx-users] jibx2wsdl: wrong schema generated > > Hi Dennis, > > I am experiencing one more issue of the same kind. This time this is not > for several collection properties in a complex type, but just for > several properties of equal complex type. I will consider the same > example4 where we added two IStar[] properties to make the problem > manifest. > Now I am adding also > > public IStar getBestMaleStar(); > public void setBestMaleStar(IStar bestStar); > > public IStar getBestFemaleStar(); > public void setBestFemaleStar(IStar bestStar); > > And here is the snippet I am getting in the generated schema for the > IDvd type: > > <xsd:element ref="tns:IStar" minOccurs="0"/> > <xsd:element ref="tns:IStar" minOccurs="0"/> > > while I am expecting something like > > <xsd:element name="bestMaleStar" type="tns:IStar" > minOccurs="0"/> > <xsd:element name="bestFemaleStar" type="tns:IStar" > minOccurs="0"/> > > And there is a like problem in the generated binding. > Is there any option I can use to have this case fixed like it was with > wrapping collections? > Thank you! > > Pavel > > -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of Pavel > Sharov > Sent: Thursday, July 26, 2007 8:28 PM > To: JiBX users > Subject: Re: [jibx-users] jibx2wsdl: wrong schema generated > > There follows the solution of the problem for anyone interested. > The problem manifested when using more than one array properties of the > same type. It was due to a change made to the default handling of > collections, which previously used a wrapper element around the > collection but now does not. You should be able to change the default > handling by passing --wrap-collections=true on the command line. > > -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of Dennis > Sosnoski > Sent: Tuesday, July 24, 2007 2:39 PM > To: JiBX users > Subject: Re: [jibx-users] jibx2wsdl: wrong schema generated > > Hi Pavel, > > I tried duplicating your problem, using an IStar interface (with name > and index number) and changing the Dvd class and the hd.IDvd interface > in example4 to use an IStar[]. This seems essentially the same as what > you describe (an interface with methods accepting/returning an array of > instances of another interface), but I wasn't able to recreate the > problem. > > Can you try modifying one of the examples to demonstrate the problem, > and send me that? > > Thanks, > > - Dennis > > Dennis M. Sosnoski > SOA and Web Services in Java > Training and Consulting > http://www.sosnoski.com - http://www.sosnoski.co.nz > Seattle, WA +1-425-939-0576 - Wellington, NZ +64-4-298-6117 > > > > Pavel Sharov wrote: > >> Dennis, >> >> I can now see that it always happens with arrays of complex types. >> > Maybe > >> it can help you before I have to send you the whole project, I still >> hope there's no need to. >> For example: >> >> // my service >> public interface IRemoteRepoService >> { >> IProjectDTO getProject(String projectName); >> } >> >> // DTO >> public interface IProjectDTO >> { >> IProjectDTOComponent[] getCntDescriptions(); >> >> void setCntDescriptions(IProjectDTOComponent[] comps); >> } >> >> // DTO component >> public interface IProjectDTOComponent >> { >> String getRawContent(); >> void setRawContent(String content); >> } >> >> // schema generated with the previous version of jibx2wsdl >> <xsd:complexType name="IProjectDTOComponent"> >> <xsd:sequence> >> <xsd:element type="xsd:string" name="rawContent" minOccurs="0"/> >> </xsd:sequence> >> </xsd:complexType> >> <xsd:complexType name="IProjectDTO"> >> <xsd:element name="cntDescriptions" minOccurs="0"> >> <xsd:complexType> >> <xsd:sequence> >> <xsd:element type="tns:IProjectDTOComponent" >> name="cntDescription" minOccurs="0" maxOccurs="unbounded"/> >> </xsd:sequence> >> </xsd:complexType> >> </xsd:element> >> </xsd:complexType> >> >> // schema generated with the current version of jibx2wsdl >> <xsd:complexType name="IProjectDTOComponent"> >> <xsd:sequence> >> <xsd:element type="xsd:string" name="rawContent" minOccurs="0"/> >> </xsd:sequence> >> </xsd:complexType> >> <xsd:element ref="tns:IProjectDTOComponent" minOccurs="0" >> maxOccurs="unbounded"/> >> >> Pavel >> >> -----Original Message----- >> From: [EMAIL PROTECTED] >> [mailto:[EMAIL PROTECTED] On Behalf Of Dennis >> Sosnoski >> Sent: Tuesday, July 24, 2007 1:19 AM >> To: JiBX users >> Subject: Re: [jibx-users] jibx2wsdl: wrong schema generated >> >> Hi Pavel, >> >> Sure looks like a bug to me. :-) Can you send me (directly) your >> project, so I can investigate both this and the other issue for >> > myself? > >> Thanks, >> >> - Dennis >> >> Dennis M. Sosnoski >> SOA and Web Services in Java >> Training and Consulting >> http://www.sosnoski.com - http://www.sosnoski.co.nz >> Seattle, WA +1-425-939-0576 - Wellington, NZ +64-4-298-6117 >> >> >> >> Pavel Sharov wrote: >> >> >>> Dennis, >>> >>> Using the updated version of the Jibx2Wsdl I am having a problem with >>> the schema generated along with the WSDL file for my service. The >>> >>> >> schema >> >> >>> is imported by the generated WSDL and contains description of my DTO >>> complex object. Now the complex type definition contains sequence of >>> equal incomplete elements (fragment follows): >>> >>> <xsd:complexType name="IProjectDTO"> >>> <xsd:sequence> >>> <xsd:element ref="tns:IProjectDTOComponent" minOccurs="0"/> >>> <xsd:element ref="tns:IProjectDTOComponent" minOccurs="0"/> >>> <xsd:element ref="tns:IProjectDTOComponent" minOccurs="0"/> >>> <xsd:element ref="tns:IProjectDTOComponent" minOccurs="0"/> >>> <xsd:element ref="tns:IProjectDTOComponent" minOccurs="0" >>> maxOccurs="unbounded"/> >>> <xsd:element ref="tns:IProjectDTOComponent" minOccurs="0" >>> maxOccurs="unbounded"/> >>> <xsd:element ref="tns:IProjectDTOComponent" minOccurs="0" >>> maxOccurs="unbounded"/> >>> <xsd:element ref="tns:IProjectDTOComponent" minOccurs="0" >>> maxOccurs="unbounded"/> >>> <xsd:element ref="tns:IProjectDTOComponent" minOccurs="0" >>> maxOccurs="unbounded"/> >>> <xsd:element ref="tns:IProjectDTOComponent" minOccurs="0" >>> maxOccurs="unbounded"/> >>> <xsd:element ref="tns:IProjectDTOComponent" minOccurs="0" >>> maxOccurs="unbounded"/> >>> <xsd:element ref="tns:IProjectDTOComponent" minOccurs="0" >>> maxOccurs="unbounded"/> >>> <xsd:element ref="tns:IProjectDTOComponent" minOccurs="0" >>> maxOccurs="unbounded"/> >>> <xsd:element ref="tns:IProjectDTOComponent" minOccurs="0" >>> maxOccurs="unbounded"/> >>> </xsd:sequence> >>> </xsd:complexType> >>> >>> With the previous version of the framework I had for the same complex >>> type the following: >>> >>> <xsd:complexType name="IProjectDTO"> >>> <xsd:sequence> >>> <xsd:element type="tns:IProjectDTOComponent" name="routeTable" >>> minOccurs="0"/> >>> <xsd:element name="mapDescriptions" minOccurs="0"> >>> <xsd:complexType> >>> <xsd:sequence> >>> <xsd:element type="tns:IProjectDTOComponent" >>> name="mapDescription" minOccurs="0" maxOccurs="unbounded"/> >>> </xsd:sequence> >>> </xsd:complexType> >>> </xsd:element> >>> <xsd:element name="xltProcDescriptions" minOccurs="0"> >>> <xsd:complexType> >>> <xsd:sequence> >>> <xsd:element type="tns:IProjectDTOComponent" >>> name="xltProcDescription" minOccurs="0" maxOccurs="unbounded"/> >>> </xsd:sequence> >>> </xsd:complexType> >>> </xsd:element> >>> <xsd:element type="tns:IProjectDTOComponent" >>> >>> >> name="serverOptions" >> >> >>> minOccurs="0"/> >>> <xsd:element name="XMLSchemas" minOccurs="0"> >>> <xsd:complexType> >>> <xsd:sequence> >>> <xsd:element type="tns:IProjectDTOComponent" >>> name="XMLSchema" minOccurs="0" maxOccurs="unbounded"/> >>> </xsd:sequence> >>> </xsd:complexType> >>> </xsd:element> >>> <xsd:element name="testMessageDescriptions" minOccurs="0"> >>> <xsd:complexType> >>> <xsd:sequence> >>> <xsd:element type="tns:IProjectDTOComponent" >>> name="testMessageDescription" minOccurs="0" maxOccurs="unbounded"/> >>> </xsd:sequence> >>> </xsd:complexType> >>> </xsd:element> >>> <xsd:element name="xltDescriptions" minOccurs="0"> >>> <xsd:complexType> >>> <xsd:sequence> >>> <xsd:element type="tns:IProjectDTOComponent" >>> name="xltDescription" minOccurs="0" maxOccurs="unbounded"/> >>> </xsd:sequence> >>> </xsd:complexType> >>> </xsd:element> >>> <xsd:element name="BXltDescriptions" minOccurs="0"> >>> <xsd:complexType> >>> <xsd:sequence> >>> <xsd:element type="tns:IProjectDTOComponent" >>> name="BXltDescription" minOccurs="0" maxOccurs="unbounded"/> >>> </xsd:sequence> >>> </xsd:complexType> >>> </xsd:element> >>> <xsd:element name="HL7Segments" minOccurs="0"> >>> <xsd:complexType> >>> <xsd:sequence> >>> <xsd:element type="tns:IProjectDTOComponent" >>> name="HL7Segment" minOccurs="0" maxOccurs="unbounded"/> >>> </xsd:sequence> >>> </xsd:complexType> >>> </xsd:element> >>> <xsd:element type="tns:IProjectDTOComponent" name="logActions" >>> minOccurs="0"/> >>> <xsd:element name="XMLStyleSheets" minOccurs="0"> >>> <xsd:complexType> >>> <xsd:sequence> >>> <xsd:element type="tns:IProjectDTOComponent" >>> name="XMLStyleSheet" minOccurs="0" maxOccurs="unbounded"/> >>> </xsd:sequence> >>> </xsd:complexType> >>> </xsd:element> >>> <xsd:element name="cntDescriptions" minOccurs="0"> >>> <xsd:complexType> >>> <xsd:sequence> >>> <xsd:element type="tns:IProjectDTOComponent" >>> name="cntDescription" minOccurs="0" maxOccurs="unbounded"/> >>> </xsd:sequence> >>> </xsd:complexType> >>> </xsd:element> >>> <xsd:element name="messageDescriptions" minOccurs="0"> >>> <xsd:complexType> >>> <xsd:sequence> >>> <xsd:element type="tns:IProjectDTOComponent" >>> name="messageDescription" minOccurs="0" maxOccurs="unbounded"/> >>> </xsd:sequence> >>> </xsd:complexType> >>> </xsd:element> >>> <xsd:element type="tns:IProjectDTOComponent" >>> >>> >> name="syntaxVersion" >> >> >>> minOccurs="0"/> >>> </xsd:sequence> >>> </xsd:complexType> >>> >>> Is that a bug? If needed, I could provide more info and data. >>> Thank you! >>> >>> Pavel >>> >>> >>> >>> > ------------------------------------------------------------------------ > >> - >> >> >>> This SF.net email is sponsored by: Splunk Inc. >>> Still grepping through log files to find problems? Stop. >>> Now Search log events and configuration files using AJAX and a >>> >>> >> browser. >> >> >>> Download your FREE copy of Splunk now >> http://get.splunk.com/ >>> _______________________________________________ >>> jibx-users mailing list >>> jibx-users@lists.sourceforge.net >>> https://lists.sourceforge.net/lists/listinfo/jibx-users >>> >>> >>> >>> >> > ------------------------------------------------------------------------ > >> - >> This SF.net email is sponsored by: Splunk Inc. >> Still grepping through log files to find problems? Stop. >> Now Search log events and configuration files using AJAX and a >> > browser. > >> Download your FREE copy of Splunk now >> http://get.splunk.com/ >> _______________________________________________ >> jibx-users mailing list >> jibx-users@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/jibx-users >> >> >> > ------------------------------------------------------------------------ > - > >> This SF.net email is sponsored by: Splunk Inc. >> Still grepping through log files to find problems? Stop. >> Now Search log events and configuration files using AJAX and a >> > browser. > >> Download your FREE copy of Splunk now >> http://get.splunk.com/ >> _______________________________________________ >> jibx-users mailing list >> jibx-users@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/jibx-users >> >> >> > > ------------------------------------------------------------------------ > - > This SF.net email is sponsored by: Splunk Inc. > Still grepping through log files to find problems? Stop. > Now Search log events and configuration files using AJAX and a browser. > Download your FREE copy of Splunk now >> http://get.splunk.com/ > _______________________________________________ > jibx-users mailing list > jibx-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/jibx-users > > ------------------------------------------------------------------------ > - > This SF.net email is sponsored by: Splunk Inc. > Still grepping through log files to find problems? Stop. > Now Search log events and configuration files using AJAX and a browser. > Download your FREE copy of Splunk now >> http://get.splunk.com/ > _______________________________________________ > jibx-users mailing list > jibx-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/jibx-users > > ------------------------------------------------------------------------ > - > This SF.net email is sponsored by: Splunk Inc. > Still grepping through log files to find problems? Stop. > Now Search log events and configuration files using AJAX and a browser. > Download your FREE copy of Splunk now >> http://get.splunk.com/ > _______________________________________________ > jibx-users mailing list > jibx-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/jibx-users > > ------------------------------------------------------------------------ - > This SF.net email is sponsored by: Splunk Inc. > Still grepping through log files to find problems? Stop. > Now Search log events and configuration files using AJAX and a browser. > Download your FREE copy of Splunk now >> http://get.splunk.com/ > _______________________________________________ > jibx-users mailing list > jibx-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/jibx-users > > ------------------------------------------------------------------------ - This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ _______________________________________________ jibx-users mailing list jibx-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jibx-users ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ _______________________________________________ jibx-users mailing list jibx-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jibx-users