The way to think about this goes like this:
1) Take a service endpoint interface (SEI)
| public interface MyEndpoint
| {
| String[] echoStringArray(String[] v)
| }
|
2) Run a tool that generates wsdl + schema + mapping
| <complexType name="StringArray">
| <sequence>
| <element name="value" type="string" nillable="true" minOccurs="0"
maxOccurs="unbounded"/>
| </sequence>
| </complexType>
|
| <message name=echoStringArray">
| <part name="arrayOfString_1" type="ns3:StringArray"/>
| </message>
| <message name="MarshallRpcServiceInterface_echoStringArrayResponse">
| <part name="result" type="ns3:StringArray"/>
| </message>
|
3) Look for the java mapping for that array type
| <java-xml-type-mapping>
| <java-type>somepackage.StringArray</java-type>
| <root-type-qname
xmlns:typeNS="{urn:NewWebService/types/arrays/java/lang}StringArray
">typeNS:StringArray</root-type-qname>
| <qname-scope>complexType</qname-scope>
| <variable-mapping>
| <java-variable-name>stringArr</java-variable-name>
| <xml-element-name>stringArr</xml-element-name>
| </variable-mapping>
| </java-xml-type-mapping>
|
4) Make sure the wrapper type is in your deployment
If you run wscompile with -keep, it keeps the generated java types
You could also have a look at
| [EMAIL PROTECTED] /cygdrive/d/projects/jboss-branch/jboss-4.0.x/testsuite
| $ ant -Dtest=webservice/marshalltest test
|
| test:
| [junit] Running
org.jboss.test.webservice.marshalltest.MarshallDocLiteralTestCase
| [junit] Tests run: 31, Failures: 0, Errors: 0, Time elapsed: 46.777 sec
| [junit] Running
org.jboss.test.webservice.marshalltest.MarshallRpcEncodedTestCase
| [junit] Tests run: 31, Failures: 0, Errors: 0, Time elapsed: 22.352 sec
| [junit] Running
org.jboss.test.webservice.marshalltest.MarshallRpcLiteralTestCase
| [junit] Tests run: 31, Failures: 0, Errors: 0, Time elapsed: 21.481 sec
|
These tests marshall String[] as well
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3910218#3910218
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3910218
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user