Return-Path: Delivered-To: apmail-ws-axis-c-user-archive@www.apache.org Received: (qmail 38812 invoked from network); 6 Mar 2007 09:22:24 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 6 Mar 2007 09:22:24 -0000 Received: (qmail 26548 invoked by uid 500); 6 Mar 2007 09:22:31 -0000 Delivered-To: apmail-ws-axis-c-user-archive@ws.apache.org Received: (qmail 26533 invoked by uid 500); 6 Mar 2007 09:22:31 -0000 Mailing-List: contact axis-c-user-help@ws.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: List-Id: "Apache AXIS C User List" Reply-To: "Apache AXIS C User List" Delivered-To: mailing list axis-c-user@ws.apache.org Received: (qmail 26521 invoked by uid 99); 6 Mar 2007 09:22:31 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 06 Mar 2007 01:22:31 -0800 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: domain of supun06@gmail.com designates 64.233.184.239 as permitted sender) Received: from [64.233.184.239] (HELO wr-out-0506.google.com) (64.233.184.239) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 06 Mar 2007 01:22:21 -0800 Received: by wr-out-0506.google.com with SMTP id 69so2278289wri for ; Tue, 06 Mar 2007 01:22:01 -0800 (PST) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=bheFG+Vm9Shd62BLEs6YEo6CTwF+CtM9g+0TCe7W5+Sbn8xWWsKm7KdBmyUlQhWXscZRgPEwHYmMm/s2p0otsJD6wNS4ScsoG5yFm1sNnk07JoKMG+1TfOVxSDA2mNAMlj8jq0SLvCMH6IZXgnoxz14TBotk07Plx9JAbk4b0/4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=nGI96hg2qLkhyOCFFEyIzlhhM+q7LtAKn3lf2fr6Llo+kjd9K039BXkkj145XAAUKI4wDD+voqEIMF0+p4dY3oNTePf1ZNU9SyipMQ2j6huhQzvcfRDfCSv3Xedd3IS1CKJeeAHd4jBIfqlS5auN8+2GU/9Lt5fvceazGjAAEt8= Received: by 10.114.198.1 with SMTP id v1mr1659688waf.1173172919889; Tue, 06 Mar 2007 01:21:59 -0800 (PST) Received: by 10.114.190.12 with HTTP; Tue, 6 Mar 2007 01:21:59 -0800 (PST) Message-ID: Date: Tue, 6 Mar 2007 15:21:59 +0600 From: "Supun Kamburugamuva" To: "Apache AXIS C User List" Subject: Re: dll description has invalid state In-Reply-To: <22a059a60703060051n32cb49a8n6300407517bba97@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <7b2e07fa0703050803v47627948n6b1de21de17b4459@mail.gmail.com> <22a059a60703052041o7a09d3bfy1f42e063619bcd34@mail.gmail.com> <7b2e07fa0703052318j3b66f9dci1a960cb106cfac1c@mail.gmail.com> <22a059a60703060051n32cb49a8n6300407517bba97@mail.gmail.com> X-Virus-Checked: Checked by ClamAV on apache.org 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 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=E1n Altfatter 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 l= ike > 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 no= t > allowed > > error C2491: 'axis2_remove_instance' : definition of dllimport function > not allowed > > > > The generated axis2_get_instance and axis2_remove_instance functions lo= ok > 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: > axis-c-user-unsubscribe@ws.apache.org > > For additional commands, e-mail: axis-c-user-help@ws.apache.org > > > > > > > > -- > milinda@wso2.com > WSO2, Inc: http://www.wso2.com "Oxygenating the Web Service Platform" > http://www.milindalakmal.wordpress.com --------------------------------------------------------------------- To unsubscribe, e-mail: axis-c-user-unsubscribe@ws.apache.org For additional commands, e-mail: axis-c-user-help@ws.apache.org