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 Ignazio Anastasi <cr...@gmail.com> on 2006/08/30 22:25:08 UTC

[Axis2] Develop Client

Hi all

i'm a newbie :-)

i need help to develop the client of the example in this site
http://www.wso2.net/tutorials/axis2/java/2006/05/29/hello-world

however.. how can i run a client? it should be runned from an axis2
directory? how can i build a run.bat file correctly'

tnx

Re: [Axis2] Develop Client

Posted by Ignazio Anastasi <cr...@gmail.com>.
that's my error.

Exception in thread main: java.lang.NoClassDefFoundError:
org/apache/axis2/Client


:-/


for kumar. where should i put that file? what name?

Re: [Axis2] Develop Client

Posted by Ajith Ranabahu <aj...@gmail.com>.
Hi,
You should have the AXIS2_HOME environment variable pointing to the
AXIS2 directory. if you run the bat files from where they are  (the
bin directory) and the AXIS2_HOME is not set it tries to guess the
value of AXIS2_HOME by going to the parent directory.

Ajith

On 8/30/06, Kumar, Amit Z (Compliance Tech) <am...@gs.com> wrote:
>
>
> Use this ant target and replace "Red" comments as per your local machine
> setting. It will generate client jar foe you. Put this jar in your classpath
> to run your test client.
>
>
>
> <target name="WebServiceStub" >
>  <echo message="generating client src..."/>
>  <java classname="org.apache.axis2.wsdl.WSDL2Java" fork="true">
>   <classpath>
>       <fileset dir=" path to axis2 lib ">
>    <include name="**/*.jar"/>
>       </fileset>
>   </classpath>
>   <arg value="-uri"/>
>   <arg line=" url for wsdl "/>
>   <arg value="-s"/>
>   <arg value="-d"/>
>   <arg value="xmlbeans"/>
>   <arg value="-o"/>
>   <arg file=" src directory "/>
>   <arg value="-p"/>
>   <arg value=" any package name "/>
>  </java>
>
>  <echo message="compiling client src..."/>
>  <javac srcdir=" src directory /src" destdir=" build directory ">
>   <classpath>
>       <fileset dir=" path to axis2 lib ">
>    <include name="**/*.jar"/>
>       </fileset>
>   </classpath>
>  </javac>
>
>  <copy todir="build directory">
>   <fileset dir=" src directory /resources/"/>
>  </copy>
>
>  <jar jarfile="YourWebService_stub.jar" basedir=" build directory "/>
>
>  <delete dir=" build directory "/>
>
>   </target>
>
>
> I hope, it will help.
>
> Regards
> Amit
> 30, Hudson St.
> Goldman Sachs
> PH: 212 902 0395
>
> "Willing to learn what you are willing to share."
>
>
>
>  ________________________________
>  From: Ignazio Anastasi [mailto:craig.doppiaeffe@gmail.com]
> Sent: Wednesday, August 30, 2006 4:25 PM
> To: axis-user
> Subject: [Axis2] Develop Client
>
>
> Hi all
>
> i'm a newbie :-)
>
> i need help to develop the client of the example in this site
> http://www.wso2.net/tutorials/axis2/java/2006/05/29/hello-world
>
> however.. how can i run a client? it should be runned from an axis2
> directory? how can i build a run.bat file correctly'
>
> tnx
>
>
>


-- 
Ajith Ranabahu

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


RE: [Axis2] Develop Client

Posted by "Kumar, Amit Z (Compliance Tech)" <am...@gs.com>.
Use this ant target and replace "Red" comments as per your local machine
setting. It will generate client jar foe you. Put this jar in your
classpath to run your test client.

	 
	 
	<target name="WebServiceStub" >
	 <echo message="generating client src..."/>
	 <java classname="org.apache.axis2.wsdl.WSDL2Java" fork="true">
	  <classpath>
	      <fileset dir=" path to axis2 lib ">
	   <include name="**/*.jar"/>
	      </fileset>
	  </classpath>      
	  <arg value="-uri"/>
	  <arg line=" url for wsdl "/>
	  <arg value="-s"/>
	  <arg value="-d"/>
	  <arg value="xmlbeans"/>
	  <arg value="-o"/>
	  <arg file=" src directory "/>
	  <arg value="-p"/>
	  <arg value=" any package name "/>
	 </java>
	 
	 <echo message="compiling client src..."/>     
	 <javac srcdir=" src directory /src" destdir=" build directory
">
	  <classpath>
	      <fileset dir=" path to axis2 lib ">
	   <include name="**/*.jar"/>
	      </fileset>             
	  </classpath>
	 </javac>  
	 
	 <copy todir="build directory">
	  <fileset dir=" src directory /resources/"/>
	 </copy>
	  
	 <jar jarfile="YourWebService_stub.jar" basedir=" build
directory "/>
	 
	 <delete dir=" build directory "/>
	 
	  </target> 
	 
	 
	I hope, it will help.

	Regards 
	Amit 
	30, Hudson St. 
	Goldman Sachs 
	PH: 212 902 0395 

	"Willing to learn what you are willing to share."

	 


________________________________

		From: Ignazio Anastasi
[mailto:craig.doppiaeffe@gmail.com] 
		Sent: Wednesday, August 30, 2006 4:25 PM
		To: axis-user
		Subject: [Axis2] Develop Client
		
		
		Hi all
		
		i'm a newbie :-)
		
		i need help to develop the client of the example in this
site http://www.wso2.net/tutorials/axis2/java/2006/05/29/hello-world
		
		however.. how can i run a client? it should be runned
from an axis2 directory? how can i build a run.bat file correctly'
		
		tnx
		


RE: [Axis2] Develop Client

Posted by "Kumar, Amit Z (Compliance Tech)" <am...@gs.com>.
Use this ant target and replace "Red" comments as per your local machine
setting. It will generate client jar foe you. Put this jar in your
classpath to run your test client.
 
 
<target name="WebServiceStub" >
 <echo message="generating client src..."/>
 <java classname="org.apache.axis2.wsdl.WSDL2Java" fork="true">
  <classpath>
      <fileset dir=" path to axis2 lib ">
   <include name="**/*.jar"/>
      </fileset>
  </classpath>      
  <arg value="-uri"/>
  <arg line=" url for wsdl "/>
  <arg value="-s"/>
  <arg value="-d"/>
  <arg value="xmlbeans"/>
  <arg value="-o"/>
  <arg file=" src directory "/>
  <arg value="-p"/>
  <arg value=" any package name "/>
 </java>
 
 <echo message="compiling client src..."/>     
 <javac srcdir=" src directory /src" destdir=" build directory ">
  <classpath>
      <fileset dir=" path to axis2 lib ">
   <include name="**/*.jar"/>
      </fileset>             
  </classpath>
 </javac>  
 
 <copy todir="build directory">
  <fileset dir=" src directory /resources/"/>
 </copy>
  
 <jar jarfile="YourWebService_stub.jar" basedir=" build directory "/>
 
 <delete dir=" build directory "/>
 
  </target> 
 
 
I hope, it will help.

Regards 
Amit 
30, Hudson St. 
Goldman Sachs 
PH: 212 902 0395 

"Willing to learn what you are willing to share."

 


________________________________

	From: Ignazio Anastasi [mailto:craig.doppiaeffe@gmail.com] 
	Sent: Wednesday, August 30, 2006 4:25 PM
	To: axis-user
	Subject: [Axis2] Develop Client
	
	
	Hi all
	
	i'm a newbie :-)
	
	i need help to develop the client of the example in this site
http://www.wso2.net/tutorials/axis2/java/2006/05/29/hello-world
	
	however.. how can i run a client? it should be runned from an
axis2 directory? how can i build a run.bat file correctly'
	
	tnx