Return-Path: Delivered-To: apmail-ws-axis-c-dev-archive@www.apache.org Received: (qmail 3221 invoked from network); 7 Dec 2006 03:07:12 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 7 Dec 2006 03:07:12 -0000 Received: (qmail 49333 invoked by uid 500); 7 Dec 2006 03:07:20 -0000 Delivered-To: apmail-ws-axis-c-dev-archive@ws.apache.org Received: (qmail 49319 invoked by uid 500); 7 Dec 2006 03:07:19 -0000 Mailing-List: contact axis-c-dev-help@ws.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: List-Id: "Apache AXIS C Developers List" Reply-To: "Apache AXIS C Developers List" Delivered-To: mailing list axis-c-dev@ws.apache.org Received: (qmail 49308 invoked by uid 99); 7 Dec 2006 03:07:19 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 06 Dec 2006 19:07:19 -0800 X-ASF-Spam-Status: No, hits=2.0 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: domain of milinda.pathirage@gmail.com designates 64.233.162.230 as permitted sender) Received: from [64.233.162.230] (HELO nz-out-0102.google.com) (64.233.162.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 06 Dec 2006 19:07:08 -0800 Received: by nz-out-0102.google.com with SMTP id m7so264600nzf for ; Wed, 06 Dec 2006 19:06:47 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=Pn6GFQkgnbQlvobWyKPj8sqW3v3eqcZL2Ioxw48u6Ftr9TP9uQzwSgDN+nYdkHMNYamcS49ZVFcKgi8EMR0Y/LAQGVyIYFPFfjZRH25xFoUOuLiJfnr49umMbrsfDIPZ8ZokTUELpUNyVA2RRHJxG6oxY6BnLsqCKbqPp7bqAzo= Received: by 10.65.83.18 with SMTP id k18mr2648814qbl.1165460806377; Wed, 06 Dec 2006 19:06:46 -0800 (PST) Received: by 10.65.52.14 with HTTP; Wed, 6 Dec 2006 19:06:46 -0800 (PST) Message-ID: <22a059a60612061906k28ecaf42w8ddb4fb175b67f30@mail.gmail.com> Date: Thu, 7 Dec 2006 08:36:46 +0530 From: "Milinda Pathirage" To: "Apache AXIS C Developers List" Subject: Re: [Axis2] wsdl2java not generating request object in C In-Reply-To: <45771E70.4020805@real.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_27888_7172327.1165460806327" References: <45771E70.4020805@real.com> X-Virus-Checked: Checked by ClamAV on apache.org ------=_Part_27888_7172327.1165460806327 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline On 12/7/06, Nicholas Hart wrote: > > > I'm trying to reduce the complexity of the problem I'm having with the C > code generator. I've reduced it to a simple example that demonstrates > one of the problems I'm having (attached) when trying to generate client > code. > > The generated code below uses an undefined type "getFooBar" in the > parameter list: > > void axis2_stub_FooBarAdapterService_getFooBar_start( > axis2_stub_t *stub, const axis2_env_t *env, > getFooBar param0, > axis2_status_t > ( AXIS2_CALL *on_complete ) (struct axis2_callback *, const axis2_env_t* ) > , > axis2_status_t > ( AXIS2_CALL *on_error ) (struct axis2_callback *, const axis2_env_t*, > int ) ); > > my guess is that this should be an "axis2_getFooBarRequest" object > instead of "getFooBar" for param0 (yes/no?) but there seems to be no .c > or .h file generated that contains a request object. the generated > files are: > > axis2_FooBarObject.c > axis2_FooBarObject.h > axis2_getFooBar.c > axis2_getFooBar.h > axis2_getFooBarResponse.c > axis2_getFooBarResponse.h > axis2_stub_FooBarAdapterService.c > axis2_stub_FooBarAdapterService.h > > Or, should the axis2_stub_FooBarAdapterService_getFooBar_start() > function instead have a parameter list that reflects the > "parameterOrder" attribute of the "wsdl:operation" tag in the WSDL file > (ie: "string fooId" and "long barId")? > > I'm using a build I made from a source snapshot yesterday (on WinXP with > jdk1.5.0_10). the command I'm running to generate the code is: > > wsdl2java.bat -l c -d adb -a -u -uri FooBar.wsdl > > and with the following environment variable set > JAVA_OPTS=- > Dorg.apache.adb.properties=/org/apache/axis2/schema/c-schema-compile.properties > > I've tried some different options, with no luck. I've also looked > through Jira but so far haven't found anything that seems to match this > problem--but maybe I'm using the wrong keywords. > > Can someone tell me what's wrong with the wsdl, the wsdl2java command, > or if this is a known issue? I'm willing to try to fix this if it is a > bug, but I'm not sure where to start looking. > > thanks! > > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: axis-c-dev-unsubscribe@ws.apache.org > For additional commands, e-mail: axis-c-dev-help@ws.apache.org Hi, I tried code generation for your wsdl(in Linux). Generated code compiled successfully. I used the current source at Axis 2 trunk. Most of the bugs in the C code generation is fixed in the source insde trunk. Here is the code generated for reported function: void axis2_stub_FooBarAdapterService_getFooBar_start( axis2_stub_t *stub, const axis2_env_t *env, axis2_getFooBar_t* getFooBar, axis2_status_t ( AXIS2_CALL *on_complete ) (struct axis2_callback *, const axis2_env_t *) , axis2_status_t ( AXIS2_CALL *on_error ) (struct axis2_callback *, const axis2_env_t *, int ) ) { axis2_callback_t *callback = NULL; axis2_svc_client_t *svc_client = NULL; axis2_options_t *options = NULL; const axis2_char_t *soap_action = NULL; axiom_node_t *payload = NULL; payload = AXIS2_GETFOOBAR_PARSE_OM(getFooBar, env, NULL); options = AXIS2_STUB_GET_OPTIONS( stub, env); if ( NULL == options ) { AXIS2_LOG_ERROR( env->log, AXIS2_LOG_SI, "options is null in stub: Error code:" " %d :: %s", env->error->error_number, AXIS2_ERROR_GET_MESSAGE(env->error)); return; } svc_client = AXIS2_STUB_GET_SVC_CLIENT (stub, env ); soap_action = AXIS2_OPTIONS_GET_ACTION ( options, env ); if ( NULL == soap_action ) { soap_action = "urn:foobar:FooBarAxisAdapter:getFooBarRequest"; AXIS2_OPTIONS_SET_ACTION( options, env, soap_action ); } AXIS2_OPTIONS_SET_SOAP_VERSION(options, env, AXIOM_SOAP11 ); callback = axis2_callback_create(env); /* Set our on_complete fucntion pointer to the callback object */ AXIS2_CALLBACK_SET_ON_COMPLETE(callback, on_complete); /* Set our on_error function pointer to the callback object */ AXIS2_CALLBACK_SET_ON_ERROR(callback, on_error); /* Send request */ AXIS2_SVC_CLIENT_SEND_RECEIVE_NON_BLOCKING(svc_client, env, payload, callback); } I think the problem is in the source you have downloaded. Please try the trunk. Thanks! -- milinda@wso2.com WSO2, Inc: http://www.wso2.com http://www.milindalakmal.wordpress.com ------=_Part_27888_7172327.1165460806327 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline On 12/7/06, Nicholas Hart <nhart@real.com> wrote:

I'm trying to reduce the complexity of the problem I'm having with the C
code generator.  I've reduced it to a simple example that demonstrates
one of the problems I'm having (attached) when trying to generate client
code.

The generated code below uses an undefined type "getFooBar" in the
parameter list:

         void axis2_stub_FooBarAdapterService_getFooBar_start(
axis2_stub_t *stub, const axis2_env_t *env,
                                                         getFooBar param0,
                                                         axis2_status_t
( AXIS2_CALL *on_complete ) (struct axis2_callback *, const axis2_env_t* ) ,
                                                         axis2_status_t
( AXIS2_CALL *on_error ) (struct axis2_callback *, const axis2_env_t*,
int ) );

my guess is that this should be an "axis2_getFooBarRequest" object
instead of "getFooBar" for param0 (yes/no?) but there seems to be no .c
or .h file generated that contains a request object.  the generated
files are:

axis2_FooBarObject.c
axis2_FooBarObject.h
axis2_getFooBar.c
axis2_getFooBar.h
axis2_getFooBarResponse.c
axis2_getFooBarResponse.h
axis2_stub_FooBarAdapterService.c
axis2_stub_FooBarAdapterService.h

Or, should the axis2_stub_FooBarAdapterService_getFooBar_start()
function instead have a parameter list that reflects the
"parameterOrder" attribute of the "wsdl:operation" tag in the WSDL file
(ie: "string fooId" and "long barId")?

I'm using a build I made from a source snapshot yesterday (on WinXP with
jdk1.5.0_10).  the command I'm running to generate the code is:

wsdl2java.bat -l c -d adb -a -u -uri FooBar.wsdl

and with the following environment variable set
JAVA_OPTS=-Dorg.apache.adb.properties=/org/apache/axis2/schema/c-schema-compile.properties

I've tried some different options, with no luck.  I've also looked
through Jira but so far haven't found anything that seems to match this
problem--but maybe I'm using the wrong keywords.

Can someone tell me what's wrong with the wsdl, the wsdl2java command,
or if this is a known issue?  I'm willing to try to fix this if it is a
bug, but I'm not sure where to start looking.

thanks!






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

Hi,

I tried code generation for your wsdl(in Linux). Generated code compiled successfully. I used the current source at Axis 2 trunk. Most of the bugs in the C code generation is fixed in the source insde trunk.

Here is the code generated for reported function:

void axis2_stub_FooBarAdapterService_getFooBar_start( axis2_stub_t *stub, const axis2_env_t *env,
                                                    axis2_getFooBar_t* getFooBar,
                                                  axis2_status_t ( AXIS2_CALL *on_complete ) (struct axis2_callback *, const axis2_env_t *) ,
                                                  axis2_status_t ( AXIS2_CALL *on_error ) (struct axis2_callback *, const axis2_env_t *, int ) )
         {

            axis2_callback_t *callback = NULL;

            axis2_svc_client_t *svc_client = NULL;
            axis2_options_t *options = NULL;

            const axis2_char_t *soap_action = NULL;
            axiom_node_t *payload = NULL;

           
           
                            payload = AXIS2_GETFOOBAR_PARSE_OM(getFooBar, env, NULL);
                       


            options = AXIS2_STUB_GET_OPTIONS( stub, env);
            if ( NULL == options )
            {
              AXIS2_LOG_ERROR( env->log, AXIS2_LOG_SI, "options is null in stub: Error code:"
                      " %d :: %s", env->error->error_number,
                      AXIS2_ERROR_GET_MESSAGE(env->error));
              return;
            }
            svc_client = AXIS2_STUB_GET_SVC_CLIENT (stub, env );
            soap_action = AXIS2_OPTIONS_GET_ACTION ( options, env );
            if ( NULL == soap_action )
            {
              soap_action = "urn:foobar:FooBarAxisAdapter:getFooBarRequest";
              AXIS2_OPTIONS_SET_ACTION( options, env, soap_action );
            }
           
            AXIS2_OPTIONS_SET_SOAP_VERSION(options, env, AXIOM_SOAP11 );
            

            callback = axis2_callback_create(env);
            /* Set our on_complete fucntion pointer to the callback object */
            AXIS2_CALLBACK_SET_ON_COMPLETE(callback, on_complete);
            /* Set our on_error function pointer to the callback object */
            AXIS2_CALLBACK_SET_ON_ERROR(callback, on_error);

            /* Send request */
            AXIS2_SVC_CLIENT_SEND_RECEIVE_NON_BLOCKING(svc_client, env, payload, callback);
         }

I think the problem is in the source you have downloaded. Please try the trunk.


Thanks!
--
milinda@wso2.com
WSO2, Inc: http://www.wso2.com
http://www.milindalakmal.wordpress.com ------=_Part_27888_7172327.1165460806327--