Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Use a class customization to resolve this conflict Error and JAXWS

 
Ong Vua
Ranch Hand
Posts: 69
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 2198
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic