Hi Anto,

I guess the best way to generate additional code is writing a xjc plugin. Have a look at example 6 in http://cxf.apache.org/docs/maven-cxf-codegen-plugin-wsdl-to-java.html on how to use such a plugin . In the CXF source you can find the source of some xjc plugins (in path common/xjc). You can use one of those plugins as a base to write your plugin. Perhaps you even find what you need in jaxb commons: https://jaxb2-commons.dev.java.net/

In any case you should not change generated code manually as this means you can not simply regenerate it. Could you explain a little more what exactly you want to achieve?

Greetings

Christian


Am 02.02.2010 08:06, schrieb Anto Paul:
Hi,

     How to embed custom code into method body of implementation classes
generated by wsdl2java tool? I am writing a tool that calls wsdl2java to
generate service implementation classes from WSDL and the generated code
should contain code for calling existing service layer. CXF wsdl2java
generates method body that is no usable by me. Instead of modifying that
manually or using another tool to modify generated method body, I need to
replace this method body with what I supply to the tool. Is this supported
by wsdl2java? If not which class I should look to customize the generated
code? I need to do the same for client.

Thanks in advance

Anto


Reply via email to