You might be making the mistake in thinking that the schema objects need to 
have the same namespace as your WSDL operations.  Not true, see the 
"targetNamespace" attached to the XSD:Schema element here:  
http://www.jroller.com/gmazza/entry/web_service_tutorial#WFstep4 -- it ensures 
the namespace is separate.  Your problem should go away if you keep the same 
namespace for your schema objects (your optional next step would be then to 
factor the schema XML elements out to a common place and import/include them 
into your WSDLs).  Furthermore, check the wsdl2java command on the CXF website 
-- I believe there's options to suppress generation of the Java artifacts for 
the XSD schema elements which you may want to do if you've already generated 
them and placed them into a JAR someplace.

HTH,
Glen
________________________________________
From: Liter András (SCTR) [[email protected]]
Sent: Tuesday, August 02, 2011 5:40 AM
To: [email protected]
Subject: Client stub generation question

Dear user support,

I have a question about generating webservice client code with wsdl2java.

In my scenario I have more WSDLs, which work on the same set of entities on the 
server side. When I generate the client code for these WSDLs I have the same 
entities multiple times in different packages according to the namespaces of my 
webservices. Since I want to use more services on the client side, I bump into 
the problem of these multiple entities, and therefore after every interface 
change I have to refactor the generated client code to work with a simple set 
of generated entities/business objects (I move them to a different package, 
delete the duplicates and refactor the other classes to use the moved entities).

I hope my I declared my problem clearly. Do you know some workaround to avoid 
this refactoring overhead? Maybe some parameter for wsdl2java? Or some kind of 
other approach?

Thanks in advance!

Best regards,

Liter András
IT szakértő
E-mail: [email protected]<mailto:[email protected]>
Mobil: +36-20-515-0556

        [cid:[email protected]]


GREPTON Informatikai Zrt.
H-1116 Budapest, Kondorfa u. 10.
Tel.: +36-1-204-7730
Fax: +36-1-204-7731
www.grepton.hu<http://www.grepton.hu/>

Gondoljon környezetére, mielőtt kinyomtatja!
Ezen üzenet és annak bármely csatolt anyaga bizalmas, jogi védelem alatt áll, a 
nyilvános közléstől védett. Kérjük látogassa meg honlapunk Adatvédelmi 
nyilatkozat menüpontját a levéllel kapcsolatos további információért.

Reply via email to