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 Barney Sperlin <bs...@yahoo.com> on 2011/11/07 21:10:58 UTC

Beginner's question about using java2wsdl

 
Hello,
    Following the quickstart tutorial for POJOs, using the StockQuoteService, I've been able to use the java2wsdl, ant generate.service, ant generate.client and ant run.client.  The aar file was moved into the appropriate tomcat folder and I could see it in http://localhost:8080/services/listServices.  The command line gave the expected output.
    However, trying the above with a simple Java program which I wrote in Eclipse doesn't even get started right.  The file, with a single class with main() in it, is in C:\javaprograms\GetHTML\src\gethtml.java so trying java2wsdl in a command line of my Windows XP:
c:\axis2-1.6.1-bin\axis2-1.6.1\bin>java2wsdl -cp \javaprograms\GetHTML\src\ -cn Get_html -of Get_html.wsdl

And all that comes back repeatedly is a listing of the proper format for java2wsdl.  I've tried different classpathes (such as ..\..\..\javaprograms\ etc. ) but the only error message is the improper formatting.  What needs to be done?
     Thanks,
           Barney

Re: Beginner's question about using java2wsdl

Posted by Shameera Rathnayaka <sh...@gmail.com>.
On Tue, Nov 8, 2011 at 9:13 PM, Barney Sperlin <bs...@yahoo.com> wrote:

> Thanks for taking the time to answer my question, Shameera, but the
> instruction that you suggest to do first is the one I can't get to work:
> java2wsdl.  When I go to the directory where the class is and type in the
> line with java2wsdl
>
> c:\javaprograms\Get_html>c:\axis2-1.6.1-bin\axis2-1.6.1\bin\java2wsdl -cp
> . -cn Get_html -of gethtml.wsdl
>
> Have you deployed your service successfully in axis2 ? and did you
download wsdl for your service?

If so pls try with -uri and -o options not with -cp , -cn and -of . And use
java2wsdl.bat instead of java2wsdl


>  I get the error: ClassNotFoundException and when I do that in the
> c:\axis2-1.6.1-bin\axis2-1.6.1\bin directory it is as I posted, getting the
> "usage" message returned.  So, I think I'm using the wrong paths for this
> attempt to make an aar file and any suggestions would be appreciated!
>      Thanks again,
>            Barney
>
>
> ------------------------------
> *From:* Shameera Rathnayaka <sh...@gmail.com>
> *To:* java-user@axis.apache.org; Barney Sperlin <bs...@yahoo.com>
> *Sent:* Tuesday, November 8, 2011 7:27 AM
> *Subject:* Re: Beginner's question about using java2wsdl
>
> HI Barney.
>
> First you need to create a GethHtml.aar file. Then deploy it putting
> service directory under repository in Axis2_home and run axis2server.bat .
> Now you can get wsdl for your service using
> http://localhost:8080/services/GetHtml<http://localhost:8080/services/listServices>
> save it as GetHtml.wsdl. Ok try with below command
>
> c:\axis2-1.6.1-bin\axis2-1.6.1\bin>java2wsdl -uri
> <path_to_the_GetHtml.wsdl> -o <path_to_the_output_dir>
>
> above -uri and -o both are options you can find all option here<http://axis.apache.org/axis2/java/core/tools/CodegenToolReference.html#cmdref>
>
> On Tue, Nov 8, 2011 at 1:40 AM, Barney Sperlin <bs...@yahoo.com>wrote:
>
>
> Hello,
>     Following the quickstart tutorial for POJOs, using the
> StockQuoteService, I've been able to use the java2wsdl, ant
> generate.service, ant generate.client and ant run.client.  The aar file was
> moved into the appropriate tomcat folder and I could see it in
> http://localhost:8080/services/listServices.  The command line gave the
> expected output.
>     However, trying the above with a simple Java program which I wrote in
> Eclipse doesn't even get started right.  The file, with a single class with
> main() in it, is in C:\javaprograms\GetHTML\src\gethtml.java so trying
> java2wsdl in a command line of my Windows XP:
> c:\axis2-1.6.1-bin\axis2-1.6.1\bin>java2wsdl -cp
> \javaprograms\GetHTML\src\ -cn Get_html -of Get_html.wsdl
>
> And all that comes back repeatedly is a listing of the proper format for
> java2wsdl.  I've tried different classpathes (such as
> ..\..\..\javaprograms\ etc. ) but the only error message is the improper
> formatting.  What needs to be done?
>      Thanks,
>            Barney
>
>
>
>
> --
> Shameera Rathnayaka
> Undergraduate
> Department of Computer Science and Engineering
> University of Moratuwa.
> Sri Lanka.
>
> Blog : http://shameerarathnayaka.blogspot.com/
>
>
>
>


-- 
Shameera Rathnayaka
Undergraduate
Department of Computer Science and Engineering
University of Moratuwa.
Sri Lanka.

Blog : http://shameerarathnayaka.blogspot.com/

Re: Beginner's question about using java2wsdl

Posted by Shameera Rathnayaka <sh...@gmail.com>.
OOPS , i was thinking wsdl2java when you were asking java2wsdl.

On Tue, Nov 8, 2011 at 11:41 PM, Barney Sperlin <bs...@yahoo.com>wrote:

>
> Hi,
>      Rolling the stone a little farther up the hill:
> I have created a wsdl with the following command:
>
> c:\JavaPrograms\GetHTML>%AXIS2_HOME%\bin\java2wsdl -cp bin -cn Get_html
> -of Get_html.wsdl
>
> where the class is named Get_html.  This produces a wsdl of size 7k.
>
> Now, however, the next step, "ant generate.service" complains about a
> missing build.xml file.  Of course the samples example that I ran before,
> StockQuoteService, had this.  Where does it come from?
>
>      Thanks,
>            Barney
>
>
> ------------------------------
> *From:* Barney Sperlin <bs...@yahoo.com>
> *To:* "java-user@axis.apache.org" <ja...@axis.apache.org>
> *Sent:* Tuesday, November 8, 2011 10:43 AM
>
> *Subject:* Re: Beginner's question about using java2wsdl
>
> Thanks for taking the time to answer my question, Shameera, but the
> instruction that you suggest to do first is the one I can't get to work:
> java2wsdl.  When I go to the directory where the class is and type in the
> line with java2wsdl
>
> c:\javaprograms\Get_html>c:\axis2-1.6.1-bin\axis2-1.6.1\bin\java2wsdl -cp
> . -cn Get_html -of gethtml.wsdl
>
>  I get the error: ClassNotFoundException and when I do that in the
> c:\axis2-1.6.1-bin\axis2-1.6.1\bin directory it is as I posted, getting the
> "usage" message returned.  So, I think I'm using the wrong paths for this
> attempt to make an aar file and any suggestions would be appreciated!
>      Thanks again,
>            Barney
>
>
> ------------------------------
> *From:* Shameera Rathnayaka <sh...@gmail.com>
> *To:* java-user@axis.apache.org; Barney Sperlin <bs...@yahoo.com>
> *Sent:* Tuesday, November 8, 2011 7:27 AM
> *Subject:* Re: Beginner's question about using java2wsdl
>
> HI Barney.
>
> First you need to create a GethHtml.aar file. Then deploy it putting
> service directory under repository in Axis2_home and run axis2server.bat .
> Now you can get wsdl for your service using
> http://localhost:8080/services/GetHtml<http://localhost:8080/services/listServices>
> save it as GetHtml.wsdl. Ok try with below command
>
> c:\axis2-1.6.1-bin\axis2-1.6.1\bin>java2wsdl -uri
> <path_to_the_GetHtml.wsdl> -o <path_to_the_output_dir>
>
> above -uri and -o both are options you can find all option here<http://axis.apache.org/axis2/java/core/tools/CodegenToolReference.html#cmdref>
>
> On Tue, Nov 8, 2011 at 1:40 AM, Barney Sperlin <bs...@yahoo.com>wrote:
>
>
> Hello,
>     Following the quickstart tutorial for POJOs, using the
> StockQuoteService, I've been able to use the java2wsdl, ant
> generate.service, ant generate.client and ant run.client.  The aar file was
> moved into the appropriate tomcat folder and I could see it in
> http://localhost:8080/services/listServices.  The command line gave the
> expected output.
>     However, trying the above with a simple Java program which I wrote in
> Eclipse doesn't even get started right.  The file, with a single class with
> main() in it, is in C:\javaprograms\GetHTML\src\gethtml.java so trying
> java2wsdl in a command line of my Windows XP:
> c:\axis2-1.6.1-bin\axis2-1.6.1\bin>java2wsdl -cp
> \javaprograms\GetHTML\src\ -cn Get_html -of Get_html.wsdl
>
> And all that comes back repeatedly is a listing of the proper format for
> java2wsdl.  I've tried different classpathes (such as
> ..\..\..\javaprograms\ etc. ) but the only error message is the improper
> formatting.  What needs to be done?
>      Thanks,
>            Barney
>
>
>
>
> --
> Shameera Rathnayaka
> Undergraduate
> Department of Computer Science and Engineering
> University of Moratuwa.
> Sri Lanka.
>
> Blog : http://shameerarathnayaka.blogspot.com/
>
>
>
>
>
>


-- 
Shameera Rathnayaka
Undergraduate
Department of Computer Science and Engineering
University of Moratuwa.
Sri Lanka.

Blog : http://shameerarathnayaka.blogspot.com/

Re: Beginner's question about using java2wsdl

Posted by Barney Sperlin <bs...@yahoo.com>.
 
Hi,
     Rolling the stone a little farther up the hill:
I have created a wsdl with the following command:

c:\JavaPrograms\GetHTML>%AXIS2_HOME%\bin\java2wsdl -cp bin -cn Get_html -of Get_html.wsdl

where the class is named Get_html.  This produces a wsdl of size 7k.

Now, however, the next step, "ant generate.service" complains about a missing build.xml file.  Of course the samples example that I ran before, StockQuoteService, had this.  Where does it come from?

     Thanks,
           Barney



________________________________
From: Barney Sperlin <bs...@yahoo.com>
To: "java-user@axis.apache.org" <ja...@axis.apache.org>
Sent: Tuesday, November 8, 2011 10:43 AM
Subject: Re: Beginner's question about using java2wsdl


Thanks for taking the time to answer my question, Shameera, but the instruction that you suggest to do first is the one I can't get to work: java2wsdl.  When I go to the directory where the class is and type in the line with java2wsdl 

c:\javaprograms\Get_html>c:\axis2-1.6.1-bin\axis2-1.6.1\bin\java2wsdl -cp . -cn Get_html -of gethtml.wsdl

 I get the error: ClassNotFoundException and when I do that in the c:\axis2-1.6.1-bin\axis2-1.6.1\bin directory it is as I posted, getting the "usage" message returned.  So, I think I'm using the wrong paths for this attempt to make an aar file and any suggestions would be appreciated!
     Thanks again,
           Barney



________________________________
From: Shameera Rathnayaka <sh...@gmail.com>
To: java-user@axis.apache.org; Barney Sperlin <bs...@yahoo.com>
Sent: Tuesday, November 8, 2011 7:27 AM
Subject: Re: Beginner's question about using java2wsdl


HI Barney.

First you need to create a GethHtml.aar file. Then deploy it putting service directory under repository in Axis2_home and run axis2server.bat . Now you can get wsdl for your service using  http://localhost:8080/services/GetHtml  save it as GetHtml.wsdl. Ok try with below command  

c:\axis2-1.6.1-bin\axis2-1.6.1\bin>java2wsdl -uri <path_to_the_GetHtml.wsdl> -o <path_to_the_output_dir> 

above -uri and -o both are options you can find all option here        


On Tue, Nov 8, 2011 at 1:40 AM, Barney Sperlin <bs...@yahoo.com> wrote:

 
>Hello,
>    Following the quickstart tutorial for POJOs, using the StockQuoteService, I've been able to use the java2wsdl, ant generate.service, ant generate.client and ant run.client.  The aar file was moved into the appropriate tomcat folder and I could see it in http://localhost:8080/services/listServices.  The command line gave the expected output.
>    However, trying the above with a simple Java program which I wrote in Eclipse doesn't even get started right.  The file, with a single class with main() in it, is in C:\javaprograms\GetHTML\src\gethtml.java so trying java2wsdl in a command line of my Windows XP:
>c:\axis2-1.6.1-bin\axis2-1.6.1\bin>java2wsdl -cp \javaprograms\GetHTML\src\ -cn Get_html -of Get_html.wsdl
>
>
>And all that comes back repeatedly is a listing of the proper format for java2wsdl.  I've tried different classpathes (such as ..\..\..\javaprograms\ etc. ) but the only error message is the improper formatting.  What needs to be done?
>     Thanks,
>           Barney
>


-- 
Shameera Rathnayaka
Undergraduate
Department of Computer Science and Engineering
University of Moratuwa.
Sri Lanka.

Blog : http://shameerarathnayaka.blogspot.com/

Re: Beginner's question about using java2wsdl

Posted by Barney Sperlin <bs...@yahoo.com>.
Thanks for taking the time to answer my question, Shameera, but the instruction that you suggest to do first is the one I can't get to work: java2wsdl.  When I go to the directory where the class is and type in the line with java2wsdl 

c:\javaprograms\Get_html>c:\axis2-1.6.1-bin\axis2-1.6.1\bin\java2wsdl -cp . -cn Get_html -of gethtml.wsdl

 I get the error: ClassNotFoundException and when I do that in the c:\axis2-1.6.1-bin\axis2-1.6.1\bin directory it is as I posted, getting the "usage" message returned.  So, I think I'm using the wrong paths for this attempt to make an aar file and any suggestions would be appreciated!
     Thanks again,
           Barney



________________________________
From: Shameera Rathnayaka <sh...@gmail.com>
To: java-user@axis.apache.org; Barney Sperlin <bs...@yahoo.com>
Sent: Tuesday, November 8, 2011 7:27 AM
Subject: Re: Beginner's question about using java2wsdl


HI Barney.

First you need to create a GethHtml.aar file. Then deploy it putting service directory under repository in Axis2_home and run axis2server.bat . Now you can get wsdl for your service using  http://localhost:8080/services/GetHtml  save it as GetHtml.wsdl. Ok try with below command  

c:\axis2-1.6.1-bin\axis2-1.6.1\bin>java2wsdl -uri <path_to_the_GetHtml.wsdl> -o <path_to_the_output_dir> 

above -uri and -o both are options you can find all option here        


On Tue, Nov 8, 2011 at 1:40 AM, Barney Sperlin <bs...@yahoo.com> wrote:

 
>Hello,
>    Following the quickstart tutorial for POJOs, using the StockQuoteService, I've been able to use the java2wsdl, ant generate.service, ant generate.client and ant run.client.  The aar file was moved into the appropriate tomcat folder and I could see it in http://localhost:8080/services/listServices.  The command line gave the expected output.
>    However, trying the above with a simple Java program which I wrote in Eclipse doesn't even get started right.  The file, with a single class with main() in it, is in C:\javaprograms\GetHTML\src\gethtml.java so trying java2wsdl in a command line of my Windows XP:
>c:\axis2-1.6.1-bin\axis2-1.6.1\bin>java2wsdl -cp \javaprograms\GetHTML\src\ -cn Get_html -of Get_html.wsdl
>
>
>And all that comes back repeatedly is a listing of the proper format for java2wsdl.  I've tried different classpathes (such as ..\..\..\javaprograms\ etc. ) but the only error message is the improper formatting.  What needs to be done?
>     Thanks,
>           Barney
>


-- 
Shameera Rathnayaka
Undergraduate
Department of Computer Science and Engineering
University of Moratuwa.
Sri Lanka.

Blog : http://shameerarathnayaka.blogspot.com/

Re: Beginner's question about using java2wsdl

Posted by Shameera Rathnayaka <sh...@gmail.com>.
HI Barney.

First you need to create a GethHtml.aar file. Then deploy it putting
service directory under repository in Axis2_home and run axis2server.bat .
Now you can get wsdl for your service using
http://localhost:8080/services/GetHtml<http://localhost:8080/services/listServices>
save it as GetHtml.wsdl. Ok try with below command

c:\axis2-1.6.1-bin\axis2-1.6.1\bin>java2wsdl -uri
<path_to_the_GetHtml.wsdl> -o <path_to_the_output_dir>

above -uri and -o both are options you can find all option
here<http://axis.apache.org/axis2/java/core/tools/CodegenToolReference.html#cmdref>

On Tue, Nov 8, 2011 at 1:40 AM, Barney Sperlin <bs...@yahoo.com> wrote:

>
> Hello,
>     Following the quickstart tutorial for POJOs, using the
> StockQuoteService, I've been able to use the java2wsdl, ant
> generate.service, ant generate.client and ant run.client.  The aar file was
> moved into the appropriate tomcat folder and I could see it in
> http://localhost:8080/services/listServices.  The command line gave the
> expected output.
>     However, trying the above with a simple Java program which I wrote in
> Eclipse doesn't even get started right.  The file, with a single class with
> main() in it, is in C:\javaprograms\GetHTML\src\gethtml.java so trying
> java2wsdl in a command line of my Windows XP:
> c:\axis2-1.6.1-bin\axis2-1.6.1\bin>java2wsdl -cp
> \javaprograms\GetHTML\src\ -cn Get_html -of Get_html.wsdl
>
> And all that comes back repeatedly is a listing of the proper format for
> java2wsdl.  I've tried different classpathes (such as
> ..\..\..\javaprograms\ etc. ) but the only error message is the improper
> formatting.  What needs to be done?
>      Thanks,
>            Barney
>
>


-- 
Shameera Rathnayaka
Undergraduate
Department of Computer Science and Engineering
University of Moratuwa.
Sri Lanka.

Blog : http://shameerarathnayaka.blogspot.com/