You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-user@axis.apache.org by Subra A Narayanan <as...@gmail.com> on 2007/08/09 01:51:57 UTC

Unable to run client code

Hello folks,

I am trying to write a client using Axis2/C to connect to a Axis2/C web
service. These are the steps I followed

1. Created a wsdl file by hand for my web service.

2. Used the WSDL2C tool to generate the client stubs. Here is the command I
used

java org.apache.axis2.wsdl.WSDL2C -D
org.apache.adb.properties=/org/apache/axis2/schema/c-schema-compile.properties-uri
myservice.wsdl -l c -d none

3. Added code to the generated .c file

4. Compiled the client code using the following command

gcc -o hello_clnt -I /usr/local/axis2c/include/axis2-1.1/ -L
/usr/local/axis2c/lib/ -l axutil -l axis2_engine axis2_stub_myservice.c

5. Tried running the client and got this error

./hello_clnt: error while loading shared libraries: libaxutil.so.0: cannot
open shared object file: No such file or directory


What am I doing wrong? Am I missing any compiler options?

Thank you everyone for the help!


Subra

Re: Unable to run client code

Posted by Subra A Narayanan <as...@gmail.com>.
That was it! It works now.

Thanks!

On 8/8/07, Samisa Abeysinghe <sa...@wso2.com> wrote:
>
> Subra A Narayanan wrote:
> > Hello folks,
> >
> > I am trying to write a client using Axis2/C to connect to a Axis2/C
> > web service. These are the steps I followed
> >
> > 1. Created a wsdl file by hand for my web service.
> >
> > 2. Used the WSDL2C tool to generate the client stubs. Here is the
> > command I used
> >
> > java org.apache.axis2.wsdl.WSDL2C -D
> >
> org.apache.adb.properties=/org/apache/axis2/schema/c-schema-compile.properties
> > -uri myservice.wsdl -l c -d none
> >
> > 3. Added code to the generated .c file
> >
> > 4. Compiled the client code using the following command
> >
> > gcc -o hello_clnt -I /usr/local/axis2c/include/axis2-1.1/ -L
> > /usr/local/axis2c/lib/ -l axutil -l axis2_engine axis2_stub_myservice.c
> >
> > 5. Tried running the client and got this error
> >
> > ./hello_clnt: error while loading shared libraries: libaxutil.so.0:
> > cannot open shared object file: No such file or directory
> You probably need to add your Axis2/C lib folder to LD_LIBRARY_PATH
> environment variable.
> e.g. If you have installed Axis2/C to /usr/local/axis2c
> then you will find the .so files in /usr/local/axis2c/lib, hence you can
> use:
> export LD_LIBRARY_PATH=/usr/local/axis2c/lib:$LD_LIBRARY_PATH
>
> HTH
>
> Samisa...
>
> >
> >
> > What am I doing wrong? Am I missing any compiler options?
> >
> > Thank you everyone for the help!
> >
> >
> > Subra
>
>
> --
> Samisa Abeysinghe : http://www.wso2.org/ (WSO2 Oxygen Tank - Web Services
> Developers' Portal)
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-c-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-c-user-help@ws.apache.org
>
>

Re: Unable to run client code

Posted by Samisa Abeysinghe <sa...@wso2.com>.
Subra A Narayanan wrote:
> Hello folks,
>
> I am trying to write a client using Axis2/C to connect to a Axis2/C 
> web service. These are the steps I followed
>
> 1. Created a wsdl file by hand for my web service.
>
> 2. Used the WSDL2C tool to generate the client stubs. Here is the 
> command I used
>
> java org.apache.axis2.wsdl.WSDL2C -D 
> org.apache.adb.properties=/org/apache/axis2/schema/c-schema-compile.properties 
> -uri myservice.wsdl -l c -d none
>
> 3. Added code to the generated .c file
>
> 4. Compiled the client code using the following command
>
> gcc -o hello_clnt -I /usr/local/axis2c/include/axis2-1.1/ -L 
> /usr/local/axis2c/lib/ -l axutil -l axis2_engine axis2_stub_myservice.c
>
> 5. Tried running the client and got this error
>
> ./hello_clnt: error while loading shared libraries: libaxutil.so.0: 
> cannot open shared object file: No such file or directory
You probably need to add your Axis2/C lib folder to LD_LIBRARY_PATH 
environment variable.
e.g. If you have installed Axis2/C to /usr/local/axis2c
then you will find the .so files in /usr/local/axis2c/lib, hence you can 
use:
export LD_LIBRARY_PATH=/usr/local/axis2c/lib:$LD_LIBRARY_PATH

HTH

Samisa...

>
>
> What am I doing wrong? Am I missing any compiler options?
>
> Thank you everyone for the help!
>
>
> Subra 


-- 
Samisa Abeysinghe : http://www.wso2.org/ (WSO2 Oxygen Tank - Web Services Developers' Portal)


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