When using the (ws-1-non-conform) rpc/enc style, I was able to send arrays of 
custom objects and arrays of simple types with my webservice (without wrapping 
them in a bean).

Now, I want to change to rpc/literal style.
At first sight, this works without problems. But when inspecting the 
SOAP-messages, I see that the Arrays of Custom Objects are soap-encoded again 
(soapenc:arrayType="ns1:SimpleInfo[3]). A response message:



  | <?xml version="1.0" encoding="UTF-8"?>
  | <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"; 
xmlns:xsd="http://www.w3.org/2001/XMLSchema"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>
  |  <soapenv:Body>
  |   <ns1:getSimpleInfoResponse xmlns:ns1="http://db.bioinfo.rzg.mpg.de";>
  |    <ns2:SimpleInfoArray soapenc:arrayType="ns1:SimpleInfo[3]" 
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"; 
xmlns:ns2="http://arrays/de/mpg/rzg/bioinfo/db";>
  |     <item>
  |      <intProperty>20</intProperty>
  |      <stringArrayProperty>Eins</stringArrayProperty>
  |      <stringArrayProperty>zwei</stringArrayProperty>
  |      <stringArrayProperty>jboss47getsimpleinfo</stringArrayProperty>
  |      <stringProperty>jboss47getsimpleinfo</stringProperty>
  |     </item>
  |     <item>
  |      <intProperty>21</intProperty>
  |      <stringArrayProperty>10</stringArrayProperty>
  |      <stringArrayProperty>11</stringArrayProperty>
  |      <stringProperty>2jboss47getsimpleinfo</stringProperty>
  |     </item>
  |     <item>
  |      <intProperty>40</intProperty>
  |      <stringArrayProperty>20</stringArrayProperty>
  |      <stringArrayProperty>21</stringArrayProperty>
  |      <stringArrayProperty>22</stringArrayProperty>
  |      <stringArrayProperty xsi:nil="1"/>
  |      <stringArrayProperty>ENDE</stringArrayProperty>
  |      
<stringProperty>jboss47getsimpleinfojboss47getsimpleinfo</stringProperty>
  |     </item>
  |    </ns2:SimpleInfoArray>
  |   </ns1:getSimpleInfoResponse>
  |  </soapenv:Body>
  | </soapenv:Envelope>
  | 

All my type-mappings in ws4ee-deployment are bean-mappings. It looks like 
rpc/enc is used for custom-type-arrays if no typemapping is specified (the 
SimpleInfo is a bean) and rpc/lit is used for simple-type-arrays (the 
stringArrayProperty is a String[]) if no typemapping is specified.

Some questions:
1.) Is there a way to define a typemapping for the SimpleInfo[] in 
ws4ee-deployment.xml so that literal encoding is used for the SimpleInfo[]? If 
yes, which (de)serializerfactory must I use (the tutorial says that the 
ArraySerializer uses enc-style, not literal style...)?
2.) Same question for (SimpleArrayType) String[]
3.) Or is it a must to write a wrapper class for each array I want to use and 
to adjust the Interface of the WS (type arrayofX[] -> wrapperforarrayofX)?
I am asking because the tutorial says: you "should" use wrappers when using 
arrays...

Thanks for your help!


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

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


-------------------------------------------------------
This SF.Net email is sponsored by the 'Do More With Dual!' webinar happening
July 14 at 8am PDT/11am EDT. We invite you to explore the latest in dual
core and dual graphics technology at this free one hour event hosted by HP,
AMD, and NVIDIA.  To register visit http://www.hp.com/go/dualwebinar
_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to