Re: dll description has invalid state

2007-03-06 Thread Milinda Pathirage

hi,
Please try to compile the source after replacing

AXIS2_EXTERN int AXIS2_CALL
   axis2_get_instance(struct axis2_svc_skeleton **inst,
   const axis2_env_t *env)
   {
 ...
   }

AXIS2_EXTERN int AXIS2_CALL
   axis2_remove_instance(axis2_svc_skeleton_t *inst,
   const axis2_env_t *env)
   {
 ...
   }

to

AXIS2_EXTERN int
axis2_get_instance(axis2_svc_skeleton_t **inst,
   const axis2_env_t *env) {
...
}


AXIS2_EXTERN int
axis2_remove_instance(axis2_svc_skeleton_t *inst,
   const axis2_env_t *env) {
...
}

Also it's better if you can use the current Axis2/C trunk.

Thnaks
Milinda




On 3/6/07, Zoltán Altfatter [EMAIL PROTECTED] wrote:


Hi Milinda,

Yes, you're right about that functions, there is something wrong with
them.

I found out something. In Microsoft Visual Studio I build the project like
Win32 application, and building this way the sample echo service from
Axis2/C and dll created is ok, meaning that I can connect to that with a
Java client using Axis2/Java.

I tried also this with my generated SayHelloService service.
But unfortunately has compile errors which I don't understand:

error C2491: 'axis2_get_instance' : definition of dllimport function not
allowed
error C2491: 'axis2_remove_instance' : definition of dllimport function
not allowed

The generated axis2_get_instance and axis2_remove_instance functions look
like the following:

AXIS2_EXTERN int AXIS2_CALL
axis2_get_instance(struct axis2_svc_skeleton **inst,
const axis2_env_t *env)
{
  ...
}

AXIS2_EXTERN int AXIS2_CALL
axis2_remove_instance(axis2_svc_skeleton_t *inst,
const axis2_env_t *env)
{
  ...
}

I don't understand the AXIS2_EXTERN and AXIS2_CALL what are those...

The axis2_get_instance and axis2_remove_instance functions from sample
echo service from AXIS2/C look different:

AXIS2_EXPORT int
axis2_get_instance(axis2_svc_skeleton_t **inst,
const axis2_env_t *env) {
...
}


AXIS2_EXPORT int
axis2_remove_instance(axis2_svc_skeleton_t *inst,
const axis2_env_t *env) {
...
}

I've attached the generated files to this mail.

Could you check them?
Thank you.

Zoli

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





--
[EMAIL PROTECTED]
WSO2, Inc: http://www.wso2.com Oxygenating the Web Service Platform
http://www.milindalakmal.wordpress.com


Re: dll description has invalid state

2007-03-06 Thread Nandika Jayawardana

Hi Zoli,

AXIS2_EXTERN means whether the function is exported or not from the dll and
AXIS2_CALL is the calling convention of the function. On windows AXIS2_CALL
is expanded as __stdcall and AXIS2_EXTERN as __declspec(dllexport).You can
find more on this by looking at the header file axis2_utils_defines.h.
  When there is AXIS2_CALL in the function, LoadLibrary() function, which
is used to load the dll fails.

Regards,
Nandika




On 3/6/07, Milinda Pathirage [EMAIL PROTECTED] wrote:


hi,
Please try to compile the source after replacing

AXIS2_EXTERN int AXIS2_CALL
axis2_get_instance(struct axis2_svc_skeleton **inst,
const axis2_env_t *env)
{
  ...
}

AXIS2_EXTERN int AXIS2_CALL
axis2_remove_instance(axis2_svc_skeleton_t *inst,
const axis2_env_t *env)
{
  ...
}

to

AXIS2_EXTERN int
axis2_get_instance(axis2_svc_skeleton_t **inst,
const axis2_env_t *env) {
...
}


AXIS2_EXTERN int
axis2_remove_instance(axis2_svc_skeleton_t *inst,
const axis2_env_t *env) {
...
}

Also it's better if you can use the current Axis2/C trunk.

Thnaks
Milinda




On 3/6/07, Zoltán Altfatter [EMAIL PROTECTED] wrote:

 Hi Milinda,

 Yes, you're right about that functions, there is something wrong with
 them.

 I found out something. In Microsoft Visual Studio I build the project
 like Win32 application, and building this way the sample echo service from
 Axis2/C and dll created is ok, meaning that I can connect to that with a
 Java client using Axis2/Java.

 I tried also this with my generated SayHelloService service.
 But unfortunately has compile errors which I don't understand:

 error C2491: 'axis2_get_instance' : definition of dllimport function not
 allowed
 error C2491: 'axis2_remove_instance' : definition of dllimport function
 not allowed

 The generated axis2_get_instance and axis2_remove_instance functions
 look like the following:

 AXIS2_EXTERN int AXIS2_CALL
 axis2_get_instance(struct axis2_svc_skeleton **inst,
 const axis2_env_t *env)
 {
   ...
 }

 AXIS2_EXTERN int AXIS2_CALL
 axis2_remove_instance(axis2_svc_skeleton_t *inst,
 const axis2_env_t *env)
 {
   ...
 }

 I don't understand the AXIS2_EXTERN and AXIS2_CALL what are those...

 The axis2_get_instance and axis2_remove_instance functions from sample
 echo service from AXIS2/C look different:

 AXIS2_EXPORT int
 axis2_get_instance(axis2_svc_skeleton_t **inst,
 const axis2_env_t *env) {
 ...
 }


 AXIS2_EXPORT int
 axis2_remove_instance(axis2_svc_skeleton_t *inst,
 const axis2_env_t *env) {
 ...
 }

 I've attached the generated files to this mail.

 Could you check them?
 Thank you.

 Zoli

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




--
[EMAIL PROTECTED]
WSO2, Inc: http://www.wso2.com Oxygenating the Web Service Platform
http://www.milindalakmal.wordpress.com





--
[EMAIL PROTECTED]
WSO2 INC www.wso2.com


Re: dll description has invalid state

2007-03-06 Thread Supun Kamburugamuva

Hi,

error C2491: 'axis2_get_instance' : definition of dllimport function
not allowed
error C2491: 'axis2_remove_instance' : definition of dllimport
function not allowed

These errors are cuased by not declaring the AXIS2_DECLARE_EXPORT as a
preprocessor derective.
If this preprocessor derective is not defined AXIS2_EXTERN beomes a
__declspec(dllimport) . That is what causing the error.

If the AXIS2_DECLARE_EXPORT is defined AXIS2_EXTERN becomes
__declspec(dllexport). In a service we want to export these two
functions. So this is what we require. All this mappings are in the
axis2c/utils/include/axis2_utils_defines.h.

The best way to add this preprocessor derective is to declare it in
the VC project properties. (project properties-configuration
properties-c/c++ - preprocessor - pre processor definitions). The
other services also has this preprocessor derective in the project
properties.

Supun.

On 3/6/07, Milinda Pathirage [EMAIL PROTECTED] wrote:

hi,
Please try to compile the source after replacing

AXIS2_EXTERN int AXIS2_CALL
axis2_get_instance(struct axis2_svc_skeleton **inst,
const axis2_env_t *env)
{
  ...
}

AXIS2_EXTERN int AXIS2_CALL
axis2_remove_instance(axis2_svc_skeleton_t *inst,
const axis2_env_t *env)
{
  ...
}

to

AXIS2_EXTERN int
axis2_get_instance(axis2_svc
_skeleton_t **inst,
const axis2_env_t *env) {
...
}


AXIS2_EXTERN int
axis2_remove_instance(axis2_svc_skeleton_t *inst,
const axis2_env_t *env) {
...
}

Also it's better if you can use the current Axis2/C trunk.

Thnaks
Milinda





On 3/6/07, Zoltán Altfatter [EMAIL PROTECTED] wrote:

 Hi Milinda,

 Yes, you're right about that functions, there is something wrong with
them.

 I found out something. In Microsoft Visual Studio I build the project like
Win32 application, and building this way the sample echo service from
Axis2/C and dll created is ok, meaning that I can connect to that with a
Java client using Axis2/Java.

 I tried also this with my generated SayHelloService service.
 But unfortunately has compile errors which I don't understand:

 error C2491: 'axis2_get_instance' : definition of dllimport function not
allowed
 error C2491: 'axis2_remove_instance' : definition of dllimport function
not allowed

 The generated axis2_get_instance and axis2_remove_instance functions look
like the following:

 AXIS2_EXTERN int AXIS2_CALL
 axis2_get_instance(struct axis2_svc_skeleton **inst,
 const axis2_env_t *env)
 {
   ...
 }

 AXIS2_EXTERN int AXIS2_CALL
 axis2_remove_instance(axis2_svc_skeleton_t *inst,
 const axis2_env_t *env)
 {
   ...
 }

 I don't understand the AXIS2_EXTERN and AXIS2_CALL what are those...

 The axis2_get_instance and axis2_remove_instance functions from sample
echo service from AXIS2/C look different:

 AXIS2_EXPORT int
 axis2_get_instance(axis2_svc_skeleton_t **inst,
 const axis2_env_t *env) {
 ...
 }


 AXIS2_EXPORT int
 axis2_remove_instance(axis2_svc_skeleton_t *inst,
 const axis2_env_t *env) {
 ...
 }

 I've attached the generated files to this mail.

 Could you check them?
 Thank you.

 Zoli


-
 To unsubscribe, e-mail:
[EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]





--
[EMAIL PROTECTED]
WSO2, Inc: http://www.wso2.com Oxygenating the Web Service Platform
http://www.milindalakmal.wordpress.com


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: dll description has invalid state

2007-03-05 Thread Milinda Pathirage

Hi,
I think this is beacuase of the problems in generated
axis2_svc_skel_name.c and header file's


axis2_get_instance(struct axis2_svc_skeleton **inst,
   const axis2_env_t *env)

axis2_remove_instance(axis2_svc_skeleton_t *inst,
   const axis2_env_t *env)
functions have some problems. Please can u attach the source and header file
of axis2_svc_skel_name

Thanks
Milinda

On 3/5/07, Zoltán Altfatter [EMAIL PROTECTED] wrote:


Hi,

I'm using Axis2C 0.96 and Axis2/Java 1.1.1.
I made a simple SayHelloService with Axis2/Java, generated the wsdl file
with java2wsdl tool.
Then I generated Axis2/C stub and skeleton files from the wsdl file.
After a few hours finally I managed to compile them with Microsoft Visual
Studio...with Eclipse CDT somehow I couldn't manage, to set the gcc command
properly...it failed with during linking.
Anyway, with Microsoft Visual Studio I obtained the dll file.
After deploying the service to the Axis2/C standalone  web server, I tried
to call it from a Java client.
But I received an AxisFault exception with the following message:
dll description has invalid state of not having valid dll create
function, of valid delete function or valid dll_handler

From Java client I can call the already deployed sample echo service in
Axis2/C...but when I try to build this sample echo service and deploy it to
Axis2/C web server I receive again the AxisFault exception with the same
error message.

So I suppose there is some problem with my dll creation...

Could you help me?

Zoli.





--
[EMAIL PROTECTED]
WSO2, Inc: http://www.wso2.com Oxygenating the Web Service Platform
http://www.milindalakmal.wordpress.com


Re: dll description has invalid state

2007-03-05 Thread Zoltán Altfatter

Hi Milinda,

Yes, you're right about that functions, there is something wrong with them.

I found out something. In Microsoft Visual Studio I build the project like
Win32 application, and building this way the sample echo service from
Axis2/C and dll created is ok, meaning that I can connect to that with a
Java client using Axis2/Java.

I tried also this with my generated SayHelloService service.
But unfortunately has compile errors which I don't understand:

error C2491: 'axis2_get_instance' : definition of dllimport function not
allowed
error C2491: 'axis2_remove_instance' : definition of dllimport function not
allowed

The generated axis2_get_instance and axis2_remove_instance functions look
like the following:

AXIS2_EXTERN int AXIS2_CALL
   axis2_get_instance(struct axis2_svc_skeleton **inst,
   const axis2_env_t *env)
   {
 ...
   }

AXIS2_EXTERN int AXIS2_CALL
   axis2_remove_instance(axis2_svc_skeleton_t *inst,
   const axis2_env_t *env)
   {
 ...
   }

I don't understand the AXIS2_EXTERN and AXIS2_CALL what are those...

The axis2_get_instance and axis2_remove_instance functions from sample echo
service from AXIS2/C look different:

AXIS2_EXPORT int
axis2_get_instance(axis2_svc_skeleton_t **inst,
   const axis2_env_t *env) {
...
}


AXIS2_EXPORT int
axis2_remove_instance(axis2_svc_skeleton_t *inst,
   const axis2_env_t *env) {
...
}

I've attached the generated files to this mail.

Could you check them?
Thank you.

Zoli


/**
 * axis2_skel_SayHelloService.c
 *
 * This file was auto-generated from WSDL for 
SayHelloService|http://service.demo; service
 * by the Apache Axis2/C version: #axisVersion# #today#
 * axis2_skel_SayHelloService Axis2/C skeleton for the axisService
 */

 #include axis2_skel_SayHelloService.h

 

 
/**
 * auto generated function definition signature
 * for sayHello| operation.
 
 
 */
axiom_node_t* axis2_skel_SayHelloService_sayHello (const axis2_env_t 
*env  )
{
  /* TODO fill this with the necessary business logic */
  return NULL;
}
 



/**
 * axis2_skel_SayHelloService.h
 *
 * This file was auto-generated from WSDL for 
SayHelloService|http://service.demo; service
 * by the Apache Axis2/C version: #axisVersion# #today#
 * axis2_skel_SayHelloService Axis2/C skeleton for the axisService- Header 
file
 */


#include axis2_svc_skeleton.h
#include axis2_log_default.h
#include axis2_error_default.h
#include axiom_text.h
#include axiom_node.h
#include axiom_element.h
#include stdio.h


   

 
/**
 * auto generated function declaration
 * for sayHello| operation.
 
 
 */
axiom_node_t* axis2_skel_SayHelloService_sayHello (const axis2_env_t 
*env  );
 



/**
 * axis2_svc_skel_SayHelloService.c
 *
 * This file was auto-generated from WSDL for 
SayHelloService|http://service.demo; service
 * by the Apache Axis2 version: #axisVersion# #today#
 *  axis2_svc_skel_SayHelloService
 */

#include axis2_skel_SayHelloService.h
#include axis2_svc_skeleton.h
#include axis2_array_list.h
#include stdio.h

/**
 * functions prototypes
 */

/* On fault, handle the fault */
axiom_node_t* AXIS2_CALL
axis2_svc_skel_SayHelloService_on_fault(axis2_svc_skeleton_t 
*svc_skeleton,
  const axis2_env_t *env, axiom_node_t *node);

/* Free the service */
int AXIS2_CALL
axis2_svc_skel_SayHelloService_free(axis2_svc_skeleton_t *svc_skeleton,
  const axis2_env_t *env);

/* This method invokes the right service method */
axiom_node_t* AXIS2_CALL
axis2_svc_skel_SayHelloService_invoke(axis2_svc_skeleton_t 
*svc_skeleton,
const axis2_env_t *env,
axiom_node_t *node,
axis2_msg_ctx_t *msg_ctx);

/* Initializing the environment  */
int AXIS2_CALL
axis2_svc_skel_SayHelloService_init(axis2_svc_skeleton_t *svc_skeleton,
const axis2_env_t *env);

/* Create the service  */
axis2_svc_skeleton_t* AXIS2_CALL
axis2_svc_skel_SayHelloService_create(const axis2_env_t *env);

/**
 * Implementations for the functions
 */

axis2_svc_skeleton_t* AXIS2_CALL
axis2_svc_skel_SayHelloService_create(const axis2_env_t *env)
{
axis2_svc_skeleton_t *svc_skeleton = NULL;
svc_skeleton = AXIS2_MALLOC(env-allocator,
sizeof(axis2_svc_skeleton_t));


svc_skeleton-ops = AXIS2_MALLOC(
env-allocator, sizeof(axis2_svc_skeleton_ops_t));