[ 
https://issues.apache.org/jira/browse/AXIS2C-863?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12555342#action_12555342
 ] 

Dimuthu Gamage commented on AXIS2C-863:
---------------------------------------

In addition to the above suggestion, it is better to give user an API hiding 
the existence of  axis2_callback even from the callback functions.

So according to my suggestion, the above function prototype would be like,

void axis2_stub_start_op_MyService_getProperties( axis2_stub_t *stub, const 
axutil_env_t *env,
                                                     adb_getProperties_t* 
_getProperties,
                                                     void *data,
                                                    axis2_status_t ( AXIS2_CALL 
*on_complete ) (const axutil_env_t *, adb_getPropertiesResponset_t *, void 
*data) ,
                                                    axis2_status_t ( AXIS2_CALL 
*on_error ) (const axutil_env_t *, int, void *data) ) 

or in the case of non-adb codegeneration,

void axis2_stub_start_op_MyService_getProperties( axis2_stub_t *stub, const 
axutil_env_t *env,
                                                     axiom_node_t* 
_getProperties,
                                                     void *data,
                                                    axis2_status_t ( AXIS2_CALL 
*on_complete ) (const axutil_env_t *, axiom_node_t *, void *data) ,
                                                    axis2_status_t ( AXIS2_CALL 
*on_error ) (const axutil_env_t *, int, void *data) ) 

Any thoughts? or shall I continue working on this?

> Non-blocking code generation and forwarding a context code not supported
> ------------------------------------------------------------------------
>
>                 Key: AXIS2C-863
>                 URL: https://issues.apache.org/jira/browse/AXIS2C-863
>             Project: Axis2-C
>          Issue Type: Improvement
>          Components: wsdl2c tool
>    Affects Versions: Current (Nightly)
>            Reporter: Frank Huebbers
>
> I am using the non-blocking web service calls as they are generated by the 
> wsdl2c codegen tool. What I am missing in the codegeneration, however, is the 
> context that I would like to forward as well to the non-blocking call. 
> Specifically, what I am currently getting is the following (for the prototype 
> in the header):
> void axis2_stub_start_op_MyService_getProperties( axis2_stub_t *stub, const 
> axutil_env_t *env,
>                                                      adb_getProperties_t* 
> _getProperties,
>                                                    axis2_status_t ( 
> AXIS2_CALL *on_complete ) (struct axis2_callback *, const axutil_env_t *) ,
>                                                    axis2_status_t ( 
> AXIS2_CALL *on_error ) (struct axis2_callback *, const axutil_env_t *, int ) )
> What would be more useful, however, is the following in the prototype:
> void axis2_stub_start_op_MyService_getProperties( axis2_stub_t *stub, const 
> axutil_env_t *env,
>                                                      adb_getProperties_t* 
> _getProperties,
>                                                      void *data,
>                                                     axis2_status_t ( 
> AXIS2_CALL *on_complete ) (struct axis2_callback *, const axutil_env_t *) ,
>                                                     axis2_status_t ( 
> AXIS2_CALL *on_error ) (struct axis2_callback *, const axutil_env_t *, int ) )
> With the following addition in the implementation:
> /* Set data object */
> axis2_callback_set_data(callback, data);
> This would allow users to store a context with their non-blocking call, as is 
> customary in other languages, without having to manually change the stub 
> after it was generated.
> I generated the client stub with the following options on the wsdl2c tool: 
> -uri myWSDL.wsdl -d adb -u

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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

Reply via email to