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 Samisa Abeysinghe <sa...@gmail.com> on 2006/05/22 16:20:11 UTC

Re: [Axis2] Building samples in MS Visual Studio]

I tried this on Windows. It looks to me the kind of error that you are
getting is given when the DLL is corrupted or it does not implement
the expected format.

Please double check the DLL.

Have you used the same code as the sample or did you modify it? If you
modified, please send the code.

Thanks,
Samisa...


---------- Forwarded message ----------
From: "Andrew Borley" <aj...@gmail.com>
To: "Apache AXIS C User List" <ax...@ws.apache.org>
Date: Mon, 22 May 2006 14:27:46 +0100
Subject: Re: [Axis2] Building samples in MS Visual Studio
Hi Sahan,

Thanks for the reply. I've been putting my built dll into a directory
called $AXIS2_HOME/services/EchoWebService with the dll name as
EchoWebService.dll and the services.xml file containing the following:

<service name="EchoWebService">
    <parameter name="ServiceClass" locked="xsd:false">EchoWebService</parameter>
   <description>
        This is a testing service , to test the system is working or not
   </description>
    <operation name="echoString">
            <!--messageReceiver class="axis2_receivers" /-->
            <parameter name="wsamapping" >
http://ws.apache.org/axis2/c/samples/echoString</parameter>
    </operation>
</service>

I removed the original echo sample (in case there was some clash
happening) and the code itself is exactly the same as the sample, but
I'm still getting this error. I attach the full axis2.log trace file.

Thanks

Andrew


On 5/22/06, Sahan Gamage <sa...@wso2.com> wrote:
> Hi Andrew,
>
> Where did you put the built dll ? The location should be
> $AXIS2_HOME/services/echo/  If you haven't put the dll in there try
> putting it there. If that doesn't solve the problem let us have the
> complete log file so that we might be able to locate what went wrong.
> IIRC there are no special options (or compiler flags) other than
> standard MSVC stuff when building services.
> - Sahan
>
> Andrew Borley wrote:
>
> > Hi All,
> >
> > I'm trying to get going with Axis2C (0.91) and have started by
> > attempting to build and run the echo sample in MS Visual C++ .NET
> > v7.1. I can build a dll, deploy it into the sample http server, and
> > see the service in the list at http://localhost:9090/axis2/services
> > but I can't invoke the service. I get an "out of memory" error in the
> > axis2.log file, shown below. On other occasions I've received the
> > message "dll description has invalid state of not having valid dll
> > create function, of valid delete function or valid dll_handler" at the
> > same point (which may mean more). I'm guessing there is some issue
> > with how I'm building my dll, but I've tried various options and
> > haven't yet had any success.
> >
> > Can anyone help?
> >
> > Many thanks
> >
> > Andrew Borley
> >

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


Re: [Axis2] Building samples in MS Visual Studio]

Posted by Sahan Gamage <sa...@wso2.com>.
Hi,

Yes. Either the dll is corrupt or the dll does not contain the functions
required by the axis2 core to load the dll in. The required functions are :
AXIS2_EXPORT int
axis2_get_instance(axis2_svc_skeleton_t **inst,
                   axis2_env_t **env)
and

AXIS2_EXPORT int
axis2_remove_instance(axis2_svc_skeleton_t *inst,
                      axis2_env_t **env)

This is contained in the echo_skeleton.c file in the
"samples/server/echo" folder. Have you included this file in your dll
project ?

- Sahan

Samisa Abeysinghe wrote:

> I tried this on Windows. It looks to me the kind of error that you are
> getting is given when the DLL is corrupted or it does not implement
> the expected format.
>
> Please double check the DLL.
>
> Have you used the same code as the sample or did you modify it? If you
> modified, please send the code.
>
> Thanks,
> Samisa...
>
>
> ---------- Forwarded message ----------
> From: "Andrew Borley" <aj...@gmail.com>
> To: "Apache AXIS C User List" <ax...@ws.apache.org>
> Date: Mon, 22 May 2006 14:27:46 +0100
> Subject: Re: [Axis2] Building samples in MS Visual Studio
> Hi Sahan,
>
> Thanks for the reply. I've been putting my built dll into a directory
> called $AXIS2_HOME/services/EchoWebService with the dll name as
> EchoWebService.dll and the services.xml file containing the following:
>
> <service name="EchoWebService">
>    <parameter name="ServiceClass"
> locked="xsd:false">EchoWebService</parameter>
>   <description>
>        This is a testing service , to test the system is working or not
>   </description>
>    <operation name="echoString">
>            <!--messageReceiver class="axis2_receivers" /-->
>            <parameter name="wsamapping" >
> http://ws.apache.org/axis2/c/samples/echoString</parameter>
>    </operation>
> </service>
>
> I removed the original echo sample (in case there was some clash
> happening) and the code itself is exactly the same as the sample, but
> I'm still getting this error. I attach the full axis2.log trace file.
>
> Thanks
>
> Andrew
>
>
> On 5/22/06, Sahan Gamage <sa...@wso2.com> wrote:
>
>> Hi Andrew,
>>
>> Where did you put the built dll ? The location should be
>> $AXIS2_HOME/services/echo/  If you haven't put the dll in there try
>> putting it there. If that doesn't solve the problem let us have the
>> complete log file so that we might be able to locate what went wrong.
>> IIRC there are no special options (or compiler flags) other than
>> standard MSVC stuff when building services.
>> - Sahan
>>
>> Andrew Borley wrote:
>>
>> > Hi All,
>> >
>> > I'm trying to get going with Axis2C (0.91) and have started by
>> > attempting to build and run the echo sample in MS Visual C++ .NET
>> > v7.1. I can build a dll, deploy it into the sample http server, and
>> > see the service in the list at http://localhost:9090/axis2/services
>> > but I can't invoke the service. I get an "out of memory" error in the
>> > axis2.log file, shown below. On other occasions I've received the
>> > message "dll description has invalid state of not having valid dll
>> > create function, of valid delete function or valid dll_handler" at the
>> > same point (which may mean more). I'm guessing there is some issue
>> > with how I'm building my dll, but I've tried various options and
>> > haven't yet had any success.
>> >
>> > Can anyone help?
>> >
>> > Many thanks
>> >
>> > Andrew Borley
>> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-c-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-c-user-help@ws.apache.org
>
>


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


Re: [Axis2] Building samples in MS Visual Studio]

Posted by Andrew Borley <aj...@gmail.com>.
Hi Samisa,

I've managed to get it running! My issue was that in MSVC++ the default
build setting is to "Compile as C++ Code".
Changing to "Compile as C code" makes it work.

When I started looking at Axis2C I used the defaults ("Compile as C++ Code")
and got some conversion errors:
d:\cpp\EchoWebService\echo_skeleton.c(53) : error C2440: '=' : cannot
convert from 'void *' to 'axis2_svc_skeleton_t *'
        Conversion from 'void*' to pointer to non-'void' requires an
explicit cast
d:\cpp\EchoWebService\echo_skeleton.c(56) : error C2440: '=' : cannot
convert from 'void *' to 'axis2_svc_skeleton_ops_t *'
        Conversion from 'void*' to pointer to non-'void' requires an
explicit cast

So, (late on Friday afternoon) I took the advice and added some explicit
casting to the failing lines. This makes the build happy and I have a nice
dll (built as C++) that doesn't work.
When you asked me if the code was the same as the sample I checked it over
and discovered these extra casts. Removing them makes the "Compile as C++"
fail again, but discovering and changing to the "Compile as C" setting and
it's all working fine.
So the moral is: check what the default settings are!

Thanks for the help

Andrew


On 5/22/06, Samisa Abeysinghe <sa...@gmail.com> wrote:
>
> I tried this on Windows. It looks to me the kind of error that you are
> getting is given when the DLL is corrupted or it does not implement
> the expected format.
>
> Please double check the DLL.
>
> Have you used the same code as the sample or did you modify it? If you
> modified, please send the code.
>
> Thanks,
> Samisa...
>
>
> ---------- Forwarded message ----------
> From: "Andrew Borley" <aj...@gmail.com>
> To: "Apache AXIS C User List" <ax...@ws.apache.org>
> Date: Mon, 22 May 2006 14:27:46 +0100
> Subject: Re: [Axis2] Building samples in MS Visual Studio
> Hi Sahan,
>
> Thanks for the reply. I've been putting my built dll into a directory
> called $AXIS2_HOME/services/EchoWebService with the dll name as
> EchoWebService.dll and the services.xml file containing the following:
>
> <service name="EchoWebService">
>     <parameter name="ServiceClass"
> locked="xsd:false">EchoWebService</parameter>
>    <description>
>         This is a testing service , to test the system is working or not
>    </description>
>     <operation name="echoString">
>             <!--messageReceiver class="axis2_receivers" /-->
>             <parameter name="wsamapping" >
> http://ws.apache.org/axis2/c/samples/echoString</parameter>
>     </operation>
> </service>
>
> I removed the original echo sample (in case there was some clash
> happening) and the code itself is exactly the same as the sample, but
> I'm still getting this error. I attach the full axis2.log trace file.
>
> Thanks
>
> Andrew
>
>
> On 5/22/06, Sahan Gamage <sa...@wso2.com> wrote:
> > Hi Andrew,
> >
> > Where did you put the built dll ? The location should be
> > $AXIS2_HOME/services/echo/  If you haven't put the dll in there try
> > putting it there. If that doesn't solve the problem let us have the
> > complete log file so that we might be able to locate what went wrong.
> > IIRC there are no special options (or compiler flags) other than
> > standard MSVC stuff when building services.
> > - Sahan
> >
> > Andrew Borley wrote:
> >
> > > Hi All,
> > >
> > > I'm trying to get going with Axis2C (0.91) and have started by
> > > attempting to build and run the echo sample in MS Visual C++ .NET
> > > v7.1. I can build a dll, deploy it into the sample http server, and
> > > see the service in the list at http://localhost:9090/axis2/services
> > > but I can't invoke the service. I get an "out of memory" error in the
> > > axis2.log file, shown below. On other occasions I've received the
> > > message "dll description has invalid state of not having valid dll
> > > create function, of valid delete function or valid dll_handler" at the
> > > same point (which may mean more). I'm guessing there is some issue
> > > with how I'm building my dll, but I've tried various options and
> > > haven't yet had any success.
> > >
> > > Can anyone help?
> > >
> > > Many thanks
> > >
> > > Andrew Borley
> > >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-c-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-c-user-help@ws.apache.org
>
>


-- 

Cheers,

Andrew Borley