[jboss-user] [JBossWS] - Re: Soap service returning complex objects(Such as hashmaps)

mwkohout do-not-reply at jboss.com
Thu Nov 29 11:31:09 EST 2007


This absolutely works so long as it's a simple Map with simple objects(like strings) as key/values.  But this seems to break down when you've got nested maps.

here's a "simple" map with just a string key and string value.

  | <env:Envelope xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'>
  |  <env:Header>
  |   <seam:conversationId xmlns:seam='http://www.jboss.org/seam/webservice'>6</seam:conversationId>
  |  </env:Header>
  |  <env:Body>
  |   <n1:getHashMapResponse xmlns:n1='http://webService.core.ictr.umn.edu/'>
  |    <return>
  |     <realMap>
  |      <entry>
  |       <key xmlns:xs='http://www.w3.org/2001/XMLSchema' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:type='xs:string'>mike</key>
  |       <value xmlns:xs='http://www.w3.org/2001/XMLSchema' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:type='xs:string'>kohout</value>
  |      </entry>
  |     </realMap>
  |    </return>
  |   </n1:getHashMapResponse>
  |  </env:Body>
  | </env:Envelope>
  | 

here's the results from a call that returns an list of Maps/MyMaps, where each of the Maps/MyMaps has a property that also contains a list of MyMaps.  So it's an ArrayList where each MyMap can contain a nested ArrayList.  
It's still returning an empty response.


  | <env:Envelope xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'>
  |  <env:Header>
  |   <seam:conversationId xmlns:seam='http://www.jboss.org/seam/webservice'>5</seam:conversationId>
  |  </env:Header>
  |  <env:Body>
  |   <n1:getSubjectsResponse xmlns:n1='http://webService.core.ictr.umn.edu/'>
  |    <return/>
  |   </n1:getSubjectsResponse>
  |  </env:Body>
  | </env:Envelope>
  | 

Any other suggestions to make this work?
I'm using maps and lists to avoid making DTOs.  Maybe at this point it would just be easier to make the damn DTOs.

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4108968#4108968

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4108968



More information about the jboss-user mailing list