cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From heapifyman <heapify...@gmail.com>
Subject idl2wsdl - customise sequence type name
Date Wed, 26 Nov 2014 18:07:55 GMT
Hi all,

I am using cxf#s idl2wsdl tool (http://cxf.apache.org/docs/idl-to-wsdl.html)
to generate a WSDL from some existing idl files.
Now I noticed that my idl sequences result in xml schema type names like
"ModuleName._Anon1_TypeName", e.g. my idl has something like:

module MyModule
{
  struct Foo {
  };
  struct Bar
  {
    sequence<Foo> fooSeq;
  };
};

That would create a
<xs:complexType name="MyModule._Anon1_Bar">
  <xs:sequence>
    <xs:element maxOccurs="unbounded" minOccurs="0" name="item"
type="tns:MyModule.Foo"/>
  </xs:sequence>
</xs:complexType>

Is there a way to customise this naming scheme? Because when generating
Java classes from the XSD again that creates classes
like "MyModuleAnon1Bar" which is not really nice...
I didn't find anything about that in the cxf documentation.

I know I can customise the names of generated Java classes using an
external jaxb binding file but the "Anon" names are still in the XSD, which
will also be used from other Programming languages to generate classes from
it.
That's why I would like to get rid of those "Anon" names in the XSD
already, preferrably in an automated way.

Or is there maybe a way for getting rid of the Anon Types altogether since
they are just wrappers around a List anyway. So instead of generating in
the XSD:
<xs:element name="fooSeq" type="tns:MyModule._Anon1_Bar"/>

use something like this:
<xs:sequence>
  <xs:element maxOccurs="unbounded" minOccurs="0" name="fooSeq"
type="tns:MyModule.Foo"/>
</xs:sequence>

Thanks in advance for any hints.

Cheers

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message