________________________________ From: Milinda Pathirage [mailto:[EMAIL PROTECTED] Sent: Thursday, March 29, 2007 9:48 AM To: Venkada Swamy, Vijayalakshmi (Cognizant) Subject: Re: axis2c - generated skeleton files using WSDL2C for array of structure having a RESET function. how to use it?
Hi, Please forward this mail to axis2/c user list. Milinda On 3/28/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: Hi Milind, Right now I have not implemented for the below structure related services. I am just testing a simple service . for that itself I am getting the error as "Failed in creating DLL" I have attached the wsdl and skeleton files. In the skeleton file just I have implemented for deletedefectitem service. Another doubt in wsdl I am having the request datatype definition as " <xsd:element name ="DeleteDefectItem "> - <http://10.236.23.71/qc.wsdl#%23> <xsd:complexType> - <http://10.236.23.71/qc.wsdl#%23> <xsd:sequence> <xsd:element name="DefectId" type=" xsd:int" maxOccurs="1" minOccurs="0" /> </xsd:sequence> </xsd:complexType> </xsd:element> - <http://10.236.23.71/qc.wsdl#%23> <xsd:element name="DeleteDefectItemResponse"> - <http://10.236.23.71/qc.wsdl#%23> <xsd:complexType> - <http://10.236.23.71/qc.wsdl#%23> <xsd:sequence> <xsd:element name="qcDefectReturn" type ="xsd:int" maxOccurs="1" minOccurs="0" /> </xsd:sequence> </xsd:complexType> </xsd:element> " But in generated file I am having the service signature as """axis2_DeleteDefectItemResponse_t* axis2_skel_qcwebservices_DeleteDefectItem (const axis2_env_t *env , axis2_DeleteDefectItem_t*deleteDefectItem )" isIs it ok if I change in GET func. Oone more ques. Whether I have to create normall dll( dynamic link library or MFC dll) ---- Thanks Viji ________________________________ From: Milinda Pathirage [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 28, 2007 4:42 PM To: Venkada Swamy, Vijayalakshmi (Cognizant) Subject: Re: axis2c - generated skeleton files using WSDL2C for array of structure having a RESET function. how to use it? Hi, Can you please attach service skeleton to this mail thread. I think the problem is in getInstance and removeInstance method of generated axis2_svc_skel_<service name>.c file. If you can attach it we can figure out the problem. Thanks Milinda On 3/28/07, [EMAIL PROTECTED] < [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> > wrote: Hi Milind, Thanks a lot. I am just explain my structs struct object1 { char* name; char* value; }; struct object2 { char* data1; int data2; struct object1 namval{25]; }; tell for the above how to get and how to set it. I am getting another error message " Failed in creating DLL" while testing the a simple service after building the dll and applied it in Axis2C services folder. What could be the problem please resolve it to proceed further -Viji Milinda Pathirage wrote: > > Hi, > Consider a echo example which echo incoming array of integers like this: > > Request Structure: > struct axis2_echoInts > { > axis2_qname_t* qname; > axis2_array_list_t* attrib_input; > }; > > Response Structure: > struct axis2_echoIntsResponse > { > > axis2_qname_t* qname; > axis2_array_list_t* attrib_echoIntsReturn; > }; > > Business Logic Implementation: > axis2_echoIntsResponse_t* axis2_skel_Benchmark_echoInts (const axis2_env_t > *env , > axis2_echoInts_t* > echoInts ) > { > /* TODO fill this with the necessary business logic */ > axis2_echoIntsResponse_t *response = NULL; > axis2_array_list_t *input = NULL; > > response = axis2_echoIntsResponse_create(env); > > input = AXIS2_ECHOINTS_GET_INPUT(echoInts, env); > AXIS2_ECHOINTSRESPONSE_SET_ECHOINTSRETURN(response, env, input); > AXIS2_ECHOINTS_RESET_INPUT(echoInts, env); > return response; > } > > Code that select correct operation inside service skeleton's invoke > function: > if ( AXIS2_STRCMP(op_name, "echoInts") == 0 ) > { > > input_val11_1 = > axis2_echoInts_create( env); > AXIS2_ECHOINTS_DESERIALIZE(input_val11_1, env, > content_node ); > > ret_val11 = axis2_skel_Benchmark_echoInts(env, > input_val11_1 ); > if ( NULL == ret_val11 ) > { > AXIS2_LOG_ERROR( env->log, AXIS2_LOG_SI, "NULL > returnted from the business logic from echoInts " > " %d :: %s", > env->error->error_number, > > AXIS2_ERROR_GET_MESSAGE(env->error)); > return axis2_svc_skel_Benchmark_on_fault( > svc_skeleton, env, NULL); > } > ret_node = > AXIS2_ECHOINTSRESPONSE_SERIALIZE(ret_val11, > env, NULL, AXIS2_FALSE); > AXIS2_ECHOINTSRESPONSE_FREE(ret_val11, > env); > AXIS2_ECHOINTS_FREE(input_val11_1, env); > > return ret_node; > } > > In the service skeleton's invoke function we get payload(axiom_node) of > the > incoming request as parameter. After that we check which operation we have > to execute. > > After selecting correct operation we desirialize the incoming payload to > echoInts structure and give it as a parameter to the > axis2_skel_Benchmark_echoInts > function. > input_val11_1 = axis2_echoInts_create( env); > AXIS2_ECHOINTS_DESERIALIZE(input_val11_1, env, > content_node ); > ret_val11 = axis2_skel_Benchmark_echoInts(env, > input_val11_1 ); > > Inside this function we extract the data inside structure and assign it to > the response structure. > input = AXIS2_ECHOINTS_GET_INPUT(echoInts, env); > AXIS2_ECHOINTSRESPONSE_SET_ECHOINTSRETURN(response, env, input); > > after that we reset the echoInts structure. > AXIS2_ECHOINTS_RESET_INPUT(echoInts, env); > > This reseting done because inside invoke function we free the two > structures > created after serving for the request. Inside the logic of free function > we > free all the elements inside array lists. In this free process, problem > occurs when we trying to free bot h structures . Because we share same > elements between two structures using pointers. Therefore we have to > remove > one pointer from pointing to same array lists. After that no double > freeing > occur, because we remove the reference to that memory location from one > structure. Please go through code inside free logics, then you will be > able > to understand the situation. This reseting mechanism does not require if > we > don't assign the same attributes to the response structure. > > Thanks > Milinda > > On 3/27/07, Prem <[EMAIL PROTECTED]> wrote: >> >> >> Hi, >> >> generated skeleton files using WSDL2C for array structures. >> Request and response generated files for the unbounded structure data >> type >> has a RESET function. how to use it? >> >> any help who have used the Structure array will be helpful. >> >> -Viji. >> -- >> View this message in context: >> http://www.nabble.com/axis2c---generated-skeleton-files-using-WSDL2C-for -array-of-structure-having-a-RESET-function.-how-to-use-it--tf3471795.ht ml#a9688599 >> Sent from the Axis - C++ - User mailing list archive at Nabble.com. >> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> For additional commands, e-mail: [EMAIL PROTECTED] >> >> > > > -- > [EMAIL PROTECTED] > WSO2, Inc: http://www.wso2.com "Oxygenating the Web Service Platform" > http://www.milindalakmal.wordpress.com > > Quoted from: http://www.nabble.com/axis2c---generated-skeleton-files-using-WSDL2C-for -array-of-structure-having-a-RESET-function.-how-to-use-it--tf3471795.ht ml#a9705801 -- [EMAIL PROTECTED] WSO2, Inc: http://www.wso2.com "Oxygenating the Web Service Platform" http://www.milindalakmal.wordpress.com This e-mail and any files transmitted with it are for the sole use of the intended recipient(s) and may contain confidential and privileged information. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message. Any unauthorized review, use, disclosure, dissemination, forwarding, printing or copying of this email or any action taken in reliance on this e-mail is strictly prohibited and may be unlawful. -- [EMAIL PROTECTED] WSO2, Inc: http://www.wso2.com "Oxygenating the Web Service Platform" http://www.milindalakmal.wordpress.com This e-mail and any files transmitted with it are for the sole use of the intended recipient(s) and may contain confidential and privileged information. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message. Any unauthorized review, use, disclosure, dissemination, forwarding, printing or copying of this email or any action taken in reliance on this e-mail is strictly prohibited and may be unlawful.
