Could you possibly help me with this problem:
 
I am using AXIS, under WebLogic 8.1, as my SOAP Engine.  During a particular
call to a web service I pass in an array of strings.
 
It appears to me that AXIS is encoding the array of strings on the client
side using http://www.w3.org/2003/05/soap-encoding.  When the request
reaches the
server it throws the exception:
 
No deserializer defined for array type
{http://www.w3.org/2003/05/soap-encoding}string 
 
It is my understanding that I will have to add a "typeMapping" to my
deploy.wsdd file.  However, I do not know what the syntax for it should look
like?
 
Could you provide me with the syntax or point me in the direction of some
resources?
 
Thanks,
John M.

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Friday, May 21, 2004 4:09 PM
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: Re: is it possible to use Collections with client proxies?




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:2
23)

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

             at
org.apache.axis.encoding.DeserializationContextImpl.endElement(Deserializati
onContextImpl.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(DeserializationCon
textImpl.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