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 Jeff Gardner <je...@choicehotels.com> on 2007/07/20 01:12:08 UTC

code generated by wsdl2java

In general, should code that has been generated by wsdl2java be committed to your version/source control repository?
 
Why or why not?

Re: code generated by wsdl2java

Posted by David Robertson <dw...@lbl.gov>.
In general, we do not because changing the WSDL will change the files 
generated.  If elements are no longer present in the new WSDL, the 
corresponding files must be found and removed from the repository, or 
else the clutter will build up.  This can be tricky if there are dozens 
or more files in multiple directories.  If there are new elements, the 
corresponding files must be added to the repository.

-David Robertson
-Berkeley Lab

Jeff Gardner wrote:
> In general, should code that has been generated by wsdl2java be 
> committed to your version/source control repository?
>  
> Why or why not?

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


how to desactive wsdl generation

Posted by Frederic MOLINIERES <fr...@experian.fr>.
Hil list,

How to desactive wsdl generation by get on soap action and ?wsdl parameter ?

Thanks

Frédéric




CONFIDENTIALITÉ
Les informations contenues dans ce document sont de nature confidentielle et à l'usage exclusif des destinataires prévus. Si vous l'avez reçu par erreur, son utilisation sous quelque forme qu'elle soit est strictement interdite. Nous vous remercions dans ce cas de détruire le message et de prendre contact avec son expéditeur. L'intégrité des messages n'étant pas assurée sur Internet, Experian ne saurait être tenu responsable si ce message s'avérait modifié ou falsifié. 

CONFIDENTIAL
The information contained in this message and any attachments hereto are confidential and intended solely for the addressee(s) intended. If you are not the intended addressee of this message, you are hereby notified that you have received this document in error. Any review, dissemination, distribution, or copying of this message is prohibited. Please delete it and inform the sender immediately. Thank you for your help. Messages are susceptible to alteration. Experian shall not be liable for the message if altered, changed or falsified.



---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


RE: code generated by wsdl2java

Posted by "Desmond Whewell (CV/ETL)" <de...@ericsson.com>.
Thanks for the heads-up. I'd never heard of xmltask, but is sounds very
useful.
 

-----Original Message-----
From: Alejandro Calbazana [mailto:alejandro@calbazana.com] 
Sent: 20 July 2007 12:34
To: axis-user@ws.apache.org
Subject: Re: code generated by wsdl2java

I'm not a fan of storing generated code under source control.

I don't store anything under source control but the WSDL and my
implementation source files.  I let the build generate my skeleton each
time and I always generate an interface.  I have a custom implementation
for my service living outside of the generated source tree and keep this
under source control.  This implementation implements the generated
interface.  I then muck with the services.xml post build to point to my
own service impl.  I use xmltask
(http://www.oopsconsultancy.com/software/xmltask/) to do the dirty work
of adding necessary attributes and elements to the services.xml
document.  Seems to work out ok..

Here is a snap from an ant build:

    <target name="gen" description="Generates source" 
depends="check,conf,init">       
        <echo>
========================================================================
=======
= Generate Source
========================================================================
=======    
           
        </echo>               
      <java classname="org.apache.axis2.wsdl.WSDL2Java" fork="true" 
classpathref="CLASSPATH.COMMON">
            <arg line="-uri ${wsdl.uri}"/>
            <arg line="-d adb"/>
              <arg line="-ss"/>
              <arg line="-sd"/>         
              <arg line="-ssi"/>         
            <arg line="-o ${gen}"/>
        </java>   
    </target>


    <target name="build" description="Compiles" 
depends="check,conf,init,gen">
        <echo>
========================================================================
=======
= Build 
========================================================================
=======    
           
        </echo>           
       
        <!-- do build stuff -->
        <javac fork="true" memoryInitialSize="256m" 
memoryMaximumSize="256m" debug="on" destdir="${classes}"
srcdir="${src}">
            <classpath>
                <pathelement path="../dist/core.jar"/>
                <path refid="CLASSPATH.WL"/>
                <path refid="CLASSPATH.PROJECT" />
            </classpath>
        </javac>
       
        <!--
            Now that the compile has finished, a little post processing
is necessary
            on the generated services.xml to configure the web service
with the necessary
            life cylce listeners as well as setting the services TCCL
            (thread context class loader).
        -->
        <xmltask source="${gen}/resources/services.xml" 
dest="${gen}/resources/services.xml">
            <!-- replace the service impl -->
            <replace
path="/serviceGroup/service/parameter[@name='ServiceClass']/text()">
                <![CDATA[ com.foo.bar.MyServiceImpl ]]>
            </replace>

            <!-- set the service thread context class loader param -->
            <insert path="/serviceGroup/service">
                <![CDATA[
                    <parameter name="ServiceTCCL">composite</parameter>
                ]]>
            </insert>
           
            <!-- set the service lifecycle impl -->
            <attr path="/serviceGroup/service" attr="class" 
value="com.foo.bar.MyServiceLifeCycleListener"/>
            <attr path="/serivceGroup/service" attr="scope" 
value="application"/>
        </xmltask>       
    </target>

Thanks,

Alejandro
.
Desmond Whewell (CV/ETL) wrote:
> Jeff,
>  
> The only files that I store are:
>  
> 1. The ant files that control the generation from the WSDL
>  
> 2. The receiver and skeleton files that replace the boiler plate 
> versions generated by Axis2.
>  
> All others are derived at build time.
>  
> Cheers, Des
>
> ----------------------------------------------------------------------
> --
> *From:* Jeff Gardner [mailto:jeff_gardner@choicehotels.com]
> *Sent:* 20 July 2007 00:12
> *To:* axis-user@ws.apache.org
> *Subject:* code generated by wsdl2java
>
> In general, should code that has been generated by wsdl2java be 
> committed to your version/source control repository?
>  
> Why or why not?



---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Re: code generated by wsdl2java

Posted by Alejandro Calbazana <al...@calbazana.com>.
I'm not a fan of storing generated code under source control.

I don't store anything under source control but the WSDL and my 
implementation source files.  I let the build generate my skeleton each 
time and I always generate an interface.  I have a custom implementation 
for my service living outside of the generated source tree and keep this 
under source control.  This implementation implements the generated 
interface.  I then muck with the services.xml post build to point to my 
own service impl.  I use xmltask 
(http://www.oopsconsultancy.com/software/xmltask/) to do the dirty work 
of adding necessary attributes and elements to the services.xml 
document.  Seems to work out ok..

Here is a snap from an ant build:

    <target name="gen" description="Generates source" 
depends="check,conf,init">       
        <echo>
===============================================================================
= Generate Source
===============================================================================    
           
        </echo>               
      <java classname="org.apache.axis2.wsdl.WSDL2Java" fork="true" 
classpathref="CLASSPATH.COMMON">
            <arg line="-uri ${wsdl.uri}"/>
            <arg line="-d adb"/>
              <arg line="-ss"/>
              <arg line="-sd"/>         
              <arg line="-ssi"/>         
            <arg line="-o ${gen}"/>
        </java>   
    </target>


    <target name="build" description="Compiles" 
depends="check,conf,init,gen">
        <echo>
===============================================================================
= Build 
===============================================================================    
           
        </echo>           
       
        <!-- do build stuff -->
        <javac fork="true" memoryInitialSize="256m" 
memoryMaximumSize="256m" debug="on" destdir="${classes}" srcdir="${src}">
            <classpath>
                <pathelement path="../dist/core.jar"/>
                <path refid="CLASSPATH.WL"/>
                <path refid="CLASSPATH.PROJECT" />
            </classpath>
        </javac>
       
        <!--
            Now that the compile has finished, a little post processing 
is necessary
            on the generated services.xml to configure the web service 
with the necessary
            life cylce listeners as well as setting the services TCCL
            (thread context class loader).
        -->
        <xmltask source="${gen}/resources/services.xml" 
dest="${gen}/resources/services.xml">
            <!-- replace the service impl -->
            <replace 
path="/serviceGroup/service/parameter[@name='ServiceClass']/text()">
                <![CDATA[ com.foo.bar.MyServiceImpl ]]>
            </replace>

            <!-- set the service thread context class loader param -->
            <insert path="/serviceGroup/service">
                <![CDATA[
                    <parameter name="ServiceTCCL">composite</parameter>
                ]]>
            </insert>
           
            <!-- set the service lifecycle impl -->
            <attr path="/serviceGroup/service" attr="class" 
value="com.foo.bar.MyServiceLifeCycleListener"/>
            <attr path="/serivceGroup/service" attr="scope" 
value="application"/>
        </xmltask>       
    </target>

Thanks,

Alejandro
.
Desmond Whewell (CV/ETL) wrote:
> Jeff,
>  
> The only files that I store are:
>  
> 1. The ant files that control the generation from the WSDL
>  
> 2. The receiver and skeleton files that replace the boiler plate 
> versions generated by Axis2.
>  
> All others are derived at build time.
>  
> Cheers, Des
>
> ------------------------------------------------------------------------
> *From:* Jeff Gardner [mailto:jeff_gardner@choicehotels.com]
> *Sent:* 20 July 2007 00:12
> *To:* axis-user@ws.apache.org
> *Subject:* code generated by wsdl2java
>
> In general, should code that has been generated by wsdl2java be 
> committed to your version/source control repository?
>  
> Why or why not?



---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


RE: code generated by wsdl2java

Posted by "Desmond Whewell (CV/ETL)" <de...@ericsson.com>.
Jeff, 
 
The only files that I store are:
 
1. The ant files that control the generation from the WSDL
 
2. The receiver and skeleton files that replace the boiler plate
versions generated by Axis2.
 
All others are derived at build time.
 
Cheers, Des

________________________________

From: Jeff Gardner [mailto:jeff_gardner@choicehotels.com] 
Sent: 20 July 2007 00:12
To: axis-user@ws.apache.org
Subject: code generated by wsdl2java


In general, should code that has been generated by wsdl2java be
committed to your version/source control repository?
 
Why or why not?