elcool
elcool

Reputation: 6161

Can I change the Java package of a WebService Client?

So, my JAVA application is connected to different WebServices that were developed inhouse and all 3 of them are packaged under org.tempuri

This is the default namespace I believe and when the wizard creates the Java packages it places them under org.tempuri.. I wanted to change them to give them meaningful names but then my app exploded :(

Can I just go into the .wsdl and change the namespace and repackage it all? Or some way that I can change package "org.tempuri" to "com.abc.ws.imageservices"

I would do a trial and error on my free time, but it would take me a couple of days since the job has other priorities..., so I'm hoping that an answer is faster.

Upvotes: 1

Views: 854

Answers (2)

Albert T. Wong
Albert T. Wong

Reputation: 1653

If you're using RAD or WID, yes.. it can be done really fast if you refactor the namespace (which would change the WSDL) and then you just have to regen.

Upvotes: 0

Mark Robinson
Mark Robinson

Reputation: 3165

You should look into wsimport.

Wsimport will allow you to import directly from a WSDL and one of the parameters in the output project.

wsimport -p com.abc.ws.imageservices -d src/ -wsdllocation http://my.wsdl.com/location?WSDL 

Upvotes: 1

Related Questions