Hi,
Can any one tell how to write web service using generated files?
The steps I have followed to create a web services using Axis2c are
Generated files using the wsdl and it has operation with a request
string type and response a string type
Wsdl name as "myecho" with "echoString" as operation
<--class path details> org.apache.axis2.wsdl.WSDL2C -D
org.apache.adb.properties=org/apache/axis2/schema/c-schema-compile.prope
rties -uri myecho.wsdl -o genfiles -a -l c -d adb -ss -sd -u
Generated files axis2_skel_myecho.h
axis2_skel_myecho.c
axis2_svc_skel_myecho.c
And in src folder the files are axis2_echoString.h
axis2_echoStringResponse.h
axis2_echoString.c]
axis2_echoStringResponse.c
and a service.xml file
I have return my code as follows in the function
"axis2_echoStringResponse_t* axis2_skel_myecho_echoString (const
axis2_env_t *env ,
axis2_echoString_t*
echoString )" of file "axis2_skel_myecho.c "
{
axis2_echoString_t* echo_in = echoString;
axis2_echoStringResponse_t* echo_out = NULL;
char* echo_string = NULL;
/* retrieve the string input */
echo_string = AXIS2_ECHOSTRING_GET_PARAM0 ( echo_in,
env );
/* create the response and set the output string */
echo_out = axis2_echoStringResponse_create ( env );
AXIS2_ECHOSTRUCTRESPONSE_SET_RETURN ( echo_out, env,
echo_string );
return echo_out;
}
Compiled it compiled but gives linker error related to generated
functions.
Linking...
Creating library C:\Axis2cdll\myecho\Debug\myecho.lib and object
C:\Axis2cdll\myecho\Debug\myecho.exp
axis2_skel_myecho.obj : error LNK2019: unresolved external symbol
_AXIS2_ECHOSTRUCTRESPONSE_SET_RETURN referenced in function
_axis2_skel_myecho_echoString
axis2_skel_myecho.obj : error LNK2019: unresolved external symbol
_AXIS2_ECHOSTRING_GET_PARAM0 referenced in function
_axis2_skel_myecho_echoString
C:\Axis2cdll\myecho\Debug\myecho.dll : fatal error LNK1120: 2 unresolved
externals
I think axis2c user guide is incomplete.
It is not clear whether to use WSDL2C or WSDL2Code to generate C code.
The naming convention used in the generated
Files are not clear.
"Writing Web Services Skeleton Using Code Generator" from user gide,
topic is not clear to follow.
-Viji.
This e-mail and any files transmitted with it are for the sole use of the
intended recipient(s) and may contain confidential and privileged information.
If you are not the intended recipient, please contact the sender by reply
e-mail and destroy all copies of the original message.
Any unauthorized review, use, disclosure, dissemination, forwarding, printing
or copying of this email or any action taken in reliance on this e-mail is
strictly
prohibited and may be unlawful.