Re: Questions/suggestions on WSDL2C
Hi Zhang, Please see my inline comment to the code.. On Feb 1, 2008 1:30 AM, Zhang, Wayne (IT) <[EMAIL PROTECTED]> wrote: > Hi, > > Thanks to all for your quick responses. I think a simple demo client > (with useful inlined comments explaining what a user should do) will fit > my need. WRT makefile generation, I understand it's hard to > auto-generate one that works perfectly in _all_ projects, but it might > be helpful to create a makefile.template kind of thing to set up all the > basic stuff (required defines, libs, include paths, libpaths, etc) and > let the users add their stuff on top of it. > > Now back to the problems I encountered with the client. (I apologize > for the following long copy-and-paste text, please tell me the proper > way if this is not recommended). WSDL2C generates the following header > code but I'm not sure what to do with each function (see my inlined > questions): > > > /* function prototypes - for header file > */ > /** >* axis2_stub_create_CalculatorService >* Create and return the stub with services populated >* @param env Environment ( mandatory) >* @param client_home Axis2/C home ( mandatory ) >* @param endpoint_uri Service endpoint uri( optional ) - if NULL > default picked from WSDL used >* @return Newly created stub object >*/ > axis2_stub_t* > axis2_stub_create_CalculatorService(const axutil_env_t *env, > axis2_char_t *client_home, > axis2_char_t *endpoint_uri); > // wz: I looked at the math example source and thought > // this function should correspond to axis2_math_stub.c's > axis2_math_stub_create_with_endpoint_uri_and_client_home()? Yea, It is exactly the same.. > > /** >* axis2_stub_populate_services_for_CalculatorService >* populate the svc in stub with the service and operations >* @param stub The stub >* @param env environment ( mandatory) >*/ > void axis2_stub_populate_services_for_CalculatorService( axis2_stub_t > *stub, const axutil_env_t *env); > // wz: implement it a la axis2_math_stub.c's > axis2_populate_axis_service()? Yea that also do the same functionality. > > > /** >* axis2_stub_get_endpoint_uri_of_CalculatorService >* Return the endpoint URI picked from WSDL >* @param env environment ( mandatory) >* @return The endpoint picked from WSDL >*/ > axis2_char_t * > axis2_stub_get_endpoint_uri_of_CalculatorService(const axutil_env_t > *env); > // wz: no question here > > > /** >* Auto generated function declaration >* for > "Arithmetic|http://xml.ms.com/ns/msjava/cxfutils/examples/calculator"; > operation. >* @param stub The stub (axis2_stub_t) >* @param env environment ( mandatory) > >* @param _arithmetic >* return > adb_ArithmeticResponse_t* >*/ > > adb_ArithmeticResponse_t* > axis2_stub_op_CalculatorService_Arithmetic( axis2_stub_t *stub, const > axutil_env_t *env, > adb_Arithmetic_t* _arithmetic); > // wz: how should this function extract input parameters from > _arithmetic and send them to the server? HI I suppose you have adb_Arithemetic.h/.c is generated with you.. If not you may have missed the -u in code generation. i.e. retry with WSD2C.sh -uri your.wsdl -u. Then the adb_Arithetic.h will have create function and several setters and getters. You can use these functions to feed data to adb_Arithematic object. The same with adb_Arithematic_Response I.e. your code will look something like adb_Arithematic_t * ar; adb_Arithematic_Response_t * ares; ar = adb_Arithematic_set_someVar(ar, env, 5); //here someVar should be replaced with actual fields ares = axis2_stub_op_CalculatorService_Arithmetic(stuv, env, ar); int i = adb_Arithematic_Response_get_anotherVar(ares, env); You can have a good idea on how to manipulate these adb object from the "samples/codegen/client/calculator/test_calculator.c" sample in the axis2/c pack. > > > /** >* Auto generated function declaration >* for > "Arithmetic|http://xml.ms.com/ns/msjava/cxfutils/examples/calculator"; > operation. >* @param stub The stub >* @param env environment ( mandatory) > >* @param _arithmetic >* @param user_data user data to be accessed by the callbacks >* @param on_complete callback to handle on complete >* @param on_error callback to handle on error >*/ > > > > void axis2_stub_start_op_CalculatorService_Arithmetic( axis2_stub_t > *stub, const axutil_env_t *env, > adb_Arithmetic_t* _arithmetic, > void *user_data, > axis2_status_t ( AXIS2_CALL *on_complete ) (const axutil_env_t *, > adb_ArithmeticResponse_t* _arithmeticResponse, void *data) , > axis2_status_t ( AXIS2_CALL *on_error ) (const axutil_env_t *, int > exception, void *data) ); > // wz: is this the asynchronous version of > axis2_stub_op_CalculatorService_Arithmetic()? What do I do with data? Oops! we have missed to mention this is async in the doc comment. (anway it is me
Re: Questions/suggestions on WSDL2C
Thanks Mark, I will check it out. :) Dimuthu On Feb 1, 2008 2:49 AM, Mark Nüßler <[EMAIL PROTECTED]> wrote: > hello users, > > share ? sure ;-) > > at the moment i am very busy - sorry, > i will have time - let me say next week wednesday, > to work on this issue. > > to have a look at my generating process, you can > download a zip at [1] to get an idea how its works. > at the moment nearly everthing is hardcoded, > so it won't work on other maschines, there > was no need to took the long way, everything > is quick and dirty ;-) > > the gen.bat is how i generate java->wsdl > and wsdl->java, the both folders are for > the vs studio generation, to start and deploy > the generated service. > > mfg derMark > > [1] www.9elements.com/dermark/axis2_vs_gen.zip > > > > Dimuthu Gamage schrieb: > > On Jan 31, 2008 12:10 PM, Mark Nüßler <[EMAIL PROTECTED]> wrote: > >> hello users, > >> > >> just to let you know - i have java classes, > >> that generates visual studio project files > >> 4 vs2003 and vs2005 - so that you just generate > >> your code. deployment und running simple_http_sever > >> is done by compiling - just press play button ;-) > > > > Wow, is that something you like to share with us:). > > > > > >> i think its better to have these kind of tools > >> in java, so there is no need to have a third > >> language like ruby - i know that ruby is much more > >> intuitve to build this kind of skripts. > >> > > > > Yea sure, It is better if we can limit users to use only (at most) two > > languages. > > > > Thanks > > Dimuthu > > > >> mfg derMark > >> > >> Dimuthu Gamage schrieb: > >> > >>> On Jan 31, 2008 9:19 AM, Samisa Abeysinghe <[EMAIL PROTECTED]> wrote: > Dimuthu Gamage wrote: > > Please see my inline comment. > > > > On Jan 31, 2008 8:07 AM, Samisa Abeysinghe <[EMAIL PROTECTED]> wrote: > > > >> Dimuthu Gamage wrote: > >> > >>> Hi Zhang, > >>> > >>> Thanks for your suggestions. > >>> > >>> 1). In fact generating a demo client is a good idea. I will look in > >>> to that. > >>> For the time being, I'm using a ruby script to generate simple > >>> demonstrations for stub and skels (it automatically generates simple > >>> logic with adb), if you find useful you can check it from > >>> http://people.apache.org/~dimuthu/leisure/23_oct/generate_demos.rb. > >>> > >>> > >> When there are so many operations, with complex params, how are we > >> supposed to generate a demo client? > >> > > I think what we can provide is empty functions (with empty logic) as > > in server side. The adb object manipulation should be anyway done by > > the user. so we don't need to worry about complex types in the demo > > client.. That indeed should be done by the user. > > > > BTW the ruby script I mentioned there, recursively fills the object > > matching pattern in the generated code.. That works only for "in-out" > > MEP. Anyway what we are planning to generate with WSDL2C tool is not > > much complicated as that. > > > I wish we could have used the Ruby script, the only problem with that is > we have to assume users would have Ruby. This would specially be > problematic with Windows users :( > >>> Hi, > >>> > >>> I don't think we should use the Ruby Script as a kind of recommended > >>> way to generate demos.. As Zhang suggested what we are lacking is a > >>> demo client that has /*Todo */ spaces to write clients logic. That > >>> kind of thing can be easily generated from the WSDL2C tool itself. And > >>> we can use the ruby script as an optional thing. > >>> > >>> Thanks > >>> Dimuthu > >>> > Samisa... > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > >>> - > >>> To unsubscribe, e-mail: [EMAIL PROTECTED] > >>> For additional commands, e-mail: [EMAIL PROTECTED] > >>> > >>> > >>> > >> - > >> To unsubscribe, e-mail: [EMAIL PROTECTED] > >> For additional commands, e-mail: [EMAIL PROTECTED] > >> > >> > > > > - > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Questions/suggestions on WSDL2C
hello users, share ? sure ;-) at the moment i am very busy - sorry, i will have time - let me say next week wednesday, to work on this issue. to have a look at my generating process, you can download a zip at [1] to get an idea how its works. at the moment nearly everthing is hardcoded, so it won't work on other maschines, there was no need to took the long way, everything is quick and dirty ;-) the gen.bat is how i generate java->wsdl and wsdl->java, the both folders are for the vs studio generation, to start and deploy the generated service. mfg derMark [1] www.9elements.com/dermark/axis2_vs_gen.zip Dimuthu Gamage schrieb: On Jan 31, 2008 12:10 PM, Mark Nüßler <[EMAIL PROTECTED]> wrote: hello users, just to let you know - i have java classes, that generates visual studio project files 4 vs2003 and vs2005 - so that you just generate your code. deployment und running simple_http_sever is done by compiling - just press play button ;-) Wow, is that something you like to share with us:). i think its better to have these kind of tools in java, so there is no need to have a third language like ruby - i know that ruby is much more intuitve to build this kind of skripts. Yea sure, It is better if we can limit users to use only (at most) two languages. Thanks Dimuthu mfg derMark Dimuthu Gamage schrieb: On Jan 31, 2008 9:19 AM, Samisa Abeysinghe <[EMAIL PROTECTED]> wrote: Dimuthu Gamage wrote: Please see my inline comment. On Jan 31, 2008 8:07 AM, Samisa Abeysinghe <[EMAIL PROTECTED]> wrote: Dimuthu Gamage wrote: Hi Zhang, Thanks for your suggestions. 1). In fact generating a demo client is a good idea. I will look in to that. For the time being, I'm using a ruby script to generate simple demonstrations for stub and skels (it automatically generates simple logic with adb), if you find useful you can check it from http://people.apache.org/~dimuthu/leisure/23_oct/generate_demos.rb. When there are so many operations, with complex params, how are we supposed to generate a demo client? I think what we can provide is empty functions (with empty logic) as in server side. The adb object manipulation should be anyway done by the user. so we don't need to worry about complex types in the demo client.. That indeed should be done by the user. BTW the ruby script I mentioned there, recursively fills the object matching pattern in the generated code.. That works only for "in-out" MEP. Anyway what we are planning to generate with WSDL2C tool is not much complicated as that. I wish we could have used the Ruby script, the only problem with that is we have to assume users would have Ruby. This would specially be problematic with Windows users :( Hi, I don't think we should use the Ruby Script as a kind of recommended way to generate demos.. As Zhang suggested what we are lacking is a demo client that has /*Todo */ spaces to write clients logic. That kind of thing can be easily generated from the WSDL2C tool itself. And we can use the ruby script as an optional thing. Thanks Dimuthu Samisa... - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Questions/suggestions on WSDL2C
Hi, Thanks to all for your quick responses. I think a simple demo client (with useful inlined comments explaining what a user should do) will fit my need. WRT makefile generation, I understand it's hard to auto-generate one that works perfectly in _all_ projects, but it might be helpful to create a makefile.template kind of thing to set up all the basic stuff (required defines, libs, include paths, libpaths, etc) and let the users add their stuff on top of it. Now back to the problems I encountered with the client. (I apologize for the following long copy-and-paste text, please tell me the proper way if this is not recommended). WSDL2C generates the following header code but I'm not sure what to do with each function (see my inlined questions): /* function prototypes - for header file */ /** * axis2_stub_create_CalculatorService * Create and return the stub with services populated * @param env Environment ( mandatory) * @param client_home Axis2/C home ( mandatory ) * @param endpoint_uri Service endpoint uri( optional ) - if NULL default picked from WSDL used * @return Newly created stub object */ axis2_stub_t* axis2_stub_create_CalculatorService(const axutil_env_t *env, axis2_char_t *client_home, axis2_char_t *endpoint_uri); // wz: I looked at the math example source and thought // this function should correspond to axis2_math_stub.c's axis2_math_stub_create_with_endpoint_uri_and_client_home()? /** * axis2_stub_populate_services_for_CalculatorService * populate the svc in stub with the service and operations * @param stub The stub * @param env environment ( mandatory) */ void axis2_stub_populate_services_for_CalculatorService( axis2_stub_t *stub, const axutil_env_t *env); // wz: implement it a la axis2_math_stub.c's axis2_populate_axis_service()? /** * axis2_stub_get_endpoint_uri_of_CalculatorService * Return the endpoint URI picked from WSDL * @param env environment ( mandatory) * @return The endpoint picked from WSDL */ axis2_char_t * axis2_stub_get_endpoint_uri_of_CalculatorService(const axutil_env_t *env); // wz: no question here /** * Auto generated function declaration * for "Arithmetic|http://xml.ms.com/ns/msjava/cxfutils/examples/calculator"; operation. * @param stub The stub (axis2_stub_t) * @param env environment ( mandatory) * @param _arithmetic * return adb_ArithmeticResponse_t* */ adb_ArithmeticResponse_t* axis2_stub_op_CalculatorService_Arithmetic( axis2_stub_t *stub, const axutil_env_t *env, adb_Arithmetic_t* _arithmetic); // wz: how should this function extract input parameters from _arithmetic and send them to the server? /** * Auto generated function declaration * for "Arithmetic|http://xml.ms.com/ns/msjava/cxfutils/examples/calculator"; operation. * @param stub The stub * @param env environment ( mandatory) * @param _arithmetic * @param user_data user data to be accessed by the callbacks * @param on_complete callback to handle on complete * @param on_error callback to handle on error */ void axis2_stub_start_op_CalculatorService_Arithmetic( axis2_stub_t *stub, const axutil_env_t *env, adb_Arithmetic_t* _arithmetic, void *user_data, axis2_status_t ( AXIS2_CALL *on_complete ) (const axutil_env_t *, adb_ArithmeticResponse_t* _arithmeticResponse, void *data) , axis2_status_t ( AXIS2_CALL *on_error ) (const axutil_env_t *, int exception, void *data) ); // wz: is this the asynchronous version of axis2_stub_op_CalculatorService_Arithmetic()? What do I do with data? Thanks, Wayne Zhang Morgan Stanley | Technology [EMAIL PROTECTED] >-Original Message- >From: Dimuthu Gamage [mailto:[EMAIL PROTECTED] >Sent: Wednesday, January 30, 2008 10:29 PM >To: Apache AXIS C User List >Subject: Re: Questions/suggestions on WSDL2C > >Please see my inline comment. > >On Jan 31, 2008 8:07 AM, Samisa Abeysinghe <[EMAIL PROTECTED]> wrote: >> Dimuthu Gamage wrote: >> > Hi Zhang, >> > >> > Thanks for your suggestions. >> > >> > 1). In fact generating a demo client is a good idea. I >will look in to that. >> > For the time being, I'm using a ruby script to generate simple >> > demonstrations for stub and skels (it automatically >generates simple >> > logic with adb), if you find useful you can check it from >> > http://people.apache.org/~dimuthu/leisure/23_oct/generate_demos.rb. >> > >> >> When there are so many operations, with complex params, how are we >> supposed to generate a demo client? > >I think what we can provide is empty functions (with empty >logic) as in server side. The adb object manipulation should >be anyway done by the user. so we don't need to worry about >complex types in the demo client.. That indeed should be done >by the user. > >BTW the ruby script I mentioned there, recursively fills the >object matching pattern in the generate