we were having the same problems.

we actually went in and modified the generated files and that took care of
it. So just change the method signature for the getters and the setters and
change the equals and hashmap and it nicely converst the Arrays to the say
ArrayList etc and returns it.

Thanks and Regards,

===
Gary Grewal



|---------+---------------------------->
|         |           [EMAIL PROTECTED] |
|         |                            |
|         |           05/21/2004 01:22 |
|         |           PM               |
|         |           Please respond to|
|         |           axis-user        |
|         |                            |
|---------+---------------------------->
  
>---------------------------------------------------------------------------------------------------------------|
  |                                                                                    
                           |
  |       To:       [EMAIL PROTECTED]                                                  
                     |
  |       cc:                                                                          
                           |
  |       Subject:  is it possible to use Collections with client proxies?             
                           |
  
>---------------------------------------------------------------------------------------------------------------|




I've recently attempted to switch the way that I create my web service
clients, from manually configuring Call objects, to
obtaining a reference to an instance of the service interface as a
stub/proxy.  However, I am unable to get this working
when a method has a Collection as a return type or parameter.

Before, I believe that the call to:
Call.setReturnType(Collection.class)
was instructing Axis to handle these types correctly.

However now, since I'm invoking service methods directly on an
interface, I get a ClassCastException on the client side, after the data
has been returned.  If I call a method that returns an array, it works
fine.

When attempting to invoke a method which includes a Collection as a
parameter, I get the following error:

Caused by: org.xml.sax.SAXException: No deserializer defined for array
type {http://localhost:8080/axis/services/Iava}ArrayOf_tns3_anyType
             at
org.apache.axis.message.SOAPFaultBuilder.createFault(SOAPFaultBuilder.java:223)

             at
org.apache.axis.message.SOAPFaultBuilder.endElement(SOAPFaultBuilder.java:130)

             at
org.apache.axis.encoding.DeserializationContextImpl.endElement(DeserializationContextImpl.java:1053)

             at com.bluecast.xml.Piccolo.reportEndTag(Piccolo.java:1059)
             at
com.bluecast.xml.PiccoloLexer.parseCloseTagNS(PiccoloLexer.java:2154)
             at
com.bluecast.xml.PiccoloLexer.parseTagNS(PiccoloLexer.java:1338)
             at
com.bluecast.xml.PiccoloLexer.parseXMLNS(PiccoloLexer.java:1272)
             at
com.bluecast.xml.PiccoloLexer.parseXML(PiccoloLexer.java:1240)
             at com.bluecast.xml.PiccoloLexer.yylex(PiccoloLexer.java:4754)
             at com.bluecast.xml.Piccolo.yylex(Piccolo.java:1253)
             at com.bluecast.xml.Piccolo.yyparse(Piccolo.java:1363)
             at com.bluecast.xml.Piccolo.parse(Piccolo.java:702)
             at javax.xml.parsers.SAXParser.parse(SAXParser.java:345)
             at
org.apache.axis.encoding.DeserializationContextImpl.parse(DeserializationContextImpl.java:218)

             at
org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:568)
             at org.apache.axis.Message.getSOAPEnvelope(Message.java:427)
             at org.apache.axis.client.Call.invokeEngine(Call.java:2708)
             at org.apache.axis.client.Call.invoke(Call.java:2671)
             at org.apache.axis.client.Call.invoke(Call.java:2357)
             at org.apache.axis.client.Call.invoke(Call.java:2280)
             at org.apache.axis.client.Call.invoke(Call.java:1741)
             at
org.apache.axis.client.AxisClientProxy.invoke(AxisClientProxy.java:156)


Thanks in advance for any help or information that anyone can provide.
I've started to read that Collections aren't directly supported
by JAX-RPC, or SOAP.  Is this true?  It looks like I should start
switching my methods to return arrays instead of collections, but I'd
prefer to find a workaround for now.








This communication is for informational purposes only.  It is not intended as
an offer or solicitation for the purchase or sale of any financial instrument
or as an official confirmation of any transaction. All market prices, data 
and other information are not warranted as to completeness or accuracy and 
are subject to change without notice. Any comments or statements made herein
do not necessarily reflect those of J.P. Morgan Chase & Co., its
subsidiaries and affiliates.


Reply via email to