Hi,
Sorry if this is the wrong place to ask this, but I have a question
about JAXB class name customization.
My problem is quite simple, in one of the schema imported by the WSDL
I've been given two local element definitions have the same name, like
this :
<xs:complexType name="ResponseStruct">
<xs:sequence>
<xs:element name="Activities">
<!-- Content here -->
</xs:element>
</xs:sequence>
</xs:complexType>
<xs:complexType name="RequestStruct">
<xs:sequence>
<xs:element name="Activities">
<!-- Different content here -->
</xs:element>
</xs:sequence>
</xs:complexType>
Since I've specified "toplevel" as localScoping value in my binding
file, JAXB tries to create two classes with the same name and naturally
fails at it.
That's not really a big deal since I can specify a <jaxb:class/> for
each one of them.
So I've written my XPath expression and tested it. It works well in my
IDE, but when running JAXB with it, I get this message :
XPath evaluation of
"//xs:complexty...@name='ResponseStruct']//xs:eleme...@name='Activities']"
results in empty target node at line 18 column 109 of schema
file:/home/bdusauso/prog/java/jaxb-problem/src/main/resources/jaxb-binding.xml
So it seems it cannot evaluate the expression.
I guess it tries to evaluate it against the WSDL I've given to
cxf-codegen-plugin but not against the external schemas imported from it.
For information, here's my cxf-codegen-plugin configuration :
<configuration>
<sourceRoot>src/main/generated</sourceRoot>
<defaultOptions>
<bindingFiles>
<bindingFile>src/main/resources/jaxws-binding.xml</bindingFile>
</bindingFiles>
</defaultOptions>
<wsdlOptions>
<wsdlOption>
<wsdl>src/main/resources/xml/mywsdl.wsdl</wsdl>
</wsdlOption>
</wsdlOptions>
</configuration>
Any idea on how to solve this problem ?
Regards.
--
Bruno Dusausoy
YP5 Software
--
Pensez environnement : limitez l'impression de ce mail.
Please don't print this e-mail unless you really need to.