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 ChadDavis <ch...@gmail.com> on 2007/01/11 00:19:39 UTC

problems with quick start

Hello all.  I'm doing the ADB Client in the quickstart guide.  I am
able to build the client manually ( wsdl2java from the command line ),
but when I try to use the ant task to generate the client the task
fails.  I doesn't produce a stub, and doesn't produce a build.xml.
The only error ant gives is the complain that it can't find the
build.xml file for the <ant . . /> task at the end of the target (
generate.client).

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


Re: problems with quick start

Posted by Charitha Kankanamge <ch...@wso2.com>.
Hi ChadDavis,
I did not encounter this issue with quickstart samples. I was able to 
generate service and execute client by following the instructions given 
in the README files.

Regards
Charitha

ChadDavis wrote:
> Talking to myself.  But oh well.
>
> So, I've fixed, at least in my environment, the build files for the
> quickstartadb samples.  I changed the wsdl2java tasks in both
> generate.service and generate.client to inherently work from the same
> directory as the build by writing their output attribute path as
> follows:
>
> output="${basedir}/${build.dir}/client"
>
> I just added the basedir property.
>
> However, I'm still curious to know whether these build files work for
> other people???
>
>
>
> On 1/10/07, ChadDavis <ch...@gmail.com> wrote:
>> Okay.  So I went back and tried to do the ADB service with the ant
>> tasks.  I had previously build the service manually.  The ant task
>> doesn't work for the ADB service either.  Perhaps I've got something
>> set up wrong.  But in the interest of improving the build file . . .
>>
>> Here's the target to build the service.  Notice that the output folder
>> assigned to the WSDL2Java task is the exact same as the directory
>> indicated in the <ant ..> task.  The ant tasks wants to execute the
>> build.xml generated by the wsdl2java task.  And though it intuitively
>> seems like it should work, since they both point to
>> "${build.dir}/service", it doesn't work for me.  Note,
>> "${build.dir}/service" resolves, within the property space of the
>> executing ant task, to "build/service"
>>
>> What happens on my build is that the output from the wsdl2java task
>> resolves the directory for its output based upon the AXIS2_HOME ( I'm
>> not sure whether it gets it from the environment variable but that's
>> where it goes ).  So, the output from the wsdl2java task ends up going
>> to a AXIS2_HOME/build/service/ BUT the <ant . . . > task is looking at
>> its own local build/service ( which happens to be, in the case of the
>> quickstart example, AXIS2_HOME/samples/quickstartadb/build/service )
>> and it can't find the generated build.xml of course.
>>
>> So, the question is, how does the wsdl2java task resolve its output 
>> attribute?
>>
>> FYI, here's the whole generate.service target:
>>
>>   <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>
>>
>>
>> On 1/10/07, ChadDavis <ch...@gmail.com> wrote:
>> > Hello all.  I'm doing the ADB Client in the quickstart guide.  I am
>> > able to build the client manually ( wsdl2java from the command line ),
>> > but when I try to use the ant task to generate the client the task
>> > fails.  I doesn't produce a stub, and doesn't produce a build.xml.
>> > The only error ant gives is the complain that it can't find the
>> > build.xml file for the <ant . . /> task at the end of the target (
>> > generate.client).
>> >
>>
>
> ---------------------------------------------------------------------
> 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: problems with quick start

Posted by ChadDavis <ch...@gmail.com>.
Talking to myself.  But oh well.

So, I've fixed, at least in my environment, the build files for the
quickstartadb samples.  I changed the wsdl2java tasks in both
generate.service and generate.client to inherently work from the same
directory as the build by writing their output attribute path as
follows:

 output="${basedir}/${build.dir}/client"

I just added the basedir property.

However, I'm still curious to know whether these build files work for
other people???



On 1/10/07, ChadDavis <ch...@gmail.com> wrote:
> Okay.  So I went back and tried to do the ADB service with the ant
> tasks.  I had previously build the service manually.  The ant task
> doesn't work for the ADB service either.  Perhaps I've got something
> set up wrong.  But in the interest of improving the build file . . .
>
> Here's the target to build the service.  Notice that the output folder
> assigned to the WSDL2Java task is the exact same as the directory
> indicated in the <ant ..> task.  The ant tasks wants to execute the
> build.xml generated by the wsdl2java task.  And though it intuitively
> seems like it should work, since they both point to
> "${build.dir}/service", it doesn't work for me.  Note,
> "${build.dir}/service" resolves, within the property space of the
> executing ant task, to "build/service"
>
> What happens on my build is that the output from the wsdl2java task
> resolves the directory for its output based upon the AXIS2_HOME ( I'm
> not sure whether it gets it from the environment variable but that's
> where it goes ).  So, the output from the wsdl2java task ends up going
> to a AXIS2_HOME/build/service/ BUT the <ant . . . > task is looking at
> its own local build/service ( which happens to be, in the case of the
> quickstart example, AXIS2_HOME/samples/quickstartadb/build/service )
> and it can't find the generated build.xml of course.
>
> So, the question is, how does the wsdl2java task resolve its output attribute?
>
> FYI, here's the whole generate.service target:
>
>   <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>
>
>
> On 1/10/07, ChadDavis <ch...@gmail.com> wrote:
> > Hello all.  I'm doing the ADB Client in the quickstart guide.  I am
> > able to build the client manually ( wsdl2java from the command line ),
> > but when I try to use the ant task to generate the client the task
> > fails.  I doesn't produce a stub, and doesn't produce a build.xml.
> > The only error ant gives is the complain that it can't find the
> > build.xml file for the <ant . . /> task at the end of the target (
> > generate.client).
> >
>

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


Re: problems with quick start

Posted by ChadDavis <ch...@gmail.com>.
Okay.  So I went back and tried to do the ADB service with the ant
tasks.  I had previously build the service manually.  The ant task
doesn't work for the ADB service either.  Perhaps I've got something
set up wrong.  But in the interest of improving the build file . . .

Here's the target to build the service.  Notice that the output folder
assigned to the WSDL2Java task is the exact same as the directory
indicated in the <ant ..> task.  The ant tasks wants to execute the
build.xml generated by the wsdl2java task.  And though it intuitively
seems like it should work, since they both point to
"${build.dir}/service", it doesn't work for me.  Note,
"${build.dir}/service" resolves, within the property space of the
executing ant task, to "build/service"

What happens on my build is that the output from the wsdl2java task
resolves the directory for its output based upon the AXIS2_HOME ( I'm
not sure whether it gets it from the environment variable but that's
where it goes ).  So, the output from the wsdl2java task ends up going
to a AXIS2_HOME/build/service/ BUT the <ant . . . > task is looking at
its own local build/service ( which happens to be, in the case of the
quickstart example, AXIS2_HOME/samples/quickstartadb/build/service )
and it can't find the generated build.xml of course.

So, the question is, how does the wsdl2java task resolve its output attribute?

FYI, here's the whole generate.service target:

  <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>


On 1/10/07, ChadDavis <ch...@gmail.com> wrote:
> Hello all.  I'm doing the ADB Client in the quickstart guide.  I am
> able to build the client manually ( wsdl2java from the command line ),
> but when I try to use the ant task to generate the client the task
> fails.  I doesn't produce a stub, and doesn't produce a build.xml.
> The only error ant gives is the complain that it can't find the
> build.xml file for the <ant . . /> task at the end of the target (
> generate.client).
>

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