Hi Jason,
The wiki says you need to wrap the array in some bean, so:
| public interface MySingleMethodEndpoint {
| Person[] getPersons();
| }
|
Should become:
| public interface MySingleMethodEndpoint {
| PersonList getPersons();
| }
|
where PersonList is:
| class PersonList {
| private Person[] list;
| getList() / setList(...)
| }
|
--------------------------------
This wont work as well...
Before offering a solution - let's see if all is understood correctly:
At deploy time, JBoss:
1. Looks for webservices.xml
2. Looks for the wsdl and <jaxrpc-mapping-file>.xml file (specified inside the
webservices.xml)
3. Looks for a ws4ee-deployment.xml (optionally), explained later
4. Creates a .wsdd out of the above files - this file is used by Axis to deploy
the web service
After that, JBoss (actually Axis) doesnt rely on webserivces.xml and its J2EE
1.4 comlpiant friends
It relies only on the wsdd (which is very much Okay because this is
implementation specifiec)
But, If you look at the wsdd generated from our 'PersonList' example, you will
see ONLY ONE type-mapping:
| <typeMapping
| qname='ns2:PersonList' xmlns:ns2='http://structs.myservice.com'
| type='java:com.myservice.structs.PersonList'
| serializer='org.apache.axis.encoding.ser.BeanSerializerFactory'
| deserializer='org.apache.axis.encoding.ser.BeanDeserializerFactory'
| encodingStyle='http://schemas.xmlsoap.org/soap/encoding/'>
| </typeMapping>
|
JBoss should've automatically generated a type-mapping descriptor for class
'Person' as well
To solve this probelm, add the 'Person' mapping yourself to ws4ee-deployment.xml
When you supply this optionaly file, JBoss merges its content with the
generated .wsdd (At Step #3 of the above scenario)
The 'Person' mapping should look like this:
| <typeMapping
| qname='ns2:Person' xmlns:ns2='http://structs.myservice.com'
| type='java:com.myservice.structs.Person'
| serializer='org.apache.axis.encoding.ser.BeanSerializerFactory'
| deserializer='org.apache.axis.encoding.ser.BeanDeserializerFactory'
| encodingStyle='http://schemas.xmlsoap.org/soap/encoding/'>
| </typeMapping>
|
This will solve the PersonList problem
-----------------------------------------------------------------------------------
In fact, you can even return to the first version of your web service:
public interface MySingleMethodEndpoint {
Person[] getPersons();
}
once, you have the ws4ee-deployment.xml descriptor, you can use plain arrays in
your web services
-----------------------------------------------------------------------------------
Jason, could it be that I missed something in the other DD files (.wsdl,
jaxrpc-mapping, jboss.xml) which prevented
'Person' from being auto-generated and inserted into the .wsdd file?
Again, Thanks a lot for your time...
Eyal
View the original post :
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3872143#3872143
Reply to the post :
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3872143
-------------------------------------------------------
This SF.net email is sponsored by Demarc:
A global provider of Threat Management Solutions.
Download our HomeAdmin security software for free today!
http://www.demarc.com/info/Sentarus/hamr30
_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user