Hi all,
Thanks for the earlier help in getting my 0.7 checkout up to date and using
the wsdl features that have been added.
I'm now using the wsdl2java feature (within maven) and CXF (version 2.1) to
build some basic java classes that are based around the wsdl. I have one
question that result from using these tools. (These tools basically take as
input a wsdl file and generate java stubs that you can work with - all in a
nice maven wrapper.)
1. When I attempt to generate sources from the wsdl, I get the following
complaint from maven about the wsdl's corresponding xsd:
"Thrown by JAXB : A class/interface with the same name
"uk.ac.ncl.mygrid._9002.martservicesoap.Dataset" is already in use. Use a
class customization to resolve this conflict."
Having a look at where "Dataset" lives, you can see the following in the
martxsd:
<xs:complexType name="dataset">
<xs:sequence>
<xs:element name="name" type="xs:string"/>
<xs:element name="displayName" type="xs:string"/>
<xs:element name="type" type="xs:string"/>
<xs:element name="visible" type="xs:int"/>
<xs:element name="interface" type="xs:string"/>
</xs:sequence>
</xs:complexType>
[...]
<xs:complexType name="Dataset">
<xs:sequence>
<xs:element minOccurs="1" maxOccurs="1" name="name"
type="xs:string"/>
<xs:element minOccurs="0" maxOccurs="unbounded" name="Filter"
type="tns:Filter"/>
<xs:element minOccurs="1" maxOccurs="unbounded" name="Attribute"
type="tns:Attribute"/>
</xs:sequence>
</xs:complexType>
It seems the identical (except for casing) names causes problems for JAXB,
which is being used by the wsdl2java command to generate the java code: if
we kept both names, we'd end up with two Java classes with the same name.
The same is true for the attribute/Attribute and filter/Filter names in the
xsd. Changing the names of one of these (just to check that the compilation
works afterward) solves the problem). For example, changing one of the
dataset names to X_dataset solves the problem.
Is there anything that can be done about this in a larger biomart context,
or should I find some sort of workaround just for me?
Thanks again!
--
Thanks,
Allyson :)
Allyson Lister
Research Associate
Centre for Integrated Systems Biology for Ageing and Nutrition
Newcastle University
http://www.cisban.ac.uk
School of Computing Science
Newcastle University
Newcastle upon Tyne, NE1 7RU