If In wsdl content there are properties with same name but different namespace you can receive such error:
wsimport Service.wsdl -p tr.edu.selcuk.kbps -Xnocompile -extension -wsdllocation /tr/edu/selcuk/wsdl/Service.wsdl
[ERROR] A class/interface with the same name "tr.edu.selcuk.kbps.Kimlik" is already in use. Use a class customization to resolve this conflict.
line 530 of file:/drive/f/workspace/netbeans/EnlilWebApplication/wsimport/selcuklu/Service.wsdl
[ERROR] (Relevant to above error) another "Kimlik" is generated from here.
line 143 of file:/drive/f/workspace/netbeans/EnlilWebApplication/wsimport/selcuklu/Service.wsdl
[ERROR] A class/interface with the same name "tr.edu.selcuk.kbps.Cuzdan" is already in use. Use a class customization to resolve this conflict.
line 555 of file:/drive/f/workspace/netbeans/EnlilWebApplication/wsimport/selcuklu/Service.wsdl
[ERROR] (Relevant to above error) another "Cuzdan" is generated from here.
line 159 of file:/drive/f/workspace/netbeans/EnlilWebApplication/wsimport/selcuklu/Service.wsdl
[ERROR] A class/interface with the same name "tr.edu.selcuk.kbps.ExtensionDataObject" is already in use. Use a class customization to resolve this conflict.
line 254 of file:/drive/f/workspace/netbeans/EnlilWebApplication/wsimport/selcuklu/Service.wsdl
[ERROR] (Relevant to above error) another "ExtensionDataObject" is generated from here.
line 602 of file:/drive/f/workspace/netbeans/EnlilWebApplication/wsimport/selcuklu/Service.wsdl
[ERROR] A class/interface with the same name "tr.edu.selcuk.kbps.Parametre" is already in use. Use a class customization to resolve this conflict.
line 262 of file:/drive/f/workspace/netbeans/EnlilWebApplication/wsimport/selcuklu/Service.wsdl
[ERROR] (Relevant to above error) another "Parametre" is generated from here.
line 610 of file:/drive/f/workspace/netbeans/EnlilWebApplication/wsimport/selcuklu/Service.wsdl
[ERROR] A class/interface with the same name "tr.edu.selcuk.kbps.TarihBilgisi" is already in use. Use a class customization to resolve this conflict.
line 316 of file:/drive/f/workspace/netbeans/EnlilWebApplication/wsimport/selcuklu/Service.wsdl
[ERROR] (Relevant to above error) another "TarihBilgisi" is generated from here.
line 690 of file:/drive/f/workspace/netbeans/EnlilWebApplication/wsimport/selcuklu/Service.wsdl
[ERROR] Two declarations cause a collision in the ObjectFactory class.
line 530 of file:/drive/f/workspace/netbeans/EnlilWebApplication/wsimport/selcuklu/Service.wsdl
[ERROR] (Related to above error) This is the other declaration.
line 143 of file:/drive/f/workspace/netbeans/EnlilWebApplication/wsimport/selcuklu/Service.wsdl
[ERROR] Two declarations cause a collision in the ObjectFactory class.
line 555 of file:/drive/f/workspace/netbeans/EnlilWebApplication/wsimport/selcuklu/Service.wsdl
In order to get rid of this conflict you can add
-B-XautoNameResolution parameter to import script
wsimport Service.wsdl -B-XautoNameResolution -p tr.edu.selcuk.kbps -Xnocompile -extension -wsdllocation /tr/edu/selcuk/wsdl/Service.wsdl
parsing WSDL...
[WARNING] SOAP port "ServiceSoap12": uses a non-standard SOAP 1.2 binding.
line 1158 of file:/drive/f/workspace/netbeans/EnlilWebApplication/wsimport/selcuklu/Service.wsdl
Generating code...
You can see that conflicting classes are generated with number suffix:
-rw-r--r-- 1 ekucuk ekucuk 2538 Eki 5 14:09 Cuzdan2.java
-rw-r--r-- 1 ekucuk ekucuk 6766 Eki 5 14:09 Cuzdan.java
-rw-r--r-- 1 ekucuk ekucuk 2832 Eki 5 14:09 Parametre2.java
-rw-r--r-- 1 ekucuk ekucuk 2858 Eki 5 14:09 Parametre.java
-rw-r--r-- 1 ekucuk ekucuk 2538 Eki 5 14:09 Kimlik2.java
-rw-r--r-- 1 ekucuk ekucuk 14155 Eki 5 14:09 Kimlik.java
Hiç yorum yok:
Yorum Gönder