-
1. Re: Mapping arrays
manica Sep 7, 2004 1:28 AM (in response to manica)I have a bit more info to include. Here is a snippet from the server.log:
2004-09-06 22:59:29,423 WARN [org.jboss.webservice.deployment.TypeMappingDescription] Class not found: com.ehr.ejb.inventorycontrol.ArrayOfInventoryUpdate 2004-09-06 22:59:29,424 DEBUG [org.jboss.webservice.client.ServiceImpl] Service configuration: <operation name='submit' qname='ns1:submit' returnQName='submitReturn' returnType='xsd:string' xmlns:ns1='http://inventorycontrol.ejb.ehr.co m' > <parameter name='in0' qname='in0' mode='IN' type='ns1:ArrayOfInventoryUpdate' xmlns:ns1='http://inventorycontrol.ejb.ehr.com' /> </operation> <!-- Ignore type mapping <typeMapping qname='ns1:ArrayOfInventoryUpdate' xmlns:ns1='http://inventorycontrol.ejb.ehr.com' type='java:com.ehr.ejb.inventorycontrol.ArrayOfInventoryUpdate' serializer='null' deserializer='null' encodingStyle='http://schemas.xmlsoap.org/soap/encoding/'> </typeMapping> -->
And, here is a snippet from the WSDL:<complexType name="ArrayOfInventoryUpdate"> <complexContent> <restriction base="soapenc:Array"> <attribute ref="soapenc:arrayType" wsdl:arrayType="impl:InventoryUpdate[]"/> </restriction> </complexContent> </complexType>
It appears that it is looking for the object "com.ehr.ejb.inventorycontrol.ArrayOfInventoryupdate", which doesn't exist. (The method signature takes an InventoryUpdate[], not an ArrayOfInventoryupdate.)
Thank you!
Darin -
2. Re: Mapping arrays
aagmon Sep 7, 2004 11:52 AM (in response to manica)not sure i understand the problem but check ...
1.that the value object's package is the same on the client/server
2.that u mapped the objects correctly in the ws4ee-deployment.xml
3.try to send one response object that contains the array eg
public ....status ....{
private sales[] ;
check out the complex bean example in the wikki -
3. Re: Mapping arrays
gerhardo Sep 14, 2004 12:31 PM (in response to manica)Hello !
Have you found a solution to this problem ? I'm experiencing the same behavior when returning an array of complextype.
TIA Gerhard -
4. Re: Mapping arrays
thomas.diesler Sep 14, 2004 5:01 PM (in response to manica)Beware that rpc/encoded violates the BasicProfile R1006. You should stick with document/literal or rpc/literal.
I'll put an example on the wiki that shows arrays of custom objects. -
5. Re: Mapping arrays
h.w. Oct 7, 2004 3:20 PM (in response to manica)Hello,
my client throws the following exception, when I try to get an array of
complex types:
[java] 2004-10-07 16:23:16,541 ERROR
org.apache.axis.client.Call[main] - Exception:
[java] org.xml.sax.SAXException: SimpleDeserializer encountered a
child element, which is NOT expected, in something it was trying to
deserialize.
....
The wsdl file is generated by org.apache.axis.wsdl.Java2WSDL, style=RPC
and the following typemapping is used:
<typeMapping
qname='ns1:DatabaseListDO'
xmlns:ns1='http://database.dbdb.ulbmuenster.de'
type='java:de.ulbmuenster.dbdb.database.DatabaseListDO'
serializer='org.apache.axis.encoding.ser.BeanSerializerFactory'
deserializer='org.apache.axis.encoding.ser.BeanDeserializerFactory'
encodingStyle=''
/>
<typeMapping
qname='ns1:DatabaseListDOArray'
xmlns:ns1='http://database.dbdb.ulbmuenster.de'
type='java:de.ulbmuenster.dbdb.database.DatabaseListDOArray'
serializer='org.apache.axis.encoding.ser.BeanSerializerFactory'
deserializer='org.apache.axis.encoding.ser.BeanDeserializerFactory'
encodingStyle=''
/>
The used java-classes (complex type and array wrapper) are analogoue to the example in the wikis. No error occurs, if the return type is
one complex class.
Is there any solution for this problem?
Hendrik -
6. Re: Mapping arrays
thomas.diesler Oct 12, 2004 1:08 PM (in response to manica)Try generating your wsdl/jaxrpc-mapping.xml with JWSDP-1.4 wscompile