Hi there, I have a problem with using the schema generator with structure mapping and the "name" attribute.
I am starting from Java Classes and then I generate a binding like this by using the binding-generator. This binding is also edited by myself at some points. So what you see is not the exact output of the generator. <?xml version="1.0" encoding="UTF-8"?> <binding xmlns:tns="http://po.simpleservice/xsd" xmlns:xsd="http://www.w3.org/2001/XMLSchema" force-classes="true" add-constructors="true"> <namespace uri="http://po.simpleservice/xsd" default="elements"/> <mapping class="simpleservice.po.Request" abstract="true" name="Request"> <structure field="customerSearch"/> </mapping> <mapping class="simpleservice.po.Response" abstract="true" name="Response"> <structure field="customer"/> </mapping> <mapping class="simpleservice.po.CustomerPO" name="CustomerPO" abstract="true"> <structure field="name"> <value name="name" field="value"/> </structure> <structure field="address"> <value name="address" field="value"/> </structure> <structure field="friend" name="friend"/> </mapping> <mapping class="simpleservice.po.CustomerSearchPO" name="CustomerSearchPO" abstract="true"> <structure field="customerNumber"> <value name="customerNumber" field="value"/> </structure> </mapping> </binding> When I generate a schema this is the result: <?xml version="1.0" encoding="UTF-8"?> <schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:tns="http://po.simpleservice/xsd" xmlns:xsd="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" targetNamespace="http://po.simpleservice/xsd"> <complexType name="Request"> <sequence> <element name="CustomerSearchPO"> <complexType> <sequence> <element type="tns:CustomerSearchPO" name="CustomerSearchPO"/> </sequence> </complexType> </element> </sequence> </complexType> <complexType name="Response"> <sequence> <element name="CustomerPO"> <complexType> <sequence> <element type="tns:CustomerPO" name="CustomerPO"/> </sequence> </complexType> </element> </sequence> </complexType> <complexType name="CustomerPO"> <sequence> <element name="name" type="xsd:string"/> <element name="address" type="xsd:string"/> <element name="CustomerPO"> <complexType> <sequence> <element type="tns:CustomerPO" name="CustomerPO"/> </sequence> </complexType> </element> </sequence> </complexType> <complexType name="CustomerSearchPO"> <sequence> <element name="customerNumber" type="xsd:int"/> </sequence> </complexType> </schema> The point is, that I thought, when I use the name attribute in a structure for an abstract mapping like I did for the field "friend" in the mapping for CustomerPO class, this name would be the name of the element in the generated schema. But as you can see the name is still the name of the class of the type of the field "friend". In all other elements the name of the field is used. Can anyone tell me if this is a bug or a feature, that I do not understand? In fact it does not matter if I use the name attribute in the structure for "friend" field or not. The schema always looks the same. Thanks a lot for your help! greetings from cold and rainy germany! Casjen ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ jibx-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/jibx-users
