Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

WSDL to Java - Collision in the ObjectFactory class using jaxb  RSS feed

 
Farrukh Mehdi
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a wsdl that is giving me collision error for element/type

line 761 of file:/C:/Users/syedf/Documents/Checkers/4842/PwsDemo_creditcardtransactionservice.xml
line 796 of file:/C:/Users/syedf/Documents/Checkers/4842/PwsDemo_creditcardtransactionservice.xml

When I run the wsimport using the binding binding.xjb I am getting the following error.

[ERROR] "C:\Users\syedf\Documents\Checkers\4842\PwsDemo_creditcardtransactionservice.wsdl" is not a part of this compilation. Is this a mistake for "file:/C:/Users/syedf/Documents/Checkers/4842/PwsDemo_creditcardtransactionservice.wsdl#types?schema8"?
line 5 of file:/C:/Users/syedf/Documents/Checkers/4842/binding.xjb

whereas my wsimport command is :
wsimport -b C:\Users\syedf\Documents\Checkers\4842\binding.xjb C:\Users\syedf\Documents\Checkers\4842\PwsDemo_creditcardtransactionservice.wsdl

and my binding.xjb is :
<jxb:bindings version="1.0"
xmlns:jxb="http://java.sun.com/xml/ns/jaxb"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:xs="http://www.w3.org/2001/XMLSchema">
<jxb:bindings schemaLocation="C:\Users\syedf\Documents\Checkers\4842\PwsDemo_creditcardtransactionservice.wsdl" node="/xs:schema">
<jxb:schemaBindings>
<jxb:package name="com.tecsys.dms.api.ccg.client"/>
<jxb:nameXmlTransform>
<jxb:elementName suffix="Type"/>
</jxb:nameXmlTransform>
</jxb:schemaBindings>
</jxb:bindings>
</jxb:bindings>


any help regarding this issue would be highly appreciated.

Thanks
 
g tsuji
Ranch Hand
Posts: 697
3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
[ERROR] "C:\Users\syedf\Documents\Checkers\4842\PwsDemo_creditcardtransactionservice.wsdl" is not a part of this compilation. Is this a mistake for "file:/C:/Users/syedf/Documents/Checkers/4842/PwsDemo_creditcardtransactionservice.wsdl#types?schema8"?
line 5 of file:/C:/Users/syedf/Documents/Checkers/4842/binding.xjb


The error message practically tells you how to make good the designated line in the xjb.

The general rule seems to be that if you code an absolute path for the schemaLocation which is on a local file system, you need to attach a pseudo protocol (file:// or even file:/ with one slash for that matter). After the drive C:, you can continue to use backslash or slash as you like it be.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!