JavaToWs Partition Types

I have a server in Java that has several web-services . WSDLs (and XSDs ) are generated from java using javatows from apache cxf.

Some services share types, and I would like to share these types in wsdl, is this possible?

After that, I want to generate C # code using svcutils , but since each WSDL has several copies of the same type, svcutil reports an error that this complex type has already been declared ...

I know that I can use the / namespace switch, but I don’t want this, because in this way I will have the same classes generated in different namespaces ... I would like to have one class in a common namespace ...

+6
source share
1 answer

I suggest you create a common.xsd file (if possible) containing common structures that are then included in each WSDL file for each of these services.

 <include schemaLocation="common.xsd"/> 

I believe that you will overcome the problems encountered when generating client proxy code using svcutil.exe.

+1
source

Source: https://habr.com/ru/post/958649/


All Articles