• Post Reply Bookmark Topic Watch Topic
  • New Topic

Handling response in Axis2 ADB clasess  RSS feed

 
faisal hameed
Ranch Hand
Posts: 48
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Rnchers
I am consuming a web service in java with Axis2 with ADB data binding.Now i am getting the result as OMElement.
Please tell me how to get data from response.
Which is the best way to get data from xml.


The OMElement returning the following xml result.

<?xml version="1.0" encoding="UTF-8"?>
<ns1:GetMarginsContractResponse xmlns:ns1="http://tempuri.org/">
<ns1:GetMarginsContractResult>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" id="NewDataSet">
<xs:element name="NewDataSet" msdata:IsDataSet="true">
<xs:complexType>
<xs:choice maxOccurs="unbounded">
<xs:element name="Table">
<xs:complexType>
<xs:sequence>
<xs:element name="COM_CODE" type="xs:string" minOccurs="0" />
<xs:element name="CON_CODE" type="xs:string" minOccurs="0" />
<xs:element name="CON_NAME" type="xs:string" minOccurs="0" />
<xs:element name="MAR_TYPE" type="xs:decimal" minOccurs="0" />
<xs:element name="MAR_CODE" type="xs:string" minOccurs="0" />
<xs:element name="MAR_VAL" type="xs:decimal" minOccurs="0" />
<xs:element name="MAR_START" type="xs:dateTime" minOccurs="0" />
<xs:element name="MAR_END" type="xs:dateTime" minOccurs="0" />
<xs:element name="MODEID" type="xs:string" minOccurs="0" />
<xs:element name="MAINT_MARGIN" type="xs:decimal" minOccurs="0" />
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:choice>
</xs:complexType>
</xs:element>
</xs:schema>
<diffgr:diffgram xmlns:diffgr="urn:schemas-microsoft-com:xml-diffgram-v1" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<NewDataSet>
<Table diffgr:id="Table1" msdata:rowOrder="0">
<COM_CODE>RI6</COM_CODE>
<CON_CODE>RICEIRRI6</CON_CODE>
<CON_NAME>NOV 08</CON_NAME>
<MAR_TYPE>3</MAR_TYPE>
<MAR_CODE>SM</MAR_CODE>
<MAR_VAL>0</MAR_VAL>
<MAR_START>2008-03-07T00:00:00.0000000+05:00</MAR_START>
<MAR_END>2008-03-17T00:00:00.0000000+05:00</MAR_END>
<MODEID>ABSAMT</MODEID>
</Table>
<Table diffgr:id="Table2" msdata:rowOrder="1">
<COM_CODE>GO</COM_CODE>
<CON_CODE>GOLD</CON_CODE>
<CON_NAME>MAY 08</CON_NAME>
<MAR_TYPE>2</MAR_TYPE>
<MAR_CODE>DM</MAR_CODE>
<MAR_VAL>784.50</MAR_VAL>
<MAR_START>2008-05-20T00:00:00.0000000+05:00</MAR_START>
<MAR_END>2008-05-23T00:00:00.0000000+05:00</MAR_END>
<MODEID>ABSAMT</MODEID>
<MAINT_MARGIN>0</MAINT_MARGIN>
</Table>
<Table diffgr:id="Table1015" msdata:rowOrder="1014">
<COM_CODE>SL500</COM_CODE>
<CON_CODE>SL500OZ</CON_CODE>
<CON_NAME>JY11</CON_NAME>
<MAR_TYPE>1</MAR_TYPE>
<MAR_CODE>IM</MAR_CODE>
<MAR_VAL>148900.00</MAR_VAL>
<MAR_START>2011-02-25T00:00:00.0000000+05:00</MAR_START>
<MAR_END>2011-06-28T00:00:00.0000000+05:00</MAR_END>
<MODEID>ABSAMT</MODEID>
<MAINT_MARGIN>100</MAINT_MARGIN>
</Table>
</NewDataSet>
</diffgr:diffgram>
</ns1:GetMarginsContractResult>
</ns1:GetMarginsContractResponse>
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!