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 Vikas <vi...@unnat-e.com> on 2007/04/17 14:38:40 UTC

sample code "quickstartadb" auto generated build.xml file

Hi Friends,

Whenever we are using WSDL2Java command for given build.xml file from command prompt it generate one extra build.xml file.

Before running command dir structure
[quickstartadb
        |
        +-- resources
              src
              build.xml]

Command:- WSDL2Java -uri resources/META-INF/StockQuoteService.wsdl -p samples.quickstart.clients -d adb -s -o build/client

After running command dir structure
[quickstartadb
        |
        +-- resources
              src
              build.xml
        +-- build
               |
               +-- client
                     |
                     +-- build.xml [auto generated build file]
                           src]

It is always creating another "build.xml" file. What is the use of that extra build file?
What is the option to NOT generate that build file?

With best regards

From
Vikas R. Khengare

Re: sample code "quickstartadb" auto generated build.xml file

Posted by Vikas <vi...@unnat-e.com>.
Hi Friends/Martin,

Can I disable that feature? and want to write my custom myBuild.xml file for generated stub and skeleton classes.

Otherwise can I access those auto generated task from another build.xml file?

With best regards

From
Vikas R. Khengare

  ----- Original Message ----- 
  From: Martin Gainty 
  To: Vikas 
  Cc: axis-user@ws.apache.org 
  Sent: Wednesday, April 18, 2007 12:31 AM
  Subject: Re: sample code "quickstartadb" auto generated build.xml file


  Good Afternoon Vikas-

  my script for executing the service and client
  @echo on
  cd %AXIS2_HOME%/samples/quickstartadb
  set AXIS2_CLASS_PATH=%AXIS2_HOME%/src/modules/adb-codegen/org/apache/axis2/axis2-codegen/1.1;%AXIS2_HOME%/lib;%COMMONS_LOGGING_HOME%AXIS2_HOME%/lib;%JAF_HOME%\jaf-1.0.2
  java -cp "%AXIS2_CLASS_PATH%" org.apache.axis2.wsdl.WSDL2Java -uri %AXIS2_HOME%/samples/quickstartadb/resources/META-INF/StockQuoteService.wsdl -p samples.quickstart.clients -d adb -s -o build/client

  using java to execute the same build.xml ant script and discovered
  that at inception since the generated classes for service and client-stub do not yet exist 
  One must use the original build.xml to generate.service which will wsdl2Java and 
    <target name="generate.service" depends="init">
          <taskdef name="wsdl2java"
                   classname="org.apache.axis2.tool.ant.AntCodegenTask"
                   classpathref="axis2.classpath"/>
          <wsdl2java wsdlFilename="${basedir}/resources/META-INF/StockQuoteService.wsdl"
                     output="${build.dir}/service"
                     packageName="samples.quickstart.service.adb"
                     language="java"
                     databindingName="adb"
                     synconly="true"
                     serverside="true"
                     serverSideInterface="true"
                     namespaceToPackages="http://quickstart.samples/xsd=samples.quickstart.service.adb.xsd"
                     generateservicexml="true"/>
          <copy file="${basedir}/src/samples/quickstart/service/adb/StockQuoteServiceSkeleton.java"
                toDir="${build.dir}/service/src/samples/quickstart/service/adb/"
                overwrite="yes">    
          </copy>
          <copy file="${basedir}/resources/META-INF/services.xml"
                toDir="${build.dir}/service/resources/"
                overwrite="yes">
          </copy>
          <ant dir="${build.dir}/service"/>
      </target>

  this will accomplish 2 major objectives-
  1)Create the service and accompanying service classes (and create a new /build/service/build.xml for compiling the service classes)
  2)Create client and accompanying stub client classes (with a new /build/client/build.xml for compiling the client classes)

  (In other words these new build.xml scripts are required for compiling the new generated classes)

  Martin--
  This email message and any files transmitted with it contain confidential
  information intended only for the person(s) to whom this email message is
  addressed.  If you have received this email message in error, please notify
  the sender immediately by telephone or email and destroy the original
  message without making a copy.  Thank you.

    ----- Original Message ----- 
    From: Vikas 
    To: axis user 
    Sent: Tuesday, April 17, 2007 8:38 AM
    Subject: sample code "quickstartadb" auto generated build.xml file


    Hi Friends,

    Whenever we are using WSDL2Java command for given build.xml file from command prompt it generate one extra build.xml file.

    Before running command dir structure
    [quickstartadb
            |
            +-- resources
                  src
                  build.xml]

    Command:- WSDL2Java -uri resources/META-INF/StockQuoteService.wsdl -p samples.quickstart.clients -d adb -s -o build/client

    After running command dir structure
    [quickstartadb
            |
            +-- resources
                  src
                  build.xml
            +-- build
                   |
                   +-- client
                         |
                         +-- build.xml [auto generated build file]
                               src]

    It is always creating another "build.xml" file. What is the use of that extra build file?
    What is the option to NOT generate that build file?

    With best regards

    From
    Vikas R. Khengare

Re: sample code "quickstartadb" auto generated build.xml file

Posted by Martin Gainty <mg...@hotmail.com>.
Good Afternoon Vikas-

my script for executing the service and client
@echo on
cd %AXIS2_HOME%/samples/quickstartadb
set AXIS2_CLASS_PATH=%AXIS2_HOME%/src/modules/adb-codegen/org/apache/axis2/axis2-codegen/1.1;%AXIS2_HOME%/lib;%COMMONS_LOGGING_HOME%AXIS2_HOME%/lib;%JAF_HOME%\jaf-1.0.2
java -cp "%AXIS2_CLASS_PATH%" org.apache.axis2.wsdl.WSDL2Java -uri %AXIS2_HOME%/samples/quickstartadb/resources/META-INF/StockQuoteService.wsdl -p samples.quickstart.clients -d adb -s -o build/client

using java to execute the same build.xml ant script and discovered
that at inception since the generated classes for service and client-stub do not yet exist 
One must use the original build.xml to generate.service which will wsdl2Java and 
  <target name="generate.service" depends="init">
        <taskdef name="wsdl2java"
                 classname="org.apache.axis2.tool.ant.AntCodegenTask"
                 classpathref="axis2.classpath"/>
        <wsdl2java wsdlFilename="${basedir}/resources/META-INF/StockQuoteService.wsdl"
                   output="${build.dir}/service"
                   packageName="samples.quickstart.service.adb"
                   language="java"
                   databindingName="adb"
                   synconly="true"
                   serverside="true"
                   serverSideInterface="true"
                   namespaceToPackages="http://quickstart.samples/xsd=samples.quickstartservice.adb.xsd"
                   generateservicexml="true"/>
        <copy file="${basedir}/src/samples/quickstart/service/adb/StockQuoteServiceSkeleton.java"
              toDir="${build.dir}/service/src/samples/quickstart/service/adb/"
              overwrite="yes">    
        </copy>
        <copy file="${basedir}/resources/META-INF/services.xml"
              toDir="${build.dir}/service/resources/"
              overwrite="yes">
        </copy>
        <ant dir="${build.dir}/service"/>
    </target>

this will accomplish 2 major objectives-
1)Create the service and accompanying service classes (and create a new /build/service/build.xml for compiling the service classes)
2)Create client and accompanying stub client classes (with a new /build/client/build.xml for compiling the client classes)

(In other words these new build.xml scripts are required for compiling the new generated classes)

Martin--
This email message and any files transmitted with it contain confidential
information intended only for the person(s) to whom this email message is
addressed.  If you have received this email message in error, please notify
the sender immediately by telephone or email and destroy the original
message without making a copy.  Thank you.

  ----- Original Message ----- 
  From: Vikas 
  To: axis user 
  Sent: Tuesday, April 17, 2007 8:38 AM
  Subject: sample code "quickstartadb" auto generated build.xml file


  Hi Friends,

  Whenever we are using WSDL2Java command for given build.xml file from command prompt it generate one extra build.xml file.

  Before running command dir structure
  [quickstartadb
          |
          +-- resources
                src
                build.xml]

  Command:- WSDL2Java -uri resources/META-INF/StockQuoteService.wsdl -p samples.quickstart.clients -d adb -s -o build/client

  After running command dir structure
  [quickstartadb
          |
          +-- resources
                src
                build.xml
          +-- build
                 |
                 +-- client
                       |
                       +-- build.xml [auto generated build file]
                             src]

  It is always creating another "build.xml" file. What is the use of that extra build file?
  What is the option to NOT generate that build file?

  With best regards

  From
  Vikas R. Khengare

Re: sample code "quickstartadb" auto generated build.xml file

Posted by Glen Mazza <gr...@verizon.net>.
I call that the "inner build.xml" file, created after you run wsdl2java.
For me, I end up using two build.xml files, one I create and that
autogenerated one.

-- The one I create (outer build.xml, at the project root) is just to
run WSDL2Java (Step #4 of [1]) (I envy those who can remember all the
parameters of command-line wsdl2java, but I definitely need to store
this in an Ant build script.)

-- The inner one is used for creating the service archive (Step #8 of
[1]) and compiling the client into a class (Step #13 of [1]).

That inner build.xml script is actually very useful, and it saves Axis2
users a ton of time in not needing to reinvent the wheel each time they
create a web service.

Glen

[1] http://www.jroller.com/page/gmazza?entry=creating_a_web_service_with


Am Dienstag, den 17.04.2007, 18:08 +0530 schrieb Vikas: 
> Hi Friends,
>  
> Whenever we are using WSDL2Java command for given build.xml file from
> command prompt it generate one extra build.xml file.
>  
> Before running command dir structure
> [quickstartadb
>         |
>         +-- resources
>               src
>               build.xml]
>  
> Command:- WSDL2Java -uri resources/META-INF/StockQuoteService.wsdl -p
> samples.quickstart.clients -d adb -s -o build/client
>  
> After running command dir structure
> [quickstartadb
>         |
>         +-- resources
>               src
>               build.xml
>         +-- build
>                |
>                +-- client
>                      |
>                      +-- build.xml [auto generated build file]
>                            src]
>  
> It is always creating another "build.xml" file. What is the use of
> that extra build file?
> What is the option to NOT generate that build file?
>  
> With best regards
>  
> From
> Vikas R. Khengare
> 



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