You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Sebbo <xs...@gmail.com> on 2009/08/24 14:30:25 UTC

cxf-codegen-plugin package name problem

Hello,

I'm new to cxf, and I have a problem with the cxf-codegen-plugin. I'have to
use multiple web services with the same namespace, so I try to split them in
different package. In order to do this I use the 
<bindingFiles><bindingFile>binding-file.xml</bindingFile></bindingFiles>
configuration of the maven plugin. 

I have a binding-file.xml :
<?xml version="1.0" encoding="UTF-8"?>
<jaxws:bindings wsdlLocation="http://www.xxx.yyyy/toto.asmx?WSDL"
	xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
	xmlns:jaxws="http://java.sun.com/xml/ns/jaxws"
xmlns:jaxb="http://java.sun.com/xml/ns/jaxb">
	<jaxws:package name="aa.bbbbbb.ccccc.toto"></jaxws:package>
</jaxws:bindings>


The problem is that the package name is not set to all the generated
classes. The TotoService implementation and the TotoWebServiceSoap interface
have the right package, but all the others files(ObjectFactory,
package-info, etc) have a package named like the namespace.

I made a lot of try from different sources that I found on google, but I
haven't resolve my problem.

My goal, is that all the generated files from a wsdl have the package name
that I give.

I don't understand why I have this kind of problem.

If you can help me I would be great.

Thanks
-- 
View this message in context: http://www.nabble.com/cxf-codegen-plugin-package-name-problem-tp25115246p25115246.html
Sent from the cxf-user mailing list archive at Nabble.com.


Re: cxf-codegen-plugin package name problem

Posted by Sebbo <xs...@gmail.com>.
Thanks Dan for your answer,

I try with the -p argument and now it works and I don't need anymore of
binding files in my case.

Thanks again.

See you
-- 
View this message in context: http://www.nabble.com/cxf-codegen-plugin-package-name-problem-tp25115246p25129354.html
Sent from the cxf-user mailing list archive at Nabble.com.


Re: cxf-codegen-plugin package name problem

Posted by Daniel Kulp <dk...@apache.org>.
The ObjectFactory and types and such are JAXB generated and would not be 
affected by the "jaxws:packageName" customization.   You would need to google 
the jaxb binding customizations to control those.

That said, our wsdl2java has a nice -p flag that you could just use to stick 
everything into a namespace.   That's probably easier.

Dan


On Mon August 24 2009 8:30:25 am Sebbo wrote:
> Hello,
>
> I'm new to cxf, and I have a problem with the cxf-codegen-plugin. I'have to
> use multiple web services with the same namespace, so I try to split them
> in different package. In order to do this I use the
> <bindingFiles><bindingFile>binding-file.xml</bindingFile></bindingFiles>
> configuration of the maven plugin.
>
> I have a binding-file.xml :
> <?xml version="1.0" encoding="UTF-8"?>
> <jaxws:bindings wsdlLocation="http://www.xxx.yyyy/toto.asmx?WSDL"
> 	xmlns:xs="http://www.w3.org/2001/XMLSchema"
> xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
> 	xmlns:jaxws="http://java.sun.com/xml/ns/jaxws"
> xmlns:jaxb="http://java.sun.com/xml/ns/jaxb">
> 	<jaxws:package name="aa.bbbbbb.ccccc.toto"></jaxws:package>
> </jaxws:bindings>
>
>
> The problem is that the package name is not set to all the generated
> classes. The TotoService implementation and the TotoWebServiceSoap
> interface have the right package, but all the others files(ObjectFactory,
> package-info, etc) have a package named like the namespace.
>
> I made a lot of try from different sources that I found on google, but I
> haven't resolve my problem.
>
> My goal, is that all the generated files from a wsdl have the package name
> that I give.
>
> I don't understand why I have this kind of problem.
>
> If you can help me I would be great.
>
> Thanks

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