wsimport help for .net web services

i have two .net web services that i want my java client to use.  i am using wsimport to create the JAXWS related classes.  the problem is that both web services ended up writing to the same package folder and overwriting each other's files.  i tried to do this:

[ServiceBehavior(InstanceContextMode = InstanceContextMode.Single, Namespace = "")]

to set a custom target namespace



   <service name="MyServiceConfiguration"...>

      <endpoint name="MyServiceEndpoint"


         contract="Namespaces.MyServiceContract" ...>

to set a binding namespace, but the two web services still overwrite each other.  thanks.
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Use the -p option on wsimport to specify a different package for each service.

ie. wsimport -p com.mycomp.ws1.client webservice1.wsdl
wsimport -p com.mycomp.ws2.client webservice2.wsdl

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
mmingfeilamAuthor Commented:
c:\temp\wiimport\1>wsimport -keep -p org.silkroadtech.dataloader "http://sfcaqa001/Services/DataLoaders/HeartBeatIntegration.svc?wsdl"
parsing WSDL...

A class/interface with the same name "org.silkroadtech.dataloader.BatchJobDetail" is already in use. Use a class customization to resolve this conflict.
  line 1 of

(Relevant to above error) another "BatchJobDetail" is generated from here.
  line 1 of

Two declarations cause a collision in the ObjectFactory class.
  line 1 of

(Related to above error) This is the other declaration.
  line 1 of

Two declarations cause a collision in the ObjectFactory class.
  line 1 of

(Related to above error) This is the other declaration.
  line 1 of
There is obviously a class name collision in the generated Java code, but from the information provided it is not possible to say much more. For sorting out the problem, please attach the two .NET services WSDL files.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.