axis-c-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sunil Pandit <spand...@csc.com>
Subject Reading attribute on a complex element
Date Tue, 27 Nov 2007 06:03:30 GMT
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
  <Command Sequence="1">
      <Type>loadsession</Type>
      <Parameter>C:\VPMS\workspace\Federated
Perf\Federated\Models\DADVDOCS_Master\DADVDOCS\DULDOCS_test_cases.VPM</Parameter>
  </Command>




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


Mime
View raw message