Return-Path: Delivered-To: apmail-ws-axis-c-user-archive@www.apache.org Received: (qmail 81513 invoked from network); 27 Nov 2007 18:13:32 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 27 Nov 2007 18:13:32 -0000 Received: (qmail 68799 invoked by uid 500); 27 Nov 2007 18:13:19 -0000 Delivered-To: apmail-ws-axis-c-user-archive@ws.apache.org Received: (qmail 68791 invoked by uid 500); 27 Nov 2007 18:13:19 -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 68780 invoked by uid 99); 27 Nov 2007 18:13:19 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 27 Nov 2007 10:13:19 -0800 X-ASF-Spam-Status: No, hits=-4.0 required=10.0 tests=RCVD_IN_DNSWL_MED,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [216.82.245.147] (HELO mail147.messagelabs.com) (216.82.245.147) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 27 Nov 2007 18:12:57 +0000 X-VirusChecked: Checked X-Env-Sender: spandit2@csc.com X-Msg-Ref: server-5.tower-147.messagelabs.com!1196187178!24775272!1 X-StarScan-Version: 5.5.12.14.2; banners=-,-,- X-Originating-IP: [20.137.2.87] Received: (qmail 12234 invoked from network); 27 Nov 2007 18:12:58 -0000 Received: from amer-mta101.csc.com (HELO amer-mta101.csc.com) (20.137.2.87) by server-5.tower-147.messagelabs.com with AES256-SHA encrypted SMTP; 27 Nov 2007 18:12:58 -0000 Received: from amer-gw09.amer.csc.com (amer-gw09.amer.csc.com [20.6.39.245]) by amer-mta101.csc.com (Switch-3.3.0/Switch-3.3.0) with ESMTP id lARIDAdr005860 for ; Tue, 27 Nov 2007 13:13:10 -0500 In-Reply-To: Subject: Re: Reading attribute on a complex element To: "Apache AXIS C User List" Cc: "Apache AXIS C User List" X-Mailer: Lotus Notes 652HF83 November 04, 2004 Message-ID: From: Sunil Pandit Date: Tue, 27 Nov 2007 12:12:51 -0600 X-MIMETrack: Serialize by Router on AMER-GW09/SRV/CSC(Release 7.0.2FP1 HF180|March 29, 2007) at 11/27/2007 01:13:14 PM MIME-Version: 1.0 Content-type: text/plain; charset=US-ASCII X-Virus-Checked: Checked by ClamAV on apache.org Never mind . I was not doing axiom_document_build_all(document,env); It works as expected now. Thanks Sunil Pandit R&D , CSC FSG Austin (512)2755792 Computer Sciences Corporation Registered Office: 2100 East Grand Avenue, El Segundo California 90245, USA Registered in USA No: C-489-59 ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- This is a PRIVATE message. If you are not the intended recipient, please delete without copying and kindly advise us by e-mail of the mistake in delivery. NOTE: Regardless of content, this e-mail shall not operate to bind CSC to any order or other contract unless pursuant to explicit written agreement or government initiative expressly permitting the use of e-mail for such purpose. ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Sunil Pandit/FSG/CSC@CS C To "Apache AXIS C User List" 11/27/2007 11:19 AM cc "Apache AXIS C User List" Please respond to Subject "Apache AXIS C Re: Reading attribute on a complex User List" element Dimuthu Thanks for your response. I modified your code to test with my xml . However the axiom_document_get_root_element call returns the root element without any children's . Attached is a log and xml file (See attached file: test.c). Any idea ? (See attached file: alltest.log)(See attached file: VPMSRequest.xml) Thanks Sunil Pandit R&D , CSC FSG Austin (512)2755792 Computer Sciences Corporation Registered Office: 2100 East Grand Avenue, El Segundo California 90245, USA Registered in USA No: C-489-59 ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- This is a PRIVATE message. If you are not the intended recipient, please delete without copying and kindly advise us by e-mail of the mistake in delivery. NOTE: Regardless of content, this e-mail shall not operate to bind CSC to any order or other contract unless pursuant to explicit written agreement or government initiative expressly permitting the use of e-mail for such purpose. ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- "Dimuthu Gamage" To "Apache AXIS C User List" 11/27/2007 01:21 AM cc Subject Please respond to Re: Reading attribute on a complex "Apache AXIS C element User List" Hi, I checked your code and the xml. And it worked. Check the attachments. I think your problem is the firstNode is not the one you think (). If you have spaces in the xml, the axiom think they are text_node, And currently the code gen is not handling that situation, I have to check whether it s a bug or not. If it is the case, just add following lines to get rid of the text_nodes, while(axiom_node_get_node_type(first_node, env) != AXIOM_ELEMENT) { first_node = axiom_node_get_next_sibling(first_node, env); } And if you found the generated code is not working, please let the axis2-c list know that issue, And hope you are updated with the tool from http://people.apache.org/dist/axis2/nightly/ Thanks Dimuthu On Nov 27, 2007 11:33 AM, Sunil Pandit wrote: Can someone guide me on how to read the attribute value on an element ? I have a web service that takes a complex element with an attribute. The deserialization code generated by WSDL2C is not able to read this attribute. So I modified the code and none of the method including axiom_element_get_all_attributes returns the attributes. The axiom_element_get_all_attributes returns NULL. When I log the string form of the node passed to deserialize method , I can see all the sub elements and the attribute . Here is the code Any help is sincerely appreciated. parent_element = axiom_node_get_data_element(first_node, env); qname = axutil_qname_create_from_string(env,"Sequence"); if(qname != NULL) { parent_attri = axiom_element_get_attribute(parent_element, env, qname); } if(parent_attri == NULL) { attributes = axiom_element_get_all_attributes(parent_element,env); } Here is the string form of node passed to the deserialize method Mon Nov 26 23:32:54 2007] [info] CommandType : String form of Element is loadsession C:\VPMS\workspace\Federated Perf\Federated\Models\DADVDOCS_Master\DADVDOCS\DULDOCS_test_cases.VPM Regards Sunil Pandit R&D , CSC FSG Austin (512)2755792 Computer Sciences Corporation Registered Office: 2100 East Grand Avenue, El Segundo California 90245, USA Registered in USA No: C-489-59 ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- This is a PRIVATE message. If you are not the intended recipient, please delete without copying and kindly advise us by e-mail of the mistake in delivery. NOTE: Regardless of content, this e-mail shall not operate to bind CSC to any order or other contract unless pursuant to explicit written agreement or government initiative expressly permitting the use of e-mail for such purpose. ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- --------------------------------------------------------------------- To unsubscribe, e-mail: axis-c-user-unsubscribe@ws.apache.org For additional commands, e-mail: axis-c-user-help@ws.apache.org [attachment "Makefile" deleted by Sunil Pandit/FSG/CSC] [attachment "test.c" deleted by Sunil Pandit/FSG/CSC] [attachment "test.xml" deleted by Sunil Pandit/FSG/CSC] --------------------------------------------------------------------- To unsubscribe, e-mail: axis-c-user-unsubscribe@ws.apache.org For additional commands, e-mail: axis-c-user-help@ws.apache.org[attachment "test.c" deleted by Sunil Pandit/FSG/CSC] [attachment "alltest.log" deleted by Sunil Pandit/FSG/CSC] [attachment "VPMSRequest.xml" deleted by Sunil Pandit/FSG/CSC] --------------------------------------------------------------------- To unsubscribe, e-mail: axis-c-user-unsubscribe@ws.apache.org For additional commands, e-mail: axis-c-user-help@ws.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: axis-c-user-unsubscribe@ws.apache.org For additional commands, e-mail: axis-c-user-help@ws.apache.org