You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Chang Xing <ch...@sage.ch> on 2009/05/27 07:52:04 UTC

what is the best way to generate java code when the wsdl is changed?

Hi

I am using Eclipse with axis2 plugin to generate Java code from a wsdl 
file.
the wsdl file is changed frequently. so I need to regenerate the Java 
code from the wsdl.
But if I generate code to the same project, it will take a long time and 
the skeleton java file won't be generated again
because there's already a skeleton file( I guess so).
So I have to create another java project and generate code to this 
project from the wsdl file.

Does anybody have a better way to do this work?

Thanks

Chang

RE: what is the best way to generate java code when the wsdl is changed?

Posted by David Meiklejohn <dm...@iseek.com.au>.
Hi Chang,

Unfortunately I have never used the Axis2 plugin so my knowledge on it is almost 0. After looking at a little information on it I couldn't immediately see how to get it to generate an interface. From the command line you just pass wsdl2java an option of -ssi and it is possible to do it in Maven by setting <generateServerSideInterface>true</generateServerSideInterface>. Sorry I can't be of more help with the Eclipse plugin, it may not be capable of doing what I'm talking about.

David


-----Original Message-----
From: Chang Xing [mailto:chang.xing@sage.ch]
Sent: Wednesday 27 May 2009 5:16 PM
To: axis-user@ws.apache.org
Subject: Re: what is the best way to generate java code when the wsdl is changed?

Hi David

Your idea sounds new to me. But how do you configure the axis2plug to
generate interface rather than the skeleton class?
There's not much options with the plugin in eclipse.

Thanks

Chang

David Meiklejohn wrote:
> Hi,
>
> Let me know if I am misunderstanding your problem. I believe what you are doing is generating from the WSDL with standard settings so Axis2 is generating files with a XSkeleton.java where you put your implementation. If that is the case I would set up the Axis2 plugin to create an interface from the WSDL rather than the skeleton class itself. That way you can recreate the interface at will whenever the WSDL changes and just implement the interface with your own class. This does mean that your class will generate compile errors each time something major changes or a new method is added that your class does not implement, you will just have to change your implementation to match the interface and you're good to go.
>
> David
>
>
>
>
> This e-mail and any files transmitted with it may contain confidential and privileged material for the sole use of the intended recipient. Any review, use, distribution or disclosure by others is strictly prohibited. If you are not the intended recipient (or authorised to receive for the recipient), please contact the sender by reply e-mail and delete all copies of this message.
>
>
> -----Original Message-----
> From: Chang Xing [mailto:chang.xing@sage.ch]
> Sent: Wednesday 27 May 2009 3:52 PM
> To: axis-user@ws.apache.org
> Subject: what is the best way to generate java code when the wsdl is changed?
>
> Hi
>
> I am using Eclipse with axis2 plugin to generate Java code from a wsdl
> file.
> the wsdl file is changed frequently. so I need to regenerate the Java
> code from the wsdl.
> But if I generate code to the same project, it will take a long time and
> the skeleton java file won't be generated again
> because there's already a skeleton file( I guess so).
> So I have to create another java project and generate code to this
> project from the wsdl file.
>
> Does anybody have a better way to do this work?
>
> Thanks
>
> Chang
>


Re: what is the best way to generate java code when the wsdl is changed?

Posted by Chang Xing <ch...@sage.ch>.
Hi David

Your idea sounds new to me. But how do you configure the axis2plug to 
generate interface rather than the skeleton class?
There's not much options with the plugin in eclipse.

Thanks

Chang

David Meiklejohn wrote:
> Hi,
>
> Let me know if I am misunderstanding your problem. I believe what you are doing is generating from the WSDL with standard settings so Axis2 is generating files with a XSkeleton.java where you put your implementation. If that is the case I would set up the Axis2 plugin to create an interface from the WSDL rather than the skeleton class itself. That way you can recreate the interface at will whenever the WSDL changes and just implement the interface with your own class. This does mean that your class will generate compile errors each time something major changes or a new method is added that your class does not implement, you will just have to change your implementation to match the interface and you're good to go.
>
> David
>
>
>
>
> This e-mail and any files transmitted with it may contain confidential and privileged material for the sole use of the intended recipient. Any review, use, distribution or disclosure by others is strictly prohibited. If you are not the intended recipient (or authorised to receive for the recipient), please contact the sender by reply e-mail and delete all copies of this message.
>
>
> -----Original Message-----
> From: Chang Xing [mailto:chang.xing@sage.ch]
> Sent: Wednesday 27 May 2009 3:52 PM
> To: axis-user@ws.apache.org
> Subject: what is the best way to generate java code when the wsdl is changed?
>
> Hi
>
> I am using Eclipse with axis2 plugin to generate Java code from a wsdl
> file.
> the wsdl file is changed frequently. so I need to regenerate the Java
> code from the wsdl.
> But if I generate code to the same project, it will take a long time and
> the skeleton java file won't be generated again
> because there's already a skeleton file( I guess so).
> So I have to create another java project and generate code to this
> project from the wsdl file.
>
> Does anybody have a better way to do this work?
>
> Thanks
>
> Chang
>   


RE: what is the best way to generate java code when the wsdl is changed?

Posted by David Meiklejohn <dm...@iseek.com.au>.
Hi,

Let me know if I am misunderstanding your problem. I believe what you are doing is generating from the WSDL with standard settings so Axis2 is generating files with a XSkeleton.java where you put your implementation. If that is the case I would set up the Axis2 plugin to create an interface from the WSDL rather than the skeleton class itself. That way you can recreate the interface at will whenever the WSDL changes and just implement the interface with your own class. This does mean that your class will generate compile errors each time something major changes or a new method is added that your class does not implement, you will just have to change your implementation to match the interface and you're good to go.

David




This e-mail and any files transmitted with it may contain confidential and privileged material for the sole use of the intended recipient. Any review, use, distribution or disclosure by others is strictly prohibited. If you are not the intended recipient (or authorised to receive for the recipient), please contact the sender by reply e-mail and delete all copies of this message.


-----Original Message-----
From: Chang Xing [mailto:chang.xing@sage.ch]
Sent: Wednesday 27 May 2009 3:52 PM
To: axis-user@ws.apache.org
Subject: what is the best way to generate java code when the wsdl is changed?

Hi

I am using Eclipse with axis2 plugin to generate Java code from a wsdl
file.
the wsdl file is changed frequently. so I need to regenerate the Java
code from the wsdl.
But if I generate code to the same project, it will take a long time and
the skeleton java file won't be generated again
because there's already a skeleton file( I guess so).
So I have to create another java project and generate code to this
project from the wsdl file.

Does anybody have a better way to do this work?

Thanks

Chang

Re: what is the best way to generate java code when the wsdl is changed?

Posted by Chang Xing <ch...@sage.ch>.
Thanks. I have also thought to do this if there's no better way with the 
axis2 plugin.



Chinmoy Chakraborty wrote:
> Just an idea!! may be there is a better idea but you can try this if 
> it suits in your case:
>  
> create a batch file. execute the necessary commands sequentially:
>  
> . delete the java source files already exits
> - run the command to create the java sources from wsdl
> ....
>  just run the batch file everytime your wsdl changes.
>  
> Chinmoy
>
> On Wed, May 27, 2009 at 11:22 AM, Chang Xing <chang.xing@sage.ch 
> <ma...@sage.ch>> wrote:
>
>     Hi
>
>     I am using Eclipse with axis2 plugin to generate Java code from a
>     wsdl file.
>     the wsdl file is changed frequently. so I need to regenerate the
>     Java code from the wsdl.
>     But if I generate code to the same project, it will take a long
>     time and the skeleton java file won't be generated again
>     because there's already a skeleton file( I guess so).
>     So I have to create another java project and generate code to this
>     project from the wsdl file.
>
>     Does anybody have a better way to do this work?
>
>     Thanks
>
>     Chang
>
>


Re: what is the best way to generate java code when the wsdl is changed?

Posted by Chinmoy Chakraborty <cc...@gmail.com>.
Just an idea!! may be there is a better idea but you can try this if it
suits in your case:

create a batch file. execute the necessary commands sequentially:

. delete the java source files already exits
- run the command to create the java sources from wsdl
....
 just run the batch file everytime your wsdl changes.

Chinmoy

On Wed, May 27, 2009 at 11:22 AM, Chang Xing <ch...@sage.ch> wrote:

> Hi
>
> I am using Eclipse with axis2 plugin to generate Java code from a wsdl
> file.
> the wsdl file is changed frequently. so I need to regenerate the Java code
> from the wsdl.
> But if I generate code to the same project, it will take a long time and
> the skeleton java file won't be generated again
> because there's already a skeleton file( I guess so).
> So I have to create another java project and generate code to this project
> from the wsdl file.
>
> Does anybody have a better way to do this work?
>
> Thanks
>
> Chang
>