Discussion:
cxf-codegen-plugin package name problem
Sebbo
2009-08-24 12:30:25 UTC
Permalink
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.
Daniel Kulp
2009-08-24 21:35:14 UTC
Permalink
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
Post by Sebbo
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.
<?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-1oDqGaOF3Lkdnm+***@public.gmane.org
http://www.dankulp.com/blog
Sebbo
2009-08-25 07:00:06 UTC
Permalink
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.
Loading...