You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Stanislaw Ă–sterle <oe...@variomedia.de> on 2004/01/27 11:18:32 UTC

Parsen of Hashes

Hi,

I get the Array of Hashtables from WebService like:

...
      <SOAP-ENV:Body>
         <namesp1:getListResponse xmlns:namesp1="getList">
            <SOAP-ENC:Array SOAP-ENC:arrayType="namesp2:SOAPStruct[10]"
xsi:type="SOAP-ENC:Array">
               <item xsi:type="namesp2:SOAPStruct">
                  <title xsi:type="xsd:string"/>
                  <header xsi:type="xsd:string"/>
                  <mode_1 xsi:type="xsd:string">MODE_1</mode_1>
                  <mode_2 xsi:type="xsd:string">HEADER</mode_2>
                  <meta_keyw xsi:type="xsd:string"/>
                  <id xsi:type="xsd:int">1</id>
               </item>
               <item xsi:type="namesp2:SOAPStruct">
                  <title xsi:type="xsd:string">KTM</title>
                  <header xsi:type="xsd:string"/>
                  <mode_1 xsi:type="xsd:string">MODE_1</mode_1>
                  <mode_2 xsi:type="xsd:string">HEADER</mode_2>
                  <meta_keyw xsi:type="xsd:string"/>
                  <id xsi:type="xsd:int">1</id>
               </item>
            </SOAP-ENC:Array>
         </namesp1:getListResponse>
      </SOAP-ENV:Body>
   </SOAP-ENV:Envelope>

where title, header,mode_1 etc. are Hashkeys and MODE_1, HEADER, KTM etc.
are Hashvalues.

// Thus I get only the Values of Hashtable.
Response resp = call.invoke();
Vector v = (Vector) resp.getReturnValue().getValue();



How can I parsen the answer in such a way that I get Hashkeys also as keys?


Thanks,
S.