Best practice to deal with external Content Type


I have a service flow “mySrv” which is consuming an external service flow called “extSrv”.
One of the output document of extSrv contains some fields for which Content type is an Enumerate Type :

Example :

Field1 : Content type = CountryEnum {}

After having created my web service Descriptor and created the WSDL, I have my TargetNamespace like this :

Now, I’m realizing that the Namespace used for the external Enumerate type is not consistent with my TargetNamespace’s web service.
If I generate some Java classes from my WSDL (with CXF), I will obtain 2 different directories.

How would you deal with that ?
Would you keep the original namespace of the Enumerate Type, or would you re-create the enumerate type with another namespace (like ?


I’d suggest that you separate the payload xml structure from WS interface.
in WS interface, you just have a few fields:

the namespace of the payload won’t interfere with your WS interface. It’s also easier if case you want to update your payload structure, or send other xml types.

Thanks a lot for your reply Tong,

Would you have some example, for me to be sure to understand ?