Meaningless Drivel is fun!*
The moose likes Web Services and the fly likes Use a class customization to resolve this conflict Error and JAXWS Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Web Services
Bookmark "Use a class customization to resolve this conflict Error and JAXWS" Watch "Use a class customization to resolve this conflict Error and JAXWS" New topic
Author

Use a class customization to resolve this conflict Error and JAXWS

Ong Vua
Ranch Hand

Joined: Jan 24, 2008
Posts: 59
I'm generating a WS proxy from an existing wsdl. Below is my code in an ant build script

<taskdef name="clientgen" classname="weblogic.wsee.tools.anttasks.ClientGenTask"/>

<target name="generate-build">
<clientgen type="JAXWS"
wsdl="C:\e900\DV900\java\TEST\integrationevent.wsdl"
destDir="C:\e900\DV900\java\TEST\output"
packageName="com.abc"/>
</target>

This wsdl file references 2 external xsd files and these xsd files reside in the same directory as the wsdl file.

I got the below error. Do you have any ideas?

I'm using jdk160_14_R27.6.5-32, weblogic 10.3.2, jdeveloper 11.1.1.2

[clientgen] Consider using <depends>/<produces> so that wsimport won't do unnecessary compilation
[clientgen] parsing WSDL...
[clientgen]
[clientgen]
[clientgen] [ERROR] A class/interface with the same name "com.abc.ListOfOpportunity" is already in use. Use a class customization to resolve this conflict.
[clientgen] line 1 of file:/C:/e900/DV900/java/TEST/Contact.xsd
[clientgen]
[clientgen] [ERROR] (Relevant to above error) another "ListOfOpportunity" is generated from here.
[clientgen] line 1 of file:/C:/e900/DV900/java/TEST/Opportunity.xsd
[clientgen]
[clientgen] [ERROR] A class/interface with the same name "com.abc.Book" is already in use. Use a class customization to resolve this conflict.
[clientgen] line 1 of file:/C:/e900/DV900/java/TEST/Contact.xsd
[clientgen]
[clientgen] [ERROR] (Relevant to above error) another "Book" is generated from here.
[clientgen] line 1 of file:/C:/e900/DV900/java/TEST/Opportunity.xsd
[clientgen]
[clientgen] [ERROR] A class/interface with the same name "com.abc.ListOfContact" is already in use. Use a class customization to resolve this conflict.
[clientgen] line 1 of file:/C:/e900/DV900/java/TEST/Contact.xsd
[clientgen]
[clientgen] [ERROR] (Relevant to above error) another "ListOfContact" is generated from here.
[clientgen] line 1 of file:/C:/e900/DV900/java/TEST/Opportunity.xsd
[clientgen]
[clientgen] [ERROR] A class/interface with the same name "com.abc.Attachment" is already in use. Use a class customization to resolve this conflict.
[clientgen] line 1 of file:/C:/e900/DV900/java/TEST/Contact.xsd
[clientgen]
[clientgen] [ERROR] (Relevant to above error) another "Attachment" is generated from here.
[clientgen] line 1 of file:/C:/e900/DV900/java/TEST/Opportunity.xsd
[clientgen]
[clientgen] [ERROR] A class/interface with the same name "com.abc.SiebelXmlAttachmentType" is already in use. Use a class customization to resolve this conflict.
[clientgen] line 1 of file:/C:/e900/DV900/java/TEST/Contact.xsd
[clientgen]
...etc.



Ivan Krizsan
Ranch Hand

Joined: Oct 04, 2006
Posts: 2198
    
    1
Hi!
You have an entity with the same name, residing in namespaces with the same name (the same namespace?), in two different XML schemas.
For instance, you have the Book entity/type in both the Contact.xsd and Opportunity.xsd schemas.
Are these types identical or different? If identical, then a suggestion is to refactor your XML schemas.
If not identical, then perhaps change the namespaces so that Book in Contact.xsd resides in a different namespace than Book in Opportunity.xsd.
There are additional measures as well.
Best wishes!


My free books and tutorials: http://www.slideshare.net/krizsan
 
wood burning stoves
 
subject: Use a class customization to resolve this conflict Error and JAXWS