cxf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Kulp <dk...@apache.org>
Subject Re: New Howto: Defining Contract first webservices with wsdl generation from java
Date Sat, 20 Sep 2008 00:54:38 GMT
On Friday 19 September 2008 2:32:32 pm kasturi1010 wrote:
> I would like to know 2 things:
>
> 1. I would like to know if you can control the namespace in the
> generated-wsdl to what you want ? Right now the target namespace reflects
> the package name (in an inverted manner) of the class exposed with
> @WebService.
> I would like to control the target namespace myself for the purpose of
> "Versioning" rather than being generated automatically. As you may know,
> versioning of webservices is commonly achieved via having dated namespaces
> (like targetNamespace = "http://apache.org/2005/05/version1" or
> targetNamespace="http://apache.org/2006/05/version2")

The @WebService annotation has a namespace attribute on it to allow you to 
control it.

> 2. I dont like to clutter my wsdl <types> element with the schema
> definitions in there itself. Rather I like them having in a separate file
> and have a simple import inside the <types> element. See e.g. below
>
> <types>
>     <xsd:schema>
>        <xsd:import namespace="http://apache.org/2005/05/version1"
>                        schemaLocation="schema1.xsd"/>
>     </xsd:schema>
> </types>
>
> How do I achieve the above?

The java2ws command line tool has a  -createxsdimports flag that will make it 
generate separate files for each schema.

-- 
Daniel Kulp
dkulp@apache.org
http://www.dankulp.com/blog

Mime
View raw message